Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use \\ for line breaks like the followings. I am wondering if there are better ways to do rather than adding \\.

Thank you in advance for your help.

\documentclass[fleqn]{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\begin{document}
\begin{enumerate}
  \item Find the unknown values and in each case, give a reason. 

    \begin{enumerate}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image1.png}
\\
\\
\\
\\
    \item
    \includegraphics[scale=0.6,valign=t]{images/image2.png}
\\
\\
\\
\\
    \item
    \includegraphics[scale=0.6,valign=t]{images/image3.png}
  \end{enumerate}
\end{enumerate}
\end{document}

My second day of LaTeX, yeah.

share|improve this question
    
Please complete your code to make it compile. This requires at least adding \documentclass, \begin{document}, \end{document} etc. You can use images from the mwe package such as example-image-a. What is the spacing designed to do? If say, you want to leave precisely 4 lines worth of space for people to write in, it might be OK. If you are adding those to e.g. fill the page, there are better ways of doing it such as \vfill. If you just want a largish gap, \bigskip might work. Without knowing the effect you want, it is hard to say. –  cfr Mar 10 at 2:48
    
Generally, a minimum working example is helpful, which includes everything needed to compile, nothing extra. Remove packages that have nothing to do with the issue, as well as extraneous text. This is super helpful in building a solution that addresses you exact needs. –  cslstr Mar 10 at 2:53
    
It's almost always wrong to use \\ outside of an alignment environment such as tabular. Certainly never use multiple \\ or end a paragraph with \\ . –  David Carlisle Mar 10 at 9:31
add comment

2 Answers 2

up vote 5 down vote accepted

You should listen to what cslstr says regarding the use of \\ :). Hwoever, you can use package enumitem and adjust the distances between items as below:

\documentclass[]{article}

\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}
\usepackage{enumitem}

\begin{document}

 \begin{enumerate}[itemsep=1in]
    \item
    \includegraphics[scale=0.6,valign=t]{images/image1.png}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image2.png}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image3.png}
  \end{enumerate}
\end{document}

enter image description here

share|improve this answer
add comment

In general, it is not good practice to use multiple \\ to insert extra space. It happens to work here, but often you will get a No line to end here error from LaTeX. \vspace is usually a good way to do what you like. \vfill and \bigskip are other vertical spacing commands that might help. The differences between some of these depends on the mode that LaTeX is in at any one point; see \vspace vs. \vskip, for example.

That said, you can use \vspace in this case to control things more precisely:

\documentclass[]{article}

\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}

\begin{document}

 \begin{enumerate}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image1.png}
\vspace{1in}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image2.png}
\vspace{2in}
    \item
    \includegraphics[scale=0.6,valign=t]{images/image3.png}
  \end{enumerate}
\end{document}

This will give you:

pic of spacing between images

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.