Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 …

share|improve this question
add comment

1 Answer

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}
%\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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.