0

I'm trying to ad a bit of vertical space at the beginning of a page. Here is a MWE:

\documentclass[a4paper,footsepline, headsepline]{scrartcl}

\usepackage[automark]{scrlayer-scrpage}

\begin{document} \vspace{0mm}% \section{Header} \end{document}

After a bit of searching i found another question about the same problem. The culprit there is the the \topsep that gets added. The solution was to disable interlineskip with either \offinterlineskip or \nointerlineskip.

The problem hereby is that macro is a global toggle and disables it globally.

Now my question is: Can i somehow only disable it locally for this one spacing? I don't want to accidentally break something else in the process and want to have the most idiomatic way to do it just for that one vspace.

Edit: Title wording

  • no, \offinterlineskip is global \nointerlinskip just affects the next box – David Carlisle Mar 29 '22 at 11:51
  • \offinterlineskip is local in plain TeX and it seems that it is defined equivalently in latex.ltx. It is used for example in tables: locally in given \vbox but affects all lines. – wipet Mar 29 '22 at 11:57
  • II am a little lost in how to use these commands exactly since just putting them before/after my \vspace* won't change anything. – AcademicCoder Mar 29 '22 at 12:05
  • @AcademicCoder no because the section command will itself be adding space. It's not at all clear what effect you want, perhaps \vspace*{-\topskip} ?? – David Carlisle Mar 29 '22 at 13:07
  • ah as @wipet said, both are local declarations (ie respect tex groups) I used global here in I think the sense you meant that (unlike \nointerlineskip ) \offinterlineskip affects all following boxes, and if used as you show at the top level of the document would affect the rest of the document. – David Carlisle Mar 29 '22 at 13:13
  • @DavidCarlisle yes, that's what i meant with "global" as it affects everything that follows like a toggle. I am not a friend of that toggle-style since it can unintended behaviour in the rest of the document. I think working with \vspace*{-\topskip + <fixed sep>} is the way to go here in my case. – AcademicCoder Mar 29 '22 at 13:25
  • The problem wasn't solved really by that. Neither adding \offinterlineskip, \nointerlineskip, \setlength{\topskip}{0pt} (or any combination) with \vspace*{0pt} produced no vertical space above the section. Even with not setting \topskip to 0pt and haveing a \vspace*{-\topskip} didn't got rid of the space ... i am clueless – AcademicCoder Mar 29 '22 at 14:47

0 Answers0