Hot answers tagged

4

A common misunderstanding is that figures or tables have to be placed in an environment of the same name to let them float away. They can be placed in situ (given enough space is available), just dropping the figure or table environment. If a caption is needed (the \label command in the MWE is useless without \caption, then \captionof by the caption package ...


3

Lines break automatically; if you want to force a line break, use \protect\\ Example: \documentclass{article} \usepackage{graphicx} \usepackage{subfigure} \begin{document} \begin{figure} \subfigure[A long line\protect\\ and another]{% \includegraphics[width=0.23\textwidth]{example-image}% } \end{figure} \end{document} Note that subfigure has ...


3

The source of the missing List of... is, that the acl2013 package does use following lines % We're never going to need a table of contents, so just flush it to % save space --- suggested by drstrip@sandia-2 \def\addcontentsline#1#2#3{} i.e. \addcontentsline does nothing and there's no change to write a .lof or .lol etc. This effective code is annoying, ...


2

How about \documentclass[preprint,12pt,authoryear]{elsarticle} \begin{document} \begin{figure} \caption{abc} \label{fig:abc} \includegraphics[width=\textwidth]{<filename>} \end{figure} \end{document} Simply use a real filename, of an image file encoded in a supported format, instead of <filename>.


2

You can grab the floatrow documentation code: \floatsetup[widefloat]{margins=hangleft} \begin{figure*}% \begin{floatrow}[4] \ffigbox {\caption{Figure~I in the row (\texttt{floatrow}), ``column'' width}% \label{fig:row:Dog}} {\input{TheDog.picture}} \ffigbox[\FBwidth] {\caption{Figure~II in the row (\texttt{floatrow}), ...


2

you have to run the document twice. However, use package caption and \captionof if you do not want the image to float around. \listfiles \documentclass{article} \usepackage[T1]{fontenc} \usepackage[demo]{graphicx} \usepackage{listings} \usepackage{caption} \begin{document} \begin{lstlisting}[caption={Testcode is here}\label{lst:Testcode is ...


1

Here's a solution that uses the [h!] position specifier to direct LaTeX to make the figure environment non-floating. Of course, this method won't work if there's not enough space remaining in the column to actually insert the two side-by-side images and their captions. Instead of absolute widths for the minipages and images, I'd use relative widths, e.g., ...



Only top voted, non community-wiki answers of a minimum length are eligible