2

I would like to align the left side of text together instead of continuing blow Fig. as shown in the screenshot.

Undesired justification of text in caption

What I would really like is something similar to this:

Desired justification of text in caption

I'm very sorry but I haven't been able to figure out what to search for to find this feature. Can you please assist me? Thanks!

Matt

  • Welcome to TeX SX! Which document class are you using? – Bernard Oct 10 '17 at 22:54
  • Sorry about that. "new-aiaa", a template for AIAA papers. – Matt Oct 11 '17 at 0:31
  • @MattGalles If you like my answer check tick green near my answer. – Sebastiano Oct 11 '17 at 20:47
1

I hope I can get better now, I cleaned up some code.

enter image description here

\documentclass{scrartcl}
\usepackage[bf]{caption} 
\usepackage{graphicx}
\begin{document}
\begin{figure}[!ht]
\includegraphics[width=3cm]{example-image-a}
\captionsetup{format=hang}
\centering
\caption{\textbf{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a,
magna.}}
\end{figure}
\end{document}
  • 1
    You might also include [singlelinecheck=off] for short captions. – John Kormylo Oct 10 '17 at 21:17
  • 1
    Wouldn't it be better to use \textbf or \bfseries instead of \bf as the latter is deprecated? If the text of all the captions in the docment should be bold, one can instead add \captionsetup{font=bf} to the preamble. – leandriis Oct 10 '17 at 21:41
  • It is the default behavior of the KOMA-Script classes. So you can remove packages floatrow and caption (and \capitonsetup). With an uptodate KOMA-Script version you will get an error because of the old font command \bf. To change the font of the caption use \addtokomafont{caption}{\bfseries} and \addtokomafont{captionlabel}{\bfseries}. – esdd Oct 10 '17 at 21:45
  • "\captionsetup{format=hang}" was exactly what I needed, thank you so much! – Matt Oct 11 '17 at 0:34
  • @MattGalles If the answer is ok for you, then accept it as correct by clicking in the tick on its left – koleygr Oct 11 '17 at 7:34

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.