4

I worked on my title page, and there is some undesired vertical space before a tabular environment. I made two fboxes to illustrate the vertical distance I wanted to be the same 116 pt. But after the second box, a tabular environment starts and I assume it adds some vertical space before itself. This could be removed manually via \vspace*{-6pt}, but I am curious where does it come from?

\documentclass[a4paper, 12pt, headsepline, headings=small,]{scrreprt}
\overfullrule=1mm
\usepackage[onehalfspacing]{setspace}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,showframe]{geometry}
\geometry{left=2cm,right=2cm,top=2cm,bottom=2cm}


\newenvironment{tightcenter}{%
  \setlength\topsep{0pt}
  \setlength\parskip{0pt}
  \begin{center}
}{%
  \end{center}
}

\begin{document}
% \topskip= x pt  % 12 pt in scrreprt
\vspace*{12 pt} % so in effect 24 pt
\begin{tightcenter}
Title \\
Title more info \\
Title more info \\
\fbox{\begin{minipage}{116 pt}  \hfill\vspace{116 pt}\end{minipage}}\\
%\vspace{116 pt}
\Large\textbf{\textrm{Huge Title Huge Title Huge Title Huge Title Title Huge}} 
\fbox{\begin{minipage}{116 pt}\hfill\vspace{116 pt}\end{minipage}}
%\vspace{116 pt}
\end{tightcenter} 
% \vspace*{-6pt}
\noindent\begin{tabular}{p{3cm}p{3.75cm}l}
& Advisor: & text text text\\ 
& More info: & text text text\\
& More info: & text text text\\
& More info: & text text text\\
\end{tabular}

\end{document}

Can I somehow remove this space other than using a negative vspace?

Thanks.

2 Answers 2

4

If you want to suppress the vertical spacing around tightcenter, the best way is not using center

\newenvironment{tightcenter}
 {\par\centering}
 {\par}
2
  • this is better than before, but if you compare the distance from the last 'Title more info` to the first fbox, and from the second fbox to the line 'Advisor: ...' there is still a little difference
    – TomM
    Dec 28, 2013 at 14:40
  • 1
    @TomM That's due to the \strut inserted by tabular in every row and the \lineskip glue.
    – egreg
    Dec 28, 2013 at 14:44
3

that is the default vertical skip after the center environment. Try:

[...]
}{%
  \end{center}
  \vspace{-\lastskip}%
}
[...]
4
  • you meant inside the tightcenter environment correct? That didn't change the vertical distance in the MWE
    – TomM
    Dec 28, 2013 at 14:36
  • 1
    use a \fbox for the tabular and you'll see the difference! However, Enrico's solution is the better one.
    – user2478
    Dec 28, 2013 at 14:37
  • great tip, I realized the remaining space comes from inside the tabular...so the only way to reduce this completely seems to be with the negative vspace.
    – TomM
    Dec 28, 2013 at 14:42
  • Thanks again. I accepted his solution because you said it is better. Otherwise it would have been your call because you were first and both solutions are working.
    – TomM
    Dec 28, 2013 at 14:48

You must log in to answer this question.

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