6

I have the following code:

\documentclass[12pt, a4paper] {article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}


\begin{document}

\vspace*{1cm}
\begin{center}
\textbf{Text of Certification}\\
\end{center}
I hereby confirm that the Bachelor Thesis presented by me has been prepared independently, using no other sources, resources and other aids than those mentioned. All parts - literally or by their meaning - taken from published or non-published sources are credited as such. The Bachelor Thesis in its current or similar form has never been submitted as a graded assignment.\\
\noindent\makebox[3cm]{\hrulefill} \hfill\makebox[3cm]{\hrulefill}\\
\noindent\makebox[3cm][l]{Date} \hfill\makebox[3cm][l]{Signature}\\
\thispagestyle{empty}
\clearpage


\end{document}

That will produce the following output:

enter image description here

I want to drag down the drawn boxes for additional space for the actual signature and date. I tried using the \vspace command again, but encounter the following problem, with the code as follows:

\documentclass[12pt, a4paper] {article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}


\begin{document}

\vspace*{1cm}
\begin{center}
\textbf{Text of Certification}\\
\end{center}
I hereby confirm that the Bachelor Thesis presented by me has been prepared independently, using no other sources, resources and other aids than those mentioned. All parts - literally or by their meaning - taken from published or non-published sources are credited as such. The Bachelor Thesis in its current or similar form has never been submitted as a graded assignment.\\
\vspace{2cm}
\noindent\makebox[3cm]{\hrulefill} \hfill\makebox[3cm]{\hrulefill}\\
\noindent\makebox[3cm][l]{Date} \hfill\makebox[3cm][l]{Signature}\\
\thispagestyle{empty}
\clearpage


\end{document}

I produce the following output:

enter image description here

So I'm not sure why only the second line of makeboxes is dragged down. \vspace*{2cm} produces the same output. I surely would like to have the horizontal line further down as well.

4
  • @cfr Before the spacing command
    – egreg
    Commented Dec 30, 2014 at 21:40
  • @egreg ?? Why before?
    – cfr
    Commented Dec 30, 2014 at 21:43
  • @cfr: \vspace is also considered (or stored until) you are in vertical mode. Placing \par after \vspace just "doesn't sit right" even though the output may be the same.
    – Werner
    Commented Dec 30, 2014 at 21:52
  • @Werner It isn't that I don't believe you, but that's not a reason ;)!
    – cfr
    Commented Dec 30, 2014 at 22:00

1 Answer 1

7
\documentclass[12pt, a4paper] {article}

\begin{document}
  \vspace*{1cm}
  \begin{center}
    \textbf{Text of Certification}\\
  \end{center}
  I hereby confirm that the Bachelor Thesis presented by me has been prepared independently, using no other sources, resources and other aids than those mentioned. All parts - literally or by their meaning - taken from published or non-published sources are credited as such. The Bachelor Thesis in its current or similar form has never been submitted as a graded assignment.

  \vspace{2cm}

  \noindent\makebox[3cm]{\hrulefill} \hfill\makebox[3cm]{\hrulefill}

  \noindent\makebox[3cm][l]{Date} \hfill\makebox[3cm][l]{Signature}

  \thispagestyle{empty}
  \clearpage
\end{document}

space before lines

4
  • There's a \\ to be removed; it's always better if \vspace is between paragraphs; a blank line before it suffices. The reason lies precisely in what is happening to the OP.
    – egreg
    Commented Dec 30, 2014 at 21:44
  • @egreg Why, though? I tried to generate something strange by putting it afterwards, but couldn't come up with anything.
    – cfr
    Commented Dec 30, 2014 at 21:49
  • thanks @cfr. didn't know there's a difference between \\ and paragraphs, also wasn't aware of the necessary blank line.
    – mt1111
    Commented Dec 30, 2014 at 22:58
  • @marinko Generally, you should avoid using \\\ except in particular environments e.g. tables or the center environment, because it doesn't do everything which a new paragraph should do.
    – cfr
    Commented Dec 30, 2014 at 23:04

You must log in to answer this question.

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