4

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)
%  %
%  headinclude=false,%
%  footinclude=false,%
%  mpinclude=false,%    
%  headsepline=true,%
%  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
   headheight=17pt,  % Alias:  head
   twoside,
}


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

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

enter image description here

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.

enter image description here

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?

1 Answer 1

6

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,  
   headheight=17pt,  % Alias:  head
   twoside,
}
5
  • 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 ? Commented Jun 29, 2014 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. Commented Jun 29, 2014 at 11:25
  • If I do the same I get 426.79 as posted in the image above (and not 418). I looked up how inner is calculated, but can only find that it has a fixed ration to the outer. Which means that I can not define both manually?. From the pictures it looks like inner=1inch+oddsidemargin. From the code one can find out that the bindingoffset seems to be added to inner. Commented Jun 29, 2014 at 11:36
  • 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. Commented Jun 29, 2014 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. Commented Jun 29, 2014 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .