0

I am writing a response letter in LaTeX using \documentclass revtex4-2. I also include the changebar package as suggested in Vertical line next to a block, trying to highlight the text by the bar on the side. Here are the details:

\documentclass[aps,prl,preprint,superscriptaddress,letterpaper]{revtex4-2}
\usepackage{xcolor}
\usepackage[leftbars, color]{changebar}
\cbcolor{red}

However, when I want to highlight a paragraph using cbstart and cbend, it does not work at all. For example:

\cbstart
In particle theory, the skyrmion is a topologically stable field configuration 
of a certain class of non-linear sigma models
\cbend

However, when I change to the ordinary \documentclass, it works properly:

\documentclass[12pt, letterpaper]{article}

So the LaTeX code should be right. I guess it may attribute to the revtex4-2 can anyone help me to solve this problem?

Simon Dispa
  • 39,141
  • Welcome. As always on this site, please provide a full but minimal example that others can copy and test as is. – daleif Nov 24 '21 at 08:49
  • both changebar and revtex4-2 patch the output routine and debugging why their patches clash is rather hard. It will imho be easier to implement such a bar with tcolorbox. – Ulrike Fischer Nov 24 '21 at 12:53

1 Answers1

1

When using the tcolorbox package to put the left bar revtex4-2 doesn't complain.

a

Environment MarkNote

\begin{MarkNote}{<bar color>}{<bar indent>}
\documentclass[aps,prl,preprint,superscriptaddress,letterpaper]{revtex4-2}

\usepackage[many]{tcolorbox}% make the vertical rule

\newtcolorbox{MarkNote}[2]{% breakable, outer arc=0pt, arc=0pt, colback=white, leftrule=3pt, % rule width rightrule=0pt, toprule=0pt, top=0pt, right=0pt, bottom=0pt, bottomrule=0pt, colframe=#1, enlarge left by=#2, width=\linewidth-#2,
}

\usepackage{kantlipsum}

\begin{document}

\kant[1]

\begin{MarkNote}{red}{3em} In particle theory, the skyrmion is a topologically stable field configuration of a certain class of non-linear sigma models. \end{MarkNote}

\kant[2]

\end{document}

Simon Dispa
  • 39,141