0

This famous question explains how you can reduce the empty useless spacing between listings or so, but now I'd like to do the same with center, which also has a big space here:

\documentclass{scrartcl}
\parskip3mm
\parindent0mm % if you want to have no lineskip

\usepackage{roboto} % font

\usepackage{lipsum}

\begin{document} \lipsum[1]:

\begin{center} \huge \robotoMedium{OBJECTION} \end{center}

\lipsum[1]

\lipsum[1]

\end{document}

preview

My aim is that it should read similar as if it was nearly one sentence, i.e.

Here I am describing my: Objection

I.e. the new line, size and centering should just be some highlighting, but not indicate a new paragraph e.g.

Tries

Of course I already tried the same solution as explained in the linked SE answer:

\documentclass{scrartcl}
\parskip3mm
\parindent0mm % if you want to have no lineskip

\newenvironment{centerCompact} { \begin{center} \setlength{\itemsep}{0pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} } { \end{center} }

\usepackage{roboto} % font

\usepackage{lipsum}

\begin{document} \lipsum[1]:

\begin{centerCompact} \huge \robotoMedium{OBJECTION} \end{centerCompact}

\lipsum[1]

\lipsum[1]

\end{document}

It improves the situation a bit, but does not fully solve it: preview 2

It's still too much.

rugk
  • 1,090
  • 1
  • 10
  • 27

2 Answers2

3

Firstly, you comment that you do not want it to appear as a separate paragraph, but you are explicitly marking a paragraph break before and after the centered text (which adds extra vertical space amongst other things) so removing that helps.

Then center is a one item list and lists are set off with \topsep vertical spacing so setting that to 0pt makes a tighter display.

Alternatively, for single line entries as shown in the second form you can keep it all in the same paragraph at the tex level using \\ rather than a display environment, and centering with \makebox.

enter image description here

\documentclass{scrartcl}
\parskip3mm
\parindent0mm % if you want to have no lineskip ??? (this doesn't affect \lineskip)

\usepackage{roboto} % font \setlength\topsep{0pt} \usepackage{lipsum}

\begin{document} \lipsum[1]: \begin{center} \huge \robotoMedium{OBJECTION} \end{center} \lipsum[1]:\[5pt] \makebox[\textwidth]{\Huge\robotoMedium{OBJECTION}}\ \lipsum[1]

\lipsum[1]

\end{document}

David Carlisle
  • 757,742
0

Of course, you can use \vspace to workaround that, I just doubt it is the best solution:

\documentclass{scrartcl}
\parskip3mm
\parindent0mm % if you want to have no lineskip

\usepackage{roboto} % font

\usepackage{lipsum}

\begin{document} \lipsum[1]:

\begin{center} \vspace{-20pt} \huge \robotoMedium{OBJECTION} \vspace{-10pt} \end{center}

\lipsum[1]

\lipsum[1]

\end{document}

preview

rugk
  • 1,090
  • 1
  • 10
  • 27