Leo Gürtler wrote:

thanks, I tried your example and it works. Now I hope it works in my document, too. One question, because I only want to use the code I really need. For the latex-preamble, only the following is necessary?

Yes.

But as Herbert wrote, the usage of the package "capt-of" is THE solution: Simply add

[EMAIL PROTECTED]

to the preamble. Referencing can then be done in the normal LyX way, see the attached example.

regards Uwe
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
[EMAIL PROTECTED]

\usepackage[colorlinks=true, urlcolor=blue,
linkcolor=black, pdftitle={otabtest},
pdfauthor={Mustermann}, bookmarksnumbered=true,
pdfnewwindow=true, pdfstartview=XYZ,
pdfpagelayout=OneColumn,
bookmarksopen]{hyperref}
\usepackage[figure]{hypcap}

%Linkfläche für Querverweise vergrößern
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
\renewcommand{\figureautorefname}{Abb.\negthinspace}
\renewcommand{\tableautorefname}{Tab.\negthinspace}
\renewcommand{\sectionautorefname}{Kap.\negthinspace}
\renewcommand{\subsectionautorefname}{Kap.\negthinspace}
\renewcommand{\subsubsectionautorefname}{Kap.\negthinspace}
\newlength{\abc}
\settowidth{\abc}{\space}
\renewcommand{\equationautorefname}{\hspace{-\abc}}
\end_preamble
\options fleqn
\language ngerman
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle empty
\bullet 1
        1
        34
        -1
\end_bullet
\bullet 2
        2
        35
        -1
\end_bullet
\bullet 3
        2
        7
        -1
\end_bullet

\layout Standard


\begin_inset Float table
wide false
collapsed true

\layout Caption


\begin_inset LatexCommand \label{cap:asdf}

\end_inset 

asdf
\layout Standard
\align center 

\begin_inset  Tabular
<lyxtabular version="3" rows="1" columns="2">
<features>
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" rightline="true" 
width="0">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

\end_inset 
</cell>
</row>
</lyxtabular>

\end_inset 


\end_inset 


\layout Standard
\align center 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
captionof{table}{
\end_inset 


\begin_inset LatexCommand \label{cap:We}

\end_inset 

We
\begin_inset ERT
status Collapsed

\layout Standard
}
\end_inset 


\begin_inset  Tabular
<lyxtabular version="3" rows="5" columns="5">
<features>
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" rightline="true" 
width="0">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

we
\end_inset 
</cell>
</row>
</lyxtabular>

\end_inset 


\layout Standard


\begin_inset Float table
placement H
wide false
collapsed true

\layout Caption


\begin_inset LatexCommand \label{cap:bsdf}

\end_inset 

bsdf
\layout Standard
\align center 

\begin_inset  Tabular
<lyxtabular version="3" rows="1" columns="2">
<features>
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" rightline="true" 
width="0">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" 
usebox="none">
\begin_inset Text

\layout Standard

\end_inset 
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" 
rightline="true" usebox="none">
\begin_inset Text

\layout Standard

\end_inset 
</cell>
</row>
</lyxtabular>

\end_inset 


\end_inset 


\layout Standard

siehe 
\begin_inset LatexCommand \ref{cap:asdf}

\end_inset 

, 
\begin_inset LatexCommand \ref{cap:We}

\end_inset 

 und 
\begin_inset LatexCommand \ref{cap:bsdf}

\end_inset 

.
\the_end

Reply via email to