15.11.2014 Views

Documenation of mdframed

Documenation of mdframed

Documenation of mdframed

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A. More information<br />

A. More information<br />

In the following section I want to present how to create your own frame.<br />

A.1. How does <strong>mdframed</strong> work?<br />

With the environment \begin{<strong>mdframed</strong>} . . . \end{<strong>mdframed</strong>} the whole contents will be saved in<br />

a \savebox called \mdf@splitbox@one. After the calculation <strong>of</strong> the width and the height <strong>of</strong> the<br />

\mdf@splitbox@one (done by <strong>mdframed</strong>.sty) the box will be set sequently (done by md-frame-X.mdf).<br />

The following figure demonstrates this.<br />

read in and save<br />

contents in<br />

\mdf@splitbox@one<br />

enough space on page<br />

\mdf@putbox@single<br />

not enough space on page<br />

split<br />

\mdf@splitbox@one in<br />

\mdf@splitbox@two to<br />

the free space <strong>of</strong> the<br />

page<br />

type out \mdf@splitbox@two<br />

\mdf@putbox@first<br />

calculate the height <strong>of</strong> the new \mdf@splitbox@one<br />

contents <strong>of</strong><br />

\mdf@splitbox@one<br />

have enough space on<br />

the new page<br />

yes<br />

\mdf@putbox@second<br />

no<br />

split<br />

\mdf@splitbox@one in<br />

\mdf@splitbox@two to<br />

the free space <strong>of</strong> the<br />

page<br />

type out \mdf@splitbox@two<br />

\mdf@putbox@middle<br />

calculate the height <strong>of</strong> the new \mdf@splitbox@one<br />

Figure 4: Setting the contents <strong>of</strong> <strong>mdframed</strong><br />

The width <strong>of</strong> the contents is the result <strong>of</strong> the settings <strong>of</strong> leftmargin, rightmargin, linewidth,<br />

innerleftmargin and innerrightmargin (see figure (2)).<br />

A.2. The Framecommands<br />

The package <strong>mdframed</strong> knows four kinds <strong>of</strong> “Framecommand”. These commands tell L A TEX how to<br />

set the contents <strong>of</strong> <strong>mdframed</strong>.<br />

\mdf@putbox@single<br />

This command sets the contents <strong>of</strong> a single unsplit frame.<br />

2013/07/01 revision: 212 <strong>mdframed</strong> 45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!