General\vspace Adding Space Not Where I want It.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
SaneAssasin
Posts: 14
Joined: Thu Feb 07, 2013 1:02 am

\vspace Adding Space Not Where I want It.

Post by SaneAssasin »

Hello!

I am trying to make an assignment sheet with 5cm of blank space after each question. When I compile the following document, however, the space is put elsewhere and not after the first question.

Code: Select all

\documentclass{article}
\title{Title}
\author{Author}
\date{7 February 2013}
\usepackage{amsmath}
\begin{document}
\maketitle
\setlength\parindent{0pt}
\renewcommand{\labelenumi}{\alph{enumi}.}
1) Integrate the following:
$$\int_{0}^{3\pi}x\frac{1}{x}dx$$
\vspace{5cm}%Where I want the space.
2) Differentiate the following:
$$sin(3x)$$
Any suggestions?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

\vspace Adding Space Not Where I want It.

Post by cgnieder »

Is this the actual code you're using? You're manually typing 1), 2) instead of using a list...?!

The space will work if you end the paragraph before it (i.e. if you insert an empty line):

Code: Select all

\documentclass{article}
\title{Title}
\author{Author}
\date{7 February 2013}
\usepackage{amsmath}
\begin{document}
\maketitle
\setlength{\parindent}{0pt}

1) Integrate the following:
$$\int_{0}^{3\pi}x\frac{1}{x}dx$$

\vspace{5cm}%Where I want the space.
2) Differentiate the following:
$$sin(3x)$$

\end{document}
It seems to me you want to typeset an exam. You might be interested in the exam class or the exsheets package... Also, $$ ... $$ should not be used in LaTeX but rather \[ ... \], see Why is \[ … \] preferable to $$?

Regards
site moderator & package author
SaneAssasin
Posts: 14
Joined: Thu Feb 07, 2013 1:02 am

\vspace Adding Space Not Where I want It.

Post by SaneAssasin »

cgnieder wrote:Is this the actual code you're using? You're manually typing 1), 2) instead of using a list...?!

The space will work if you end the paragraph before it (i.e. if you insert an empty line):

Code: Select all

\documentclass{article}
\title{Title}
\author{Author}
\date{7 February 2013}
\usepackage{amsmath}
\begin{document}
\maketitle
\setlength{\parindent}{0pt}

1) Integrate the following:
$$\int_{0}^{3\pi}x\frac{1}{x}dx$$

\vspace{5cm}%Where I want the space.
2) Differentiate the following:
$$sin(3x)$$

\end{document}
It seems to me you want to typeset an exam. You might be interested in the exam class or the exsheets package... Also, $$ ... $$ should not be used in LaTeX but rather \[ ... \], see Why is \[ … \] preferable to $$?

Regards
Hi,

Yes, sadly I did not use a list! Why I do not know.

Thank you for answering the question and providing me with the link. I have always used $$, perhaps because I read an old tutorial! I will try to use it more often!
Post Reply