Skip to content
Snippets Groups Projects
Commit ba5722bf authored by Jan Wille's avatar Jan Wille
Browse files

move some settings from `HsH-classes.cfg` to class files

parent f92e4360
Branches
Tags
No related merge requests found
......@@ -171,7 +171,7 @@
\RequirePackage[main=\HsH@opt@language]{babel}
\RequirePackage[autostyle=true]{csquotes}
\MakeOuterQuote{"}
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}%
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}
\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks'
\RequirePackage{bookmark}
\AtBeginDocument{
......@@ -199,7 +199,6 @@
\RequirePackage{graphicx}
\RequirePackage{amsmath,amssymb,amsfonts}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{scrhack}
\PassOptionsToPackage{backend=biber}{biblatex}
\AtBeginDocument{
\makeatletter
......@@ -209,6 +208,26 @@
\makeatother
}
\PassOptionsToPackage{free-standing-units}{siunitx}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{siunitx}{
\iflanguage{ngerman}{
\sisetup{output-decimal-marker={,}}
}{}
}{}
\makeatother
}
\RequirePackage{scrhack}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{biblatex}{
\RequirePackage{lstautogobble}\lstset{autogobble=true}
\iflanguage{ngerman}{
\lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1}
}{}
}{}
\makeatother
}
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
\AtBeginDocument{
\makeatletter
......
......@@ -14,9 +14,6 @@
}
}{}
\@ifpackageloaded{siunitx}{
\iflanguage{ngerman}{
\sisetup{output-decimal-marker={,}} % use comma as dezimal
}{}%
\sisetup{
tight-spacing=true,
per-mode=symbol,
......@@ -27,9 +24,6 @@
}
}{}
\@ifpackageloaded{listings}{
\PassOptionsToPackage{svgnames}{xcolor}
\RequirePackage{xcolor}
\RequirePackage{lstautogobble}
\lstset{
commentstyle=\color{gray},
keywordstyle=\color{FireBrick}\bfseries,
......@@ -37,9 +31,7 @@
showstringspaces=false,
basicstyle=\ttfamily,
tabsize=4,
literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1,
escapeinside={(*@}{@*)},
autogobble=true,
}
}{}
\@ifpackageloaded{enumitem}{
......
......@@ -861,7 +861,7 @@ http://www.latex-project.org/lppl.txt
% replacing it with some whitespace on printed version. Luckily loading the
% \pkg{ziffer} package sets this up to match the german standart.
% \begin{macrocode}
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}%
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}
% \end{macrocode}
%
%
......@@ -908,12 +908,6 @@ http://www.latex-project.org/lppl.txt
\RequirePackage[svgnames]{xcolor}
% \end{macrocode}
%
% For better compatibility with the \pkg{listings} package we load the
% \pkg{scrhack} package.
% \begin{macrocode}
\RequirePackage{scrhack}
% \end{macrocode}
%
% \subsubsection{Options for packages that could be loaded by the user}
% Some package are not always needed and potentially heavy to load in by default.
% But its still usefull to set default options for these packagese.
......@@ -921,6 +915,9 @@ http://www.latex-project.org/lppl.txt
% These differ from the settings provided in |HsH-classes.cfg| in that they are
% defaults that apply allway and not user-configurable preferences which are user
% or even project specific.
%
% For the \pkg{bibtex} we ensure the \emph{biber} backend is selcted, which matches
% the settings in |.latexmkrc|.
% \begin{macrocode}
%<*article|report>
\PassOptionsToPackage{backend=biber}{biblatex}
......@@ -932,7 +929,41 @@ http://www.latex-project.org/lppl.txt
\makeatother
}
%</article|report>
% \end{macrocode}
%
% For \pkg{bibtex} we load the free-stadnding units, mostly for backwards compatibility.
% We also ensure german language specific settings are applyed.
% \begin{macrocode}
\PassOptionsToPackage{free-standing-units}{siunitx}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{siunitx}{
\iflanguage{ngerman}{
\sisetup{output-decimal-marker={,}}
}{}
}{}
\makeatother
}
% \end{macrocode}
%
% For better compatibility with the \pkg{listings} package we load the
% \pkg{scrhack} package. We also pass some configurations to if if it gets loaded.
% \begin{macrocode}
\RequirePackage{scrhack}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{biblatex}{
\RequirePackage{lstautogobble}\lstset{autogobble=true}
\iflanguage{ngerman}{
\lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1}
}{}
}{}
\makeatother
}
% \end{macrocode}
%
% The \pkg{circuitikz} needs bo be configure so it matches typical european styles.
% \begin{macrocode}
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
% \end{macrocode}
%
......
No preview for this file type
......@@ -171,7 +171,7 @@
\RequirePackage[main=\HsH@opt@language]{babel}
\RequirePackage[autostyle=true]{csquotes}
\MakeOuterQuote{"}
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}%
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}
\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks'
\RequirePackage{bookmark}
\AtBeginDocument{
......@@ -199,7 +199,6 @@
\RequirePackage{graphicx}
\RequirePackage{amsmath,amssymb,amsfonts}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{scrhack}
\PassOptionsToPackage{backend=biber}{biblatex}
\AtBeginDocument{
\makeatletter
......@@ -209,6 +208,26 @@
\makeatother
}
\PassOptionsToPackage{free-standing-units}{siunitx}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{siunitx}{
\iflanguage{ngerman}{
\sisetup{output-decimal-marker={,}}
}{}
}{}
\makeatother
}
\RequirePackage{scrhack}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{biblatex}{
\RequirePackage{lstautogobble}\lstset{autogobble=true}
\iflanguage{ngerman}{
\lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1}
}{}
}{}
\makeatother
}
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
\AtBeginDocument{
\makeatletter
......
......@@ -104,7 +104,7 @@
\RequirePackage[main=\HsH@opt@language]{babel}
\RequirePackage[autostyle=true]{csquotes}
\MakeOuterQuote{"}
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}%
\iflanguage{ngerman}{\RequirePackage{ziffer}}{}
\RequirePackage[hidelinks]{hyperref} % must load before `bookmarks'
\RequirePackage{bookmark}
\AtBeginDocument{
......@@ -132,8 +132,27 @@
\RequirePackage{graphicx}
\RequirePackage{amsmath,amssymb,amsfonts}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{scrhack}
\PassOptionsToPackage{free-standing-units}{siunitx}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{siunitx}{
\iflanguage{ngerman}{
\sisetup{output-decimal-marker={,}}
}{}
}{}
\makeatother
}
\RequirePackage{scrhack}
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{biblatex}{
\RequirePackage{lstautogobble}\lstset{autogobble=true}
\iflanguage{ngerman}{
\lstset{literate={Ö}{{\"O}}1{Ä}{{\"A}}1{Ü}{{\"U}}1{ß}{{\ss}}1{ü}{{\"u}}1{ä}{{\"a}}1{ö}{{\"o}}1}
}{}
}{}
\makeatother
}
\PassOptionsToPackage{european,EFvoltages,straightvoltages,betterproportions}{circuitikz}
\AtBeginDocument{
\makeatletter
......
No preview for this file type
\documentclass[todos=off]{HsH-report}
\usepackage{lipsum}
\usepackage{siunitx}
% \usepackage{showframe}
%% documents personal data:
......@@ -40,6 +41,11 @@
A_1 = \sum_{i=0}^{10} B_i + \abs{\frac{x}{2}}
\end{equation}
\begin{equation}
\frac{4\,\m}{12\,\s} = \frac{1}{3}\,\unit{m\per s}
\end{equation}
\begin{itemize}
\item Hello World
\item test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment