From baf48453e7bacf128521f377390a51097321c680 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sun, 18 Nov 2012 15:54:13 +0100 Subject: [PATCH] thesis template: add check for babel (as discussed in bug #8423) --- lib/templates/thesis/Appendix.lyx | 3 +++ lib/templates/thesis/chapter-1.lyx | 3 +++ lib/templates/thesis/chapter-2.lyx | 3 +++ lib/templates/thesis/thesis.lyx | 3 +++ 4 files changed, 12 insertions(+) diff --git a/lib/templates/thesis/Appendix.lyx b/lib/templates/thesis/Appendix.lyx index 6016557c33..7e535e097e 100644 --- a/lib/templates/thesis/Appendix.lyx +++ b/lib/templates/thesis/Appendix.lyx @@ -5,7 +5,10 @@ \textclass scrbook \begin_preamble % increases link area for cross-references and autoname them +% if you change the document language to e.g. French +% you must change "extrasenglish" to "extrasfrench" \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} +\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} \addto\extrasenglish{% \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} diff --git a/lib/templates/thesis/chapter-1.lyx b/lib/templates/thesis/chapter-1.lyx index 52248f95b4..5421e22c5a 100644 --- a/lib/templates/thesis/chapter-1.lyx +++ b/lib/templates/thesis/chapter-1.lyx @@ -5,7 +5,10 @@ \textclass scrbook \begin_preamble % increases link area for cross-references and autoname them +% if you change the document language to e.g. French +% you must change "extrasenglish" to "extrasfrench" \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} +\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} \addto\extrasenglish{% \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} diff --git a/lib/templates/thesis/chapter-2.lyx b/lib/templates/thesis/chapter-2.lyx index b52f714609..c810a153b7 100644 --- a/lib/templates/thesis/chapter-2.lyx +++ b/lib/templates/thesis/chapter-2.lyx @@ -5,7 +5,10 @@ \textclass scrbook \begin_preamble % increases link area for cross-references and autoname them +% if you change the document language to e.g. French +% you must change "extrasenglish" to "extrasfrench" \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} +\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} \addto\extrasenglish{% \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} diff --git a/lib/templates/thesis/thesis.lyx b/lib/templates/thesis/thesis.lyx index 580f94e8a1..82f26ac799 100644 --- a/lib/templates/thesis/thesis.lyx +++ b/lib/templates/thesis/thesis.lyx @@ -5,7 +5,10 @@ \textclass scrbook \begin_preamble % increases link area for cross-references and autoname them +% if you change the document language to e.g. French +% you must change "extrasenglish" to "extrasfrench" \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} +\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} \addto\extrasenglish{% \renewcommand*{\equationautorefname}[1]{} \renewcommand{\sectionautorefname}{sec.\negthinspace} -- 2.39.5