Hot answers tagged

2

To illustrate the use of \captionof with mdframed. One can make it act more like a float by using \afterpage and \clearpage (afterpage package). \documentclass{article} \usepackage{newfloat} \usepackage{caption} \DeclareFloatingEnvironment[ fileext=lob, listname={List of boxes}, name=Box, placement=htp, ]{myBox} \usepackage{mdframed} \usepackage{...


1

It is rather obvious that setting the height of the box does not yield the desired result. However, you can create an empty breakable box that runs over several pages by just adding a number of empty lines. \documentclass{article} \newcounter{inc} \usepackage{tcolorbox} \tcbuselibrary{skins,breakable} \newcommand{\emptybox}[2][\linewidth]{% \begin{...


1

You can use pdftex features to record the position before and after a glue node, and then (on the second run) use that information to construct a box of the desired size. Here paragraph 1 just has glue, paragraph 2 has a box with Z...Z set to the same size. \newwrite\zz % easier in latex where this is set up already \openin\zz=\jobname.aux \ifeof\zz\else \...


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