From dc55b68b26c870c4269566ba101a1b920fc69429 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 6 Jul 2008 16:20:15 +0000 Subject: [PATCH] =?utf8?q?UserGuide.lyx:=20better=20description=20of=20ind?= =?utf8?q?ex=20entry=20programs=20by=20J=C3=BCrgen=20and=20me?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25462 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/doc/UserGuide.lyx | 156 +++++++++++++++++++++++++++++++++-- lib/doc/fr/Customization.lyx | 2 +- lib/doc/fr/UserGuide.lyx | 9 +- 3 files changed, 155 insertions(+), 12 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 360f125eed..366d37c21b 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -41,6 +41,9 @@ % define a short command for \textvisiblespace \newcommand{\spce}{\textvisiblespace} +% macro for italic page numbers in the index +\newcommand{\IndexDef}[1]{\textit{#1}} + % redefine the greyed out note \renewenvironment{lyxgreyedout} {\textcolor{blue}\bgroup}{\egroup} @@ -26105,16 +26108,16 @@ This is an italic dummy entry \begin_layout Standard \series bold -old-style page number:|oldstylenums +italic page number:|textit \end_layout \begin_layout Standard -to get the page number in an old-style layout. +to get the page number in italic. \begin_inset Index status open \begin_layout Plain Layout -Dummy entries ! old-style page number:|oldstylenums +Dummy entries ! italic page number:|textit \end_layout \end_inset @@ -26157,11 +26160,133 @@ reference "sub:LaTeX-Syntax" to learn more about the LaTeX-syntax. \end_layout +\begin_layout Standard +\begin_inset Note Greyedout +status open + +\begin_layout Plain Layout + +\series bold +Note: +\series default + Formatting single index entries only works when you use the program +\family sans +makeindex +\family default +to generate the index, see section +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "sub:Index-Program" + +\end_inset + +. + If you use +\family sans +xindy +\family default +, however, this won't work for anything else than bold or italic text. + This is because xindy requires to define semantic elements before they + can be used, see +\begin_inset CommandInset citation +LatexCommand cite +after "p. 678 ff." +key "latexcompanion" + +\end_inset + + for details. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +In general, we encourage you to not format page numbers directly as shown + above. + Instead of this, you should define a macro in the preamble and use that. + Consider why you want some page numbers to be bold. + Maybe you want all page references italic that refer to a definition of + the indexed term, so that users can easily find definitions. + If so, put the following in preamble +\end_layout + +\begin_layout Standard + +\series bold + +\backslash +newcommand{ +\backslash +IndexDef}[1]{ +\backslash +textit{#1}} +\end_layout + +\begin_layout Standard +and write +\end_layout + +\begin_layout Standard + +\series bold +my entry|IndexDef +\end_layout + +\begin_layout Standard +into the index entry. +\begin_inset Index +status open + +\begin_layout Plain Layout +Dummy entries ! my entry|IndexDef +\end_layout + +\end_inset + + The advantage is that, if you change your mind later or if your publisher + request that definitions must not be italic but bold, you just need to + change the macro in the preamble, not every single index entry. +\end_layout + \begin_layout Standard You can also change the layout for the whole index. - E.g. - we marked the index list box of this document as bold to get a bold font + E. +\begin_inset space \thinspace{} +\end_inset + +g. +\begin_inset space ~ +\end_inset + +we marked the index list box of this document as bold to get a bold font for all index entries. + For more advanced task you have to set up a so-called +\emph on +Index Style File +\emph default +, see the +\family sans +makeindex +\family default + or +\family sans +xindy +\family default + documentation for details, +\begin_inset CommandInset citation +LatexCommand cite +key "makeindex,xindy" + +\end_inset + +. \end_layout \begin_layout Subsection @@ -26217,10 +26342,26 @@ key "makeindex,xindy" \end_inset . + You can also specify there another program to generate the index. \end_layout \begin_layout Standard -You can also specify there another program to generate the index. + +\family sans +makeindex +\family default + is very old, not further developed and has many pitfalls. + Most notably, it has been defined with nothing more than the English language + in mind. + So it fails at sorting correctly for anything else than an monolingual + English text. + We have shown above how to fix this sorting. + However, if you are writing in another language and using Linux, consider + to use +\family sans +xindy +\family default +. \end_layout \begin_layout Section @@ -26361,8 +26502,7 @@ status open \series bold Note: \series default - Like for the index entry dialog, you have to enter valid LaTeX-code for - all fields of the nomenclature dialog. + You have to enter valid LaTeX-code for all fields of the nomenclature dialog. \end_layout \end_inset diff --git a/lib/doc/fr/Customization.lyx b/lib/doc/fr/Customization.lyx index 402010017e..8a169d8eb1 100644 --- a/lib/doc/fr/Customization.lyx +++ b/lib/doc/fr/Customization.lyx @@ -1,5 +1,5 @@ #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 337 +\lyxformat 338 \begin_document \begin_header \textclass scrbook diff --git a/lib/doc/fr/UserGuide.lyx b/lib/doc/fr/UserGuide.lyx index 12e1814e75..4ee9c2e6fe 100644 --- a/lib/doc/fr/UserGuide.lyx +++ b/lib/doc/fr/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 337 +\lyxformat 338 \begin_document \begin_header \textclass scrbook @@ -41,6 +41,9 @@ % define a short command for \textvisiblespace \newcommand{\spce}{\textvisiblespace} +% macro for italic page numbers in the index +\newcommand{\IndexDef}[1]{\textit{#1}} + % redefine the greyed out note \renewenvironment{lyxgreyedout} {\textcolor{blue}\bgroup}{\egroup} @@ -27515,8 +27518,8 @@ status open \series bold Note: \series default - Comme pour les entrées d'index, on doit taper du code LaTeX valide dans - tous les champs de la fenêtre de dialogue de glossaire. + On doit taper du code LaTeX valide dans tous les champs de la fenêtre de + dialogue de glossaire. \end_layout \end_inset -- 2.39.5