From 82f40834ea0b3ffe082105d89029b00e9a0c6129 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Sun, 26 Nov 2017 22:19:00 +0100 Subject: [PATCH] fixed language settings and toc formatting --- bootstrap/lecture/bootstrap.tex | 1 + header.tex | 29 ++++++++++++++----- likelihood/lecture/likelihood.tex | 2 ++ plotting/lecture/plotting.tex | 2 +- pointprocesses/lecture/pointprocesses.tex | 2 ++ programmingstyle/lecture/programmingstyle.tex | 3 ++ regression/lecture/regression.tex | 2 ++ scientificcomputing-script.tex | 7 +++++ 8 files changed, 39 insertions(+), 9 deletions(-) diff --git a/bootstrap/lecture/bootstrap.tex b/bootstrap/lecture/bootstrap.tex index dcc7e2a..f56eecf 100644 --- a/bootstrap/lecture/bootstrap.tex +++ b/bootstrap/lecture/bootstrap.tex @@ -200,3 +200,4 @@ Bestimme die Signifikanz eines Korrelationskoeffizienten. \end{enumerate} \end{exercise} +\selectlanguage{english} diff --git a/header.tex b/header.tex index ec7e822..56efe89 100644 --- a/header.tex +++ b/header.tex @@ -8,8 +8,7 @@ % \newcommand{\tr}[2]{#1} % en % \usepackage[english]{babel} \newcommand{\tr}[2]{#1} % en -\usepackage[english, ngerman]{babel} -\selectlanguage{english} +\usepackage[ngerman,english]{babel} %%%% encoding %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc} @@ -18,6 +17,9 @@ \usepackage[left=25mm,right=25mm,top=20mm,bottom=30mm]{geometry} \usepackage{pslatex} % nice font for pdf file \usepackage[within=chapter]{newfloat} +\usepackage{tocloft} +\setlength{\cftfigindent}{1.2em} +\setlength{\cftfignumwidth}{2.6em} %%%%% section style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[sf,bf,it,big,clearempty]{titlesec} @@ -182,6 +184,10 @@ belowskip=2ex } \SetupFloatingEnvironment{lstlisting}{chapterlistsgaps=on} +% format list of listing exactly like list of figures: +\makeatletter +\let\l@lstlisting\l@figure +\makeatother %%%%%%%%%%%%% Table stuff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{multirow} @@ -269,12 +275,14 @@ % Innerhalb der exercise Umgebung ist enumerate umdefiniert, um (a), (b), (c), .. zu erzeugen. \usepackage{mdframed} \usepackage{xstring} +\newlistof{exercisef}{loe}{\tr{Exercises}{\"Ubungen}} \newcommand{\codepath}{} \DeclareFloatingEnvironment[ fileext=loe, - listname={\tr{Exercises}{\"Ubungen}}, + %listname={\tr{Exercises}{\"Ubungen}}, name={\tr{Exercise}{\"Ubung}}, - placement=t + placement=t, + chapterlistsgaps=on, ]{exercisef} \newcounter{maxexercise} \setcounter{maxexercise}{10000} % show listings up to exercise maxexercise @@ -300,7 +308,8 @@ \hypersetup{hypertexnames=true}% \end{mdframed}% \renewcommand{\theenumi}{\saveenumi}} - +\setlength{\cftexercisefindent}{1.2em} +\setlength{\cftexercisefnumwidth}{2.6em} %%%%% info box environment: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % usage: @@ -313,11 +322,12 @@ % % Info Box 1: Python % The cooler programming language. +\newlistof{iboxf}{lob}{\tr{Info Boxes and Topics}{Info- und Merk-Boxen}} \DeclareFloatingEnvironment[ fileext=lob, - listname={\tr{Info boxes and topics}{Info- und Merk-Boxen}}, name={Info-Box}, - placement=t + placement=t, + chapterlistsgaps=on, ]{iboxf} \newenvironment{ibox}[2][tp] {\SetupFloatingEnvironment{iboxf}{placement=#1}% @@ -331,6 +341,8 @@ \captionsetup{singlelinecheck=off,labelfont={normalsize,sf,bf},font={normalsize,sf}}}% {\end{mdframed}% \end{iboxf}} +\setlength{\cftiboxfindent}{1.2em} +\setlength{\cftiboxfnumwidth}{2.6em} %%%%% important environment: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -347,7 +359,8 @@ % fileext=loi, % listname={\tr{Important hints}{Merk-Boxen}}, % name={Merk-Box}, -% placement=t +% placement=t, +% chapterlistsgaps=on, % ]{importantf} \newenvironment{important}[1][]% {\captionsetup{singlelinecheck=off,hypcap=false,labelformat={empty},labelfont={large,sf,it,bf},font={large,sf,it,bf}} diff --git a/likelihood/lecture/likelihood.tex b/likelihood/lecture/likelihood.tex index ffc3afb..f4c12c4 100644 --- a/likelihood/lecture/likelihood.tex +++ b/likelihood/lecture/likelihood.tex @@ -305,3 +305,5 @@ haben, wenn ein Stimulus mit Orientierung $\phi$ anliegt, gegeben ist durch Die Log-Likelihood der Stimulusorientierung $\phi$ gegeben die Aktivit\"aten $r_1$, $r_2$, ... $r_n$ ist damit \[ {\cal L}(\phi|r_1, r_2, \ldots r_n) = \sum_{i=1}^n \log p_i(r_i|\phi) \] + +\selectlanguage{english} diff --git a/plotting/lecture/plotting.tex b/plotting/lecture/plotting.tex index 4199def..80d792c 100644 --- a/plotting/lecture/plotting.tex +++ b/plotting/lecture/plotting.tex @@ -512,7 +512,7 @@ listing\,\ref{regularsubplotlisting}) the \varcode{annotation} function allows to add some more advanced highlights like arrows, lines, elipses, or rectangles. Figure\,\ref{annotationsplot} shows some examples, the respective code can be found in -listing\,\ref{annoationsplotlisting}. For more options consult the +listing\,\ref{annotationsplotlisting}. For more options consult the documentation. \begin{figure}[ht] diff --git a/pointprocesses/lecture/pointprocesses.tex b/pointprocesses/lecture/pointprocesses.tex index 8f14f81..f4b4f8d 100644 --- a/pointprocesses/lecture/pointprocesses.tex +++ b/pointprocesses/lecture/pointprocesses.tex @@ -511,3 +511,5 @@ die Zellantwort mit dem STA verfaltet. genauso gro{\ss} ist wie der Originalstimulus aus der Datei \file{sta\_data.mat}. \end{exercise} + +\selectlanguage{english} diff --git a/programmingstyle/lecture/programmingstyle.tex b/programmingstyle/lecture/programmingstyle.tex index 9f6ed60..f74717b 100644 --- a/programmingstyle/lecture/programmingstyle.tex +++ b/programmingstyle/lecture/programmingstyle.tex @@ -441,3 +441,6 @@ achten!\footnote{Buchtip: Robert C. Martin: \textit{Clean Code: A \shortquote{First, solve the problem. Then, write the code.}{John Johnson} + + +\selectlanguage{english} diff --git a/regression/lecture/regression.tex b/regression/lecture/regression.tex index 0bc95a1..f7e3b47 100644 --- a/regression/lecture/regression.tex +++ b/regression/lecture/regression.tex @@ -420,3 +420,5 @@ einem Kurvenfit angeboten werden \matlabfun{lsqcurvefit()}. Parameter den Optimierungsprozess schwieriger und rechenaufw\"andiger macht. \end{important} + +\selectlanguage{english} diff --git a/scientificcomputing-script.tex b/scientificcomputing-script.tex index a71a5ad..a470765 100644 --- a/scientificcomputing-script.tex +++ b/scientificcomputing-script.tex @@ -8,16 +8,23 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} +\selectlanguage{english} + \hypersetup{pageanchor=false} \maketitle \hypersetup{pageanchor=true} \frontmatter +\clearpage \tableofcontents +\clearpage \listoffigures +\clearpage \lstlistoflistings +\clearpage \listofexercisefs +\clearpage \listofiboxfs