Welcome to the TeXnik web site

References
TUG logo

Main page

Index
English FAQ
Documentation
Software
CTAN
Search CTAN:
Main Server

Statistics

 


 


More Books
Cross-Reference |  Prettyref | 


Cross Reference for multiple documents
Suppose that your files are master.lyx, chap1.lyx, chap2.lyx, and you want to insert a label from chap2.lyx to chap1.lyx.
There are three methods:
  1. Open master.lyx, open the insert reference dialog, and return to chap1.lyx. Now, whenever you open the insert reference dialog in chap1.lyx, you will get a list of all labels in all the files.
  2. Open chap2.lyx, open the insert reference dialog, and without closing the dialog, return to chap1.lyx, and then insert the reference. This doesn't work in LyX 1.1.6.
  3. In LyX 1.1.6, type alt-x reference-insert ref|++||++|<label> where <label> is the required label and written without a space behind the last |++|.


PrettyRef
prettyref needs a label definition like \label{tab:MyTable} than
"the \prettyref{tab:Mytable} looks ..."
gives in dvi-output
"the Table looks ..." .
in lyx you have to create the labels in prettyref-style, e.g. tab:figure1

possible types of labels for prettyref

\newrefformat{eq}{\textup{(\ref{#1})}}
\newrefformat{lem}{Lemma \ref{#1}}
\newrefformat{thm}{Theorem \ref{#1}}
\newrefformat{cha}{Chapter \ref{#1}}
\newrefformat{sec}{Section \ref{#1}}
\newrefformat{tab}{Table \ref{#1} on page \pageref{#1}}
\newrefformat{fig}{Figure \ref{#1} on page \pageref{#1}}
with LaTeX-Preamble other definitions are possible!

Attention: The language for the prettyref-package is always english. To change the labels to german, write in LaTeX Preamble (behind(!) \usepackage{prettyref}):

\newrefformat{cha}{Kapitel \ref{#1}}
\newrefformat{sec}{Abschnitt \ref{#1}}
\newrefformat{tab}{Tabelle \ref{#1} on page \pageref{#1}}
\newrefformat{fig}{Abbildung \ref{#1} on page \pageref{#1}}

local time: Fri May 22 19:15:07 UTC 2026; file is: 1.2237 days old
contact webmaster _at_ TeXnik.de