EmbeddedObjects.lyx: rewrite another hyperref feature

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26035 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-08-03 00:59:43 +00:00
parent fab94ee1f3
commit bf21947af2
4 changed files with 358 additions and 79 deletions

View File

@ -1,5 +1,5 @@
#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ #LyX 1.6.0rc1 created this file. For more info see http://www.lyx.org/
\lyxformat 339 \lyxformat 340
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -20175,9 +20175,31 @@ The LaTeX-package
\series bold \series bold
hyperref hyperref
\series default \series default
provides a very useful feature that cross-references automatically include
the name of the referenced floats (or text parts like sections). \begin_inset Index
You save to write e. status collapsed
\begin_layout Plain Layout
LaTeX-packages ! hyperref
\end_layout
\end_inset
, that is enabled in the
\family sans
PDF Properties
\family default
of the
\family sans
Document Settings
\family default
dialog, provides a very useful feature that cross-references automatically
include the name of the referenced floats (or text parts like
\emph on
section
\emph default
).
So you will save to write e.
\begin_inset space \thinspace{} \begin_inset space \thinspace{}
\end_inset \end_inset
@ -20193,35 +20215,18 @@ Figure
\begin_inset Quotes erd \begin_inset Quotes erd
\end_inset \end_inset
before every reference box. before every reference to a figure.
To get this automatic reference naming, you have to load the LaTeX-package To use this feature, enable
\series bold \series bold
hyperref hyperref
\series default \series default
and insert this line to the LaTeX preamble:
\begin_inset Index
status collapsed
\begin_layout Plain Layout
LaTeX-packages ! hyperref
\end_layout
\end_inset
in the document preamble with
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
\series bold \series bold
\backslash
usepackage[pdfborder={0 0 0}]{hyperref}
\begin_inset Newline newline
\end_inset
\backslash \backslash
AtBeginDocument{ AtBeginDocument{
\backslash \backslash
@ -20234,32 +20239,148 @@ mbox{
autoref{#1}}}} autoref{#1}}}}
\end_layout \end_layout
\begin_layout Standard
When you prefer other reference names than the default ones, for example
you want instead of
\begin_inset Quotes eld
\end_inset
section
\begin_inset Quotes erd
\end_inset
the name
\begin_inset Quotes eld
\end_inset
sec.
\begin_inset space \thinspace{}
\end_inset
\begin_inset Quotes eld
\end_inset
, you can redefine the name by inserting this to the preamble:
\end_layout
\begin_layout Standard \begin_layout Standard
\series bold \series bold
hyperref
\backslash
addto
\backslash
extrasenglish{
\backslash
renewcommand{
\backslash
sectionautorefname}
\begin_inset Newline newline
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
hphantom{ }
\end_layout
\end_inset
{sec.
\backslash
negthinspace}}
\end_layout
\begin_layout Standard
When you are using another document language than English, replace
\begin_inset Newline newline
\end_inset
\series bold
\backslash
extrasenglish
\series default \series default
is used to link cross-references in the DVI- and PDF-output, this means by
that the reader of your document will be able to click on a table of content \series bold
(TOC) entry or on a reference and he will be shown the referenced document
part. \backslash
extras***
\series default
, where *** is the name of the used language.
\end_layout
\begin_layout Standard
To get automatic names, but not for certain reference types, for example
not for equations, use this preamble code:
\end_layout
\begin_layout Standard
\series bold
\backslash
newlength{
\backslash
abc}
\begin_inset Newline newline
\end_inset
\backslash
settowidth{
\backslash
abc}{
\backslash
space}
\begin_inset Newline newline
\end_inset
\backslash
addto
\backslash
extrasenglish{
\backslash
renewcommand{
\backslash
equationautorefname}
\begin_inset Newline newline
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
hphantom{ }
\end_layout
\end_inset
{
\backslash
hspace{-
\backslash
abc}}
\end_layout
\begin_layout Standard
More about this topic can be found in
\series bold \series bold
hyperref hyperref
\series default \series default
also creates PDF-bookmarks for every section of your document to make it 's documentation
easier for readers to navigate through the document.
This is also used in this document but when you have a look in the document
preamble you will find various options in the load command of
\series bold
hyperref
\series default
.
To learn more about the
\series bold
hyperref
\series default
package, we refer to its documentation
\begin_inset CommandInset citation \begin_inset CommandInset citation
LatexCommand cite LatexCommand cite
key "hyperref" key "hyperref"
@ -20287,7 +20408,7 @@ Formatted
reference reference
\family default \family default
style, described in section style, as described in section
\begin_inset space ~ \begin_inset space ~
\end_inset \end_inset
@ -20306,6 +20427,14 @@ reference "sub:Cross-Reference-Formats"
\end_layout \end_layout
\begin_layout Standard
The
\emph on
Math
\emph default
manual is an example where automatic reference naming is used.
\end_layout
\begin_layout Subsection \begin_layout Subsection
Reference Position Reference Position
\begin_inset CommandInset label \begin_inset CommandInset label

View File

@ -27827,7 +27827,7 @@ hyperref
status collapsed status collapsed
\begin_layout Plain Layout \begin_layout Plain Layout
LaTeX-packages ! hyperref Latex@LaTeX-packages ! hyperref
\end_layout \end_layout
\end_inset \end_inset
@ -42202,7 +42202,7 @@ hyperref
status collapsed status collapsed
\begin_layout Plain Layout \begin_layout Plain Layout
LaTeX-packages ! hyperref Latex@LaTeX-packages ! hyperref
\end_layout \end_layout
\end_inset \end_inset

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 288 B

View File

@ -1,5 +1,5 @@
#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ #LyX 1.6.0rc1 created this file. For more info see http://www.lyx.org/
\lyxformat 339 \lyxformat 340
\begin_document \begin_document
\begin_header \begin_header
\textclass scrbook \textclass scrbook
@ -20803,7 +20803,7 @@ Format
\end_layout \end_layout
\begin_layout Subsection \begin_layout Subsection
Automatische Querverweis-Namen Automatische Querverweisnamen
\begin_inset Index \begin_inset Index
status collapsed status collapsed
@ -20831,30 +20831,46 @@ LaTeX-Pakete ! hyperref
\end_inset \end_inset
besitzt eine sehr nützliche Funktion, damit Querverweise den Namen des , das in den
Gleitobjekts automatisch enthalten (oder Textteile wie \family sans
PDF-Eigenschaften
\family default
im
\family sans
Dokument-Einstellungen
\family default
Dialog aktiviert werden kann, besitzt eine sehr nützliche Funktion, dass
Querverweise den Namen des Gleitobjekts automatisch enthalten (oder Textteile
wie
\emph on \emph on
Abschnitt Abschnitt
\emph default \emph default
). ).
Sie müssen nicht mehr Abbildung vor das Querverweis-Kästchen schreiben. Sie müssen damit z.
Um diese Funktion benutzen zu können, müssen Sie \begin_inset space \thinspace{}
\end_inset
B.
nicht mehr den Namen
\begin_inset Quotes gld
\end_inset
Abbildung
\begin_inset Quotes grd
\end_inset
vor jeden Querverweis auf eine Abbildung schreiben.
Um diese Funktion benutzen zu können, aktivieren Sie
\series bold \series bold
hyperref hyperref
\series default \series default
in den LaTeX-Vorspann wie folgt einfügen: und fügen diese Zeile in den LaTeX-Vorspann ein:
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
\series bold \series bold
\backslash
usepackage[pdfborder={0 0 0}]{hyperref}
\begin_inset Newline newline
\end_inset
\backslash \backslash
AtBeginDocument{ AtBeginDocument{
\backslash \backslash
@ -20867,38 +20883,153 @@ mbox{
autoref{#1}}}} autoref{#1}}}}
\end_layout \end_layout
\begin_layout Standard
Wenn Sie andere Querverweisnamen als die voreingestellten bevorzugen, z.
\begin_inset space \thinspace{}
\end_inset
B.
statt
\begin_inset Quotes gld
\end_inset
Abschnitt
\begin_inset Quotes grd
\end_inset
den Namen
\begin_inset Quotes gld
\end_inset
Kap.
\begin_inset space \thinspace{}
\end_inset
\begin_inset Quotes grd
\end_inset
, können Sie den Namen umdefinieren, indem Sie dies zum Vorspann hinzufügen:
\end_layout
\begin_layout Standard \begin_layout Standard
\series bold \series bold
hyperref
\series default \backslash
wird benutzt, um Marken und Querverweise in DVI- und PDF addto
\backslash
extrasngerman{
\backslash
renewcommand{
\backslash
sectionautorefname}
\begin_inset Newline newline
\end_inset
\begin_inset ERT \begin_inset ERT
status open status collapsed
\begin_layout Plain Layout \begin_layout Plain Layout
"=
\backslash
hphantom{ }
\end_layout \end_layout
\end_inset \end_inset
Dokumenten zu verlinken, das heißt der Leser der entsprechenden Datei kann {Kap.
auf solch einen Link klicken, und die angeklickte Stelle wird gezeigt. \backslash
In DVI-Dateien ist ein Link blau unterstrichen, in der PDF-Datei ändert negthinspace}}
sich der Cursor.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
Diese Funktion wird auch in diesem Dokument benutzt und nach und nach in Wenn Sie eine andere Dokumentsprache als Englisch benutzen, ersetzen Sie
allen Handbüchern. \begin_inset Newline newline
Wenn Sie sich den LaTeX-Vorspann ansehen, werden Sie verschiedene Optionen \end_inset
für die Benutzung von
\series bold \series bold
hyperref
\backslash
extrasngerman
\series default \series default
sehen. durch
In der \series bold
\backslash
extras***
\series default
, wobei *** der Name der verwendeten Sprache ist.
\end_layout
\begin_layout Standard
Um automatische Namen zu bekommen, jedoch nicht für bestimmte Querverweistypen,
z.
\begin_inset space \thinspace{}
\end_inset
B.
nicht für Gleichungen, benutzen Sie diesen Vorspanncode:
\end_layout
\begin_layout Standard
\series bold
\backslash
newlength{
\backslash
abc}
\begin_inset Newline newline
\end_inset
\backslash
settowidth{
\backslash
abc}{
\backslash
space}
\begin_inset Newline newline
\end_inset
\backslash
addto
\backslash
extrasenglish{
\backslash
renewcommand{
\backslash
equationautorefname}
\begin_inset Newline newline
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
hphantom{ }
\end_layout
\end_inset
{
\backslash
hspace{-
\backslash
abc}}
\end_layout
\begin_layout Standard
Mehr über dieses Thema finden Sie in der
\series bold \series bold
hyperref hyperref
\series default \series default
@ -20909,7 +21040,7 @@ key "hyperref"
\end_inset \end_inset
finden Sie mehr darüber. .
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -20930,7 +21061,18 @@ Formatierter
Querverweis Querverweis
\family default \family default
benutzen. benutzen, wie in Abschnitt
\begin_inset space ~
\end_inset
\begin_inset CommandInset ref
LatexCommand ref
reference "uab:Querverweis-Formate"
\end_inset
beschrieben.
\end_layout \end_layout
\end_inset \end_inset
@ -20938,6 +21080,14 @@ Querverweis
\end_layout \end_layout
\begin_layout Standard
Das
\emph on
Mathe
\emph default
Handbuch ist ein Beispiel wo automatische Querverweisnamen verwendet werden.
\end_layout
\begin_layout Subsection \begin_layout Subsection
Querverweis-Position Querverweis-Position
\begin_inset CommandInset label \begin_inset CommandInset label