# Define page layout in geometry similar to Koma Script with DIV 12

I want to define a page layout in geometry that has similar values as that defined by KOMA script. Unfortunately the values that I provide for geometry do not end up in the design as expected.

This is the code that I use

\documentclass{scrbook}

\usepackage{layouts}

%\KOMAoptions{%
%  DIV=12,% (Size of Text Body, higher values = greater textbody)
%  % DIV=calc % (also areaset/classic/current/default/last)
%  % -> after setting of spacing necessary!
%  BCOR=10mm% (binding correction)
%}%
%
%\KOMAoptions{% (most options are for package typearea)
%  twoside=true, % two side layout (alternating margins, standard in books)
%  twocolumn=false, % (true)
%  %
%  footinclude=false,%
%  mpinclude=false,%
%  footsepline=false,%
%}%

\usepackage{geometry}

\geometry{%
%%% Paper Groesse
a4paper,
portrait,
%%% Koerper Groesse
textwidth=430pt,    % modifies \textwidth, the width of body
textheight=610pt,   % modifies \textheight, the height of body
%ignoreall,    % sets both ignoreheadfoot and ignoremp to true
heightrounded, % This option rounds \textheight to n-times (n: an integer) of \baselineskip
%%% Margin
inner=4pt,
outer=22pt,
twoside,      % switches on twoside mode with left and right margins swapped on verso pages.
bindingoffset=10mm,  % removes a specified space for binding
%%% Dimensionen
twoside,
}

\begin{document}
\pagenumbering{alph}
\pagestyle{empty}
\currentpage
\pagediagram
\pagevalues
\end{document}


For the KOMA script values (geometry commented out) this gives me

but for geometry, where I try to define exactly these values especially the margins (even, odd) end up completely different, but also the whole text area is positioned different. I do not expect to have a layout that achieves exactly the same page content, but it should be close.

How do I need to modify the values for geometry to get a similar layout? And why is it ending up so wrong with the current values?

You are setting to much values and geometry warns you:

Package geometry Warning: Over-specification in h'-direction.
width' (430.0pt) is ignored.


Remove one of the inner/outer values and calculate the other from \oddsidemargin and bindingoffset:

\geometry{%
a4paper,
portrait,
textwidth=418.25555pt,    % modifies \textwidth, the width of body
textheight=610pt,   % modifies \textheight, the height of body
heightrounded,
inner=\dimexpr1in-12.5192pt-10mm\relax,
twoside,
bindingoffset=10mm,

• Why did you change the textwidth? I tried your code, but it gives me evenmargin=47, oddmargin=-12.5, whereas I want 22.6 and 3.6. The result is, that the inner space between page border and textbody is smaller with geometry. Also the textbody start about 1 line above the textbody of typearea. How can I view the result of \dimexpr1in-12.5192pt-10mm\relax ? – Matthias Pospiech Jun 29 '14 at 11:20
• I changed the textwidth to get the identical value I got with KOMa (after commenting the \geometry command and the geometry package). And don't confuse \oddsidemargin and "inner margin of odd sides". Look up the geometry documentation. It describes how inner is calculated. – Ulrike Fischer Jun 29 '14 at 11:25
• The inner/outer problem could be solved with textwidth=426.8pt and inner=\dimexpr1in-10mm+3.6pt\relax. No the top position is still one line too high. – Matthias Pospiech Jun 29 '14 at 11:44
• With manual tweeking one can set top = 107.82pt which is very close to the \topmargin of typearea. But I would like to know if this can be calculated from the other values more elegant. – Matthias Pospiech Jun 29 '14 at 11:58