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

better interaction with geometry

- settings are more relative, allowing it to adapt better to papersize
- loading is defered untill `AtBeginDocument`, allowing the user to load and
  modify the package if he chooses.
parent 62348a21
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
## [Current]
### Changed
- the margins are now set using relative values, which makes them adapt to different paper sizes
## Fixed
- `geometry` is now deferred until `AtBeginDocument`, which allows the user to load and modify the package in his preamble
## [2.0]
### Changed
......
......@@ -104,13 +104,12 @@
%
%<*article|report>
% required for changing layout
\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
\PassOptionsToPackage{vmargin=5\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry}
\if@todos
\PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
\else
\PassOptionsToPackage{nomarginpar}{geometry}
\fi
\RequirePackage{geometry}
%
% language specific localisation
\if@german
......@@ -313,7 +312,8 @@
%% load config at beginning of document
\AtBeginDocument{
\makeatletter
%<^*standalone>
%<!standalone> \RequirePackage{geometry}
%<*!standalone>
% solve some common errors:
\@ifpackageloaded{biblatex}{
% solves fontype warning in San-Serif
......@@ -322,7 +322,7 @@
\@ifpackageloaded{subfigure}{
\newcommand{\subfigureautorefname}{\figureautorefname}
}{}
%<^*standalone>
%</!standalone>
\InputIfFileExists{config.tex}{
\ClassInfo{\myClassName}{config.tex was found. Using it...}
}{
......
......@@ -82,13 +82,12 @@
\RequirePackage{graphicx}
\RequirePackage{amsmath}
\if@german\RequirePackage{ziffer}\fi
\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
\PassOptionsToPackage{vmargin=5\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry}
\if@todos
\PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
\else
\PassOptionsToPackage{nomarginpar}{geometry}
\fi
\RequirePackage{geometry}
\if@german
\PassOptionsToPackage{ngerman}{babel}
\else
......@@ -218,6 +217,7 @@
%% load config at beginning of document
\AtBeginDocument{
\makeatletter
\RequirePackage{geometry}
\@ifpackageloaded{biblatex}{
\renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}}
}{}
......
......@@ -82,13 +82,12 @@
\RequirePackage{graphicx}
\RequirePackage{amsmath}
\if@german\RequirePackage{ziffer}\fi
\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
\PassOptionsToPackage{vmargin=5\baselineskip,bindingoffset=0.08\paperwidth,textwidth=0.75\paperwidth}{geometry}
\if@todos
\PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
\else
\PassOptionsToPackage{nomarginpar}{geometry}
\fi
\RequirePackage{geometry}
\if@german
\PassOptionsToPackage{ngerman}{babel}
\else
......@@ -234,6 +233,7 @@
%% load config at beginning of document
\AtBeginDocument{
\makeatletter
\RequirePackage{geometry}
\@ifpackageloaded{biblatex}{
\renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}}
}{}
......
......@@ -91,12 +91,6 @@
%% load config at beginning of document
\AtBeginDocument{
\makeatletter
\@ifpackageloaded{biblatex}{
\renewcommand*{\mkbibacro}[1]{\MakeUppercase{#1}}
}{}
\@ifpackageloaded{subfigure}{
\newcommand{\subfigureautorefname}{\figureautorefname}
}{}
\InputIfFileExists{config.tex}{
\ClassInfo{\myClassName}{config.tex was found. Using it...}
}{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment