Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
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

1 Answer 1

up vote 4 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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