How can I recreate this?

I'm trying to recreate this formatting from a template a professor requires to use for writing his homework, but can't figure out how to do it.

Can minipage environment achieve this?

  • 1
    Welcome to TeX.SE. Could you show us a bit of what you tried in this respect ? In that way it would be much easier for others to point out exactly what you need-- rather than building an example from scratch !
    – Partha D.
    Commented Jun 14, 2020 at 1:47
  • You might adapt this environment wrapper I wrote for theorems, since it’s general. Yes, it puts the text inside a minipage. However, it’s not a great approach for this because it can’t paginate.
    – Davislor
    Commented Jun 14, 2020 at 2:26

1 Answer 1


You can add a side bar to any paragraph using changebar package by the command \usepackage{changebar}. The default of the package is adding the side bar to the right, so you may need to use the option [leftbars].

The output you get is like this

enter image description here

Here is the minimal code example

\section{Paragraph with no side bar}
\section{Paragraph with a side bar}

You can further change the color and thickness of the sidebar line using, for example

\cbcolor{red} % line color
\setlength\changebarwidth{5pt} % line thickness

before \cbstart command, so in that case you get something like this

enter image description here

  • thank you very much for this! This package is exactly what I was looking for. Amazing how there's always a package that solves our issues.
    – crazytelli
    Commented Jun 14, 2020 at 3:14
  • If you think an answer solves your problem, you may click accept this answer and up-vote it (the option up left-side of any answer) so that other people may use it and understand that it was useful. Good luck.
    – hesham
    Commented Jun 14, 2020 at 3:18
  • 1
    Thanks, I'm new here in stackexchange. I tried upvoting it but I don't have enough points to upvote. Didn't see the accept answer at the time. All is good now. Thanks for your quick response.
    – crazytelli
    Commented Jun 14, 2020 at 3:47
  • Your welcome and don't worry, soon you will have enough points. It's nice to see people sharing their experience with each others.
    – hesham
    Commented Jun 14, 2020 at 3:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .