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}
2
  • Why not simply using a table environment?
    – egreg
    Jan 30, 2013 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. Jan 31, 2013 at 0:22

1 Answer 1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .