# Combine geometry and KOMA-Script’s DIV calculation (or: Make \newgeometry only set the explictitly given values)

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 …

-

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

\documentclass[DIV=12]{scrbook}
\setlength{\voffset}{0pt}
\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}
\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.

-
 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 May 10 '12 at 21:33 @Tobi: I think I misunderstood you … On the other hand: Try it out yourself with the MWE! – Speravir May 10 '12 at 22:57