From 5ce0c1330b7ccdc5ffdf80113ea10be20477cf3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 12 Feb 2012 14:46:23 +0000 Subject: [PATCH] thesis files: Fixed preamble code for automatic reference naming git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40735 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/templates/thesis/Appendix.lyx | 8 ++---- lib/templates/thesis/chapter-1.lyx | 44 ++++++++++++++++++++++++------ lib/templates/thesis/chapter-2.lyx | 8 ++---- lib/templates/thesis/thesis.lyx | 8 ++---- status.20x | 7 +++-- 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/lib/templates/thesis/Appendix.lyx b/lib/templates/thesis/Appendix.lyx index 7f2d8269e5..770f8be620 100644 --- a/lib/templates/thesis/Appendix.lyx +++ b/lib/templates/thesis/Appendix.lyx @@ -6,18 +6,14 @@ \begin_preamble % Linkfläche für Querverweise vergrößern und automatisch benenne \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} -\newlength{\abc} -\settowidth{\abc}{\space} -\AtBeginDocument{% -\addto\extrasngerman{ - \renewcommand{\equationautorefname}{\hspace{-\abc}} +\addto\extrasenglish{% + \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{Kap.\negthinspace} \renewcommand{\subsectionautorefname}{Kap.\negthinspace} \renewcommand{\subsubsectionautorefname}{Kap.\negthinspace} \renewcommand{\figureautorefname}{Abb.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } -} % für den Fall, dass jemand die Bezeichnung "Gleichung" haben will %\renewcommand{\eqref}[1]{Gleichung~(\negthinspace\autoref{#1})} diff --git a/lib/templates/thesis/chapter-1.lyx b/lib/templates/thesis/chapter-1.lyx index 9e61f99cfa..ec12714c7c 100644 --- a/lib/templates/thesis/chapter-1.lyx +++ b/lib/templates/thesis/chapter-1.lyx @@ -6,18 +6,14 @@ \begin_preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} -\newlength{\abc} -\settowidth{\abc}{\space} -\AtBeginDocument{% -\addto\extrasenglish{ - \renewcommand{\equationautorefname}{\hspace{-\abc}} +\addto\extrasenglish{% + \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } -} % in case somebody want to have the label "Gleichung" %\renewcommand{\eqref}[1]{Gleichung~(\negthinspace\autoref{#1})} @@ -286,11 +282,18 @@ Overview \end_layout \begin_layout Standard -bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla - bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla +bla bla bla bla bla bla bla bla bla bla bla, see +\begin_inset CommandInset ref +LatexCommand ref +reference "sec:The-next-section" + +\end_inset + +. + Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla - bla bla bla bla DLC-coatings + bla bla bla bla bla bla bla bla bla bla bla DLC-coatings \begin_inset CommandInset nomenclature LatexCommand nomenclature symbol "DLC" @@ -308,10 +311,33 @@ key "Fowl1928" \end_inset . + +\begin_inset CommandInset ref +LatexCommand eqref +reference "eq:Integral-sine" + +\end_inset + + is the definition of the integral sine function. +\begin_inset Formula +\begin{equation} +\int\frac{\sin(x)}{x}\,\mathrm{d}x=\mathrm{Si}(x)\label{eq:Integral-sine} +\end{equation} + +\end_inset + + \end_layout \begin_layout Section The next section +\begin_inset CommandInset label +LatexCommand label +name "sec:The-next-section" + +\end_inset + + \end_layout \begin_layout Standard diff --git a/lib/templates/thesis/chapter-2.lyx b/lib/templates/thesis/chapter-2.lyx index f267c85576..3d67116052 100644 --- a/lib/templates/thesis/chapter-2.lyx +++ b/lib/templates/thesis/chapter-2.lyx @@ -6,18 +6,14 @@ \begin_preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} -\newlength{\abc} -\settowidth{\abc}{\space} -\AtBeginDocument{% -\addto\extrasenglish{ - \renewcommand{\equationautorefname}{\hspace{-\abc}} +\addto\extrasenglish{% + \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } -} % in case somebody want to have the label "Gleichung" %\renewcommand{\eqref}[1]{Gleichung~(\negthinspace\autoref{#1})} diff --git a/lib/templates/thesis/thesis.lyx b/lib/templates/thesis/thesis.lyx index 168ef0f138..3018c2055b 100644 --- a/lib/templates/thesis/thesis.lyx +++ b/lib/templates/thesis/thesis.lyx @@ -6,18 +6,14 @@ \begin_preamble % increase link area for cross-references and autoname them \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} -\newlength{\abc} -\settowidth{\abc}{\space} -\AtBeginDocument{% -\addto\extrasenglish{ - \renewcommand{\equationautorefname}{\hspace{-\abc}} +\addto\extrasenglish{% + \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace} \renewcommand{\figureautorefname}{Fig.\negthinspace} \renewcommand{\tableautorefname}{Tab.\negthinspace} } -} % in case somebody want to have the label "equation" %\renewcommand{\eqref}[1]{equation~(\negthinspace\autoref{#1})} diff --git a/status.20x b/status.20x index 6ed74b6439..707e4650fa 100644 --- a/status.20x +++ b/status.20x @@ -234,8 +234,11 @@ What's new - Fixed description in the example file multicol.lyx (bug 7953). -- Fixed description of Automatic Reference Naming in the Embedded Objects - manual. +- Fixed description of automatic reference naming in sec. 3.4.2 of the + Embedded Objects manual. + +- Fixed preamble code for automatic reference naming in the thesis template + files. - Fixed example file modernCV.lyx: corrected subsection example, added a separator, set the page size to A4 (bug 7991). -- 2.39.5