6

I wonder if it is possible to combine geometry and the type area calculation of KOMA-Script. I’d like to use the calculated area but set (e.g.) the top margin to 1cm, without touching the other values. The problem is that \newgeometry set the explicitly given values (top=1cm) – which is desired – but it also sets the not given values (like bottom, left, right etc.) to geometry’s defaults.

An alternative question is:
How can I make \newgeometry set only the explictit given values?

\documentclass[DIV=calc]{scrartcl}

\usepackage[pass,showframe]{geometry}
\newgeometry{top=1cm}


\begin{document}
Text
\end{document}

Please edit the question title if you can provide a better one than I do …

1 Answer 1

2

I’m afraid, that’s not possible. But playing around with the top lengths (see e.g. https://tex.stackexchange.com/a/51497/9237) seems to work:

\documentclass[DIV=12]{scrbook}
\setlength{\voffset}{0pt}
%\addtolength{\voffset}{-1in}% hides the header line, too
\addtolength{\voffset}{-1cm}
\usepackage{blindtext}
\usepackage{showframe}
\begin{document}
\blinddocument
\end{document}

Note, that this approach will fail, if you initiate a later recalculation with \KOMAoption{DIV}{calc} or \KOMAoptions{DIV=calc}:

\documentclass[DIV=12]{scrbook}
\setlength{\voffset}{0pt}
\addtolength{\voffset}{-1cm}
\usepackage{kantlipsum}
\usepackage{showframe}
\begin{document}
\kant[1-4]
\pagebreak
\KOMAoption{DIV}{calc} % types out a warning
\kant[5-7]
\end{document}

If we had used DIV=calc already in first state, it would work, though, as I see.

2
  • Thanks. But this’ll only work for the example with setting the top margin, I guess. How about the other margins and values like footsep, marginparsep etc.
    – Tobi
    Commented May 10, 2012 at 21:33
  • @Tobi: I think I misunderstood you … On the other hand: Try it out yourself with the MWE!
    – Speravir
    Commented May 10, 2012 at 22:57

You must log in to answer this question.

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