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.2. The Framecommands<br />

A. More information<br />

\mdf@putbox@first<br />

\mdf@putbox@middle<br />

\mdf@putbox@second<br />

This command sets the contents <strong>of</strong> the first frame <strong>of</strong> a split frame.<br />

This command sets the contents <strong>of</strong> the middle frame <strong>of</strong> a split frame.<br />

This command sets the contents <strong>of</strong> the last frame <strong>of</strong> a split frame.<br />

Using the explained commands we give an example. The command \box uses the contents <strong>of</strong><br />

the savebox and types them out.<br />

First we want to type out the single box without any settings (but with the calculated<br />

width).<br />

\makeatletter<br />

\def\mdf@putbox@single{\box\mdf@splitbox@one}<br />

\makeatother<br />

I am using the command \leftline to start the “Framecommands” at the left.<br />

\makeatletter<br />

\def\mdf@putbox@single{\leftline{\box\mdf@splitbox@one}}<br />

\makeatother<br />

Now you have to know how the lengths are named. Every length which can be modified by the<br />

options has the following syntax:<br />

\mdf@@length<br />

For example the leftmargin is:<br />

\mdf@leftmargin@length<br />

To create only a line at the left with the correct leftmargin you can set \mdf@putboxsingle as<br />

follows<br />

\makeatletter<br />

\def\mdf@putbox@single{%<br />

\leftline{%<br />

\hspace∗{\mdf@leftmargin@length}%<br />

\rule[−\dp\mdf@splitbox@one]{\mdf@linewidth}%<br />

{\ht\mdf@splitbox@one+\dp\mdf@splitbox@one}%<br />

\box\mdf@splitbox@one<br />

}%<br />

}<br />

\makeatother<br />

In this way you can do what you want. If you create your own style you can save the file as<br />

md-frame-X.mdf. X must be an integer. In this way you can use the option framemethod to load<br />

the file by setting framemethod=X.<br />

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

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

Saved successfully!

Ooh no, something went wrong!