]> git.lyx.org Git - lyx.git/blobdiff - lib/templates/thesis/chapter-2.lyx
thesis template: port recent changes to master
[lyx.git] / lib / templates / thesis / chapter-2.lyx
index f267c85576b070b7ffb81aa1c4ab575987898803..d681c28508a8e6b5547c04a1b8088c641753d4b9 100644 (file)
@@ -4,26 +4,27 @@
 \begin_header
 \textclass scrbook
 \begin_preamble
-% increase link area for cross-references and autoname them
-\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
-\newlength{\abc}
-\settowidth{\abc}{\space}
+% 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{%
-\addto\extrasenglish{
- \renewcommand{\equationautorefname}{\hspace{-\abc}}
+ \renewcommand{\ref}[1]{\mbox{\autoref{#1}}}
+}
+\def\refnamechanges{%
+ \renewcommand*{\equationautorefname}[1]{}
  \renewcommand{\sectionautorefname}{sec.\negthinspace}
  \renewcommand{\subsectionautorefname}{sec.\negthinspace}
  \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
  \renewcommand{\figureautorefname}{Fig.\negthinspace}
  \renewcommand{\tableautorefname}{Tab.\negthinspace}
 }
-}
+\@ifpackageloaded{babel}{\addto\extrasenglish{\refnamechanges}}{\refnamechanges}
 
-% in case somebody want to have the label "Gleichung"
-%\renewcommand{\eqref}[1]{Gleichung~(\negthinspace\autoref{#1})}
+% in case somebody want to have the label "Equation"
+%\renewcommand{\eqref}[1]{Equation~(\negthinspace\autoref{#1})}
 
-% put the link to figure floats to the beginning
-% of the figure and not to its end
+% that links to image floats jumps to the beginning
+% of the float and not to its caption
 \usepackage[figure]{hypcap}
 
 % the pages of the TOC is numbered roman
   \myTOC
   \mainmatter }
 
-% make caption labels bold
+% makes caption labels bold
+% for more info about these settings, see
+% http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguien.pdf
 \setkomafont{captionlabel}{\bfseries}
 \setcapindent{1em}
 
-% enable calculations
+% enables calculations
 \usepackage{calc}
 
 % fancy page header/footer settings
+% for more information see section 9 of
+% ftp://www.ctan.org/pub/tex-archive/macros/latex2e/contrib/fancyhdr/fancyhdr.pdf
 \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
 \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
 
-% increase the bottom float placement fraction
+% increases the bottom float placement fraction
 \renewcommand{\bottomfraction}{0.5}
 
-% avoid that floats are placed above its sections
+% avoids that floats are placed above its sections
 \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
 \end_preamble
 \options intoc,bibliography=totoc,index=totoc,BCOR10mm,captions=tableheading,titlepage,fleqn