1

Is it possible to have a paragraph break or a newline in the caption of an adjustbox?

\\ \newline and \tabularnewline don't seem to work. Thanks

\documentclass{article}
\usepackage{adjustbox}

\begin{document}

\begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio,rotate=0,caption={blah \\ blah},float=table}
BLAH BLAH BLAH
    \end{adjustbox}

\end{document}
  • Why not simply using a table environment? – egreg Jan 30 '13 at 13:57
  • Hi @egreg, in practice its a large table of data that is going in the back of a report, and is being produced from a print(xtable(x)) command in R-CRAN and knitr. – Tahnoon Pasha Jan 31 '13 at 0:22
4

Load the caption package:

\documentclass{article}
\usepackage{caption}
\usepackage{adjustbox}

\begin{document}
\begin{figure}
\caption{abc\\abc}
\end{figure}

\begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio,rotate=0,
caption={blah \\ blah},float=table}
BLAH BLAH BLAH
\end{adjustbox}

\end{document}

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.