2

I want to put 3 figures in one line and I adjust the horizontal position of figures using \hspace{}. The problem is that when I set the spacing to -16pt, i.e. \hspace{-16pt}, the figure does not move left. When I set the spacing to -17pt, \hspace{-17pt}, the figure moves to the left a lot. I tried spacing -15pt, -14pt, ..., -1pt, 0pt. The figure's position is the same as \hspace{-16pt}.

The example code is as follows:

\begin{figure*}
    \centering
    \captionsetup{labelfont=bf}
    \begin{multicols}{3}
        \hspace{-15pt}
        \includegraphics[width=63mm]{images/1.pdf}\par 
        \hspace{-15pt}
        \includegraphics[width=63mm]{images/2.pdf}\par 
        \hspace{-15pt}
        \includegraphics[width=63mm]{images/3.pdf}\par
    \end{multicols}

\end{figure*}

Why does this happen? How to make appropriate adjustment? I do need the figure to move to the left a little bit, but not that much.

  • 2
    There are almost certainly good reasons for your problem, but without any actual code to test, it is hard to guess what you are doing 'wrong'. Please post a complete, but minimal(!) example (or see here). – jon Apr 1 '17 at 3:42
  • 2
    Note (for future reference): you are missing \documentclass, \begin{document}, and \end{document} (to make the example complete); and people don't have your 3 PDFs in your images/ directory, so the example can't be compiled (a good substitute is to load the package mwe and use, say, its example-image.png). – jon Apr 1 '17 at 4:13
  • 3
8

At the start of a line TeX ignores spaces. The star form is needed: \hspace*{-15pt}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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