I want to have text of a certain width less than the page width, which goes across several pages. Normally you’d put text into a (\par)box to set its width but these boxes cannot be broken across pages so I can’t use it here.
I tried looking at the internal definition of \parbox (more precisely \@iiiparbox) but I cannot make heads nor tails of it – it doesn’t look like it can be adapted to allow page breaks, though.
Background:
The reason I want to do this is that I have a figure caption (which is centered and of a given text width) and is too long for the page and thus cut off. There are numerous questions about how to solve this (e.g. Break figure description over two pages) but none offers an actual solution to the problem.
For now I’ve simply opted out of using a float and use the following instead:
\begin{center}
\includegraphics
\captionof{figure}{looooong caption}
\end{center}
… but that always puts the figure caption on the next page in its entirety, rather than breaking it. (Locally) redefining \@iiiparbox makes it possible to break the figure caption across pages smoothly but then the figure caption takes up the complete page width which is undesired.
captionpackage with some options, which redefines\captionto be inside aparbox. Thanks, I’ll try this. – Konrad Rudolph Jun 19 '13 at 17:41captionpackage is used, the\parboxcan be switched off by optionparbox=none. But be aware that from now on not all features of thecaptionpackage are working as expected anymore, for example theindentionparameter. – Jun 19 '13 at 19:13\oddsidemarginand\evensidemarginthen I get an effect but that effect isn’t restricted to the figure caption, it also indents the figure itself (and even the whole page before that). Furthermore, I don’t succeed in applying an actual margin and making the text less wide – instead, it just shifts the whole page to the right by increasing the outer margin (even though I explicitly decreased the\textwidthas well). – Konrad Rudolph Jun 20 '13 at 09:42\oddsidemarginor\evensidemarginor especially\textwidthis almost certainly going to make things go wrong. Changing those within a document is just not really supported. The way to change the margins locally is to use a list environment likequoteas I showed. – David Carlisle Jun 20 '13 at 09:54quotecode: from everything I read this should work – alas, it doesn’t. It also doesn’t work when I use themenumitempackage and change the margins via the optionleftmargin=3cm. I’m suspecting that the (rather complex and badly written) custom document class interferes in nontrivial ways. – Konrad Rudolph Jun 20 '13 at 09:58captionpackage, even when passingparbox=none. No idea why … I ended up hacking together a substitutexcaptionofcommand to take the place of the regularcaptionof. – Konrad Rudolph Jun 20 '13 at 12:08