1

I want to have something like this green box you can see in the image next to the text over multiple (~20) pages. Right now I solved this by using mdframed.

The problem now is, that I cannot start chapters in mdframed and have all footnotes printed in the end - since mdframed is using minipages.

Is there a better solution for my case? Since I do not really frame all this text and just want this green box next to it?

I thought about something like showing the geometry borders just on the left side and changing to look like it is now.

Here is a picture of how its looking right now

enter image description here

Kavar
  • 31
  • 1
    Maybe you could make use of the changebar package as shown in this answer: https://tex.stackexchange.com/a/175756/134144 – leandriis Jun 13 '18 at 08:32

2 Answers2

4

This is relatively easy to do in ConTeXt using MetaFun.

\startuseMPgraphic{textframe}
    begingroup;
        for i=1 upto nofmultipars :
            draw ( ulcorner multipars[i] -- llcorner multipars[i] )
            xshifted (-2*EmWidth)
            withcolor "darkgreen"
            withpen pensquare scaled (EmWidth);
        endfor ;
    endgroup;
\stopuseMPgraphic

\definetextbackground
  [TextFrame]
  [mp=textframe,
   location=paragraph]

\starttext

\starttextbackground[TextFrame]

\startsection[title=Knuth]
  \input knuth
\stopsection

\startsection[title=Tufte]
  \input tufte
\stopsection

\startsection[title=Ward]
  \input ward
\stopsection

\startsection[title=Zapf]
  \input zapf
\stopsection

\startsection[title=Dawkins]
  \input dawkins
\stopsection

\startsection[title=Bryson]
  \input bryson
\stopsection

\stoptextbackground

\stoptext

enter image description here

Henri Menke
  • 109,596
  • Thanks a lot for this answer but would this be possible using LaTeX too? Since until now I just worked with LaTeX – Kavar Jun 13 '18 at 08:00
2

@leandriis answer to my question works out very well.

So now I'm using the following:

\documentclass{book}

\usepackage[color, leftbars]{changebar}
\usepackage{lipsum}

\setlength\changebarsep{10pt}

\begin{document}
\lipsum[4]
    \cbstart % the marked Text starts here
    \cbcolor{green}
    \lipsum[4]
    \lipsum\footnote{a footnote}
    \lipsum
    \cbend % and ends here
\end{document}
Kavar
  • 31