2

I'd like to write paragraphs (e.g. definitions, theorems etc.) having the following appearance: there's a vertical bar to the left of the entire paragraph, except the first line of text. Furthermore, the entire paragraph is indented to compensate, excepting the first line.

Any ideas how this effect can be achieved?

  • do you need to allow page breaking mid-paragraph (which makes it much harder) – David Carlisle Feb 18 '14 at 14:08
3

You can fiddle with the margins and rule widths with mdframed options, but basically something like this:

enter image description here

\documentclass{article}

\addtolength\textheight{-20\baselineskip}
\setlength\textwidth{6cm}

\usepackage{mdframed}

\def\a{One two three four five six.}
\def\b{Red yellow blue green black white. }
\def\c{\a\a\b\b\a\a}

\begin{document}


\noindent X\dotfill X

\c

\b\c

\begin{mdframed}[topline=false,rightline=false,bottomline=false]
\hspace*{-\parindent}%
\rlap{\smash{\colorbox{white}{\strut\hspace{\parindent}}}}%
\c\c\c\c\c\c
\end{mdframed}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.