I would like to apply the mdframed environment to a custom list environment which is described here, modified slightly and shown below.

I would like to put a frame (breakable) around each call of the category environment. The requirement for a frame is simply because I am trying to emulate the style of an electronically fillable form.

Please see the following MWE and supporting files:



    }\item {\bfseries \section{#1}

\begin{category}{First Category}

\begin{category}{Second Category}


and required_code.tex looks like:

% copied from ltlists.dtx
  \@ifnextchar [\@nobreakitem{\@noitemargtrue \@nobreakitem[\@itemlabel]}}
      \indent \par
      \unskip\unskip \par
      \addpenalty\@M%only new bit!
      \clubpenalty \@M
      \clubpenalty \@clubpenalty
    \hskip \itemindent
    \hskip -\labelwidth 
    \hskip -\labelsep
    \ifdim \wd\@tempboxa >\labelwidth
      \hbox to\labelwidth {\unhbox\@tempboxa}%
    \hskip \labelsep}%
  • I don't see what this code does that simple sections cannot do.
    – Bernard
    Commented Feb 12, 2017 at 19:10
  • @Bernard, you're right, probably too complex. The complexity comes from wanting to frame refsections with a box. I will study this example: tex.stackexchange.com/questions/131742/…
    – John Chris
    Commented Apr 18, 2017 at 20:13


You must log in to answer this question.

Browse other questions tagged .