我正在使用 LaTeX 写一封回复信\documentclass
revtex4-2
。我还包含changebar
了块旁边的垂直线,尝试通过侧边栏突出显示文本。以下是详细信息:
\documentclass[aps,prl,preprint,superscriptaddress,letterpaper]{revtex4-2}
\usepackage{xcolor}
\usepackage[leftbars, color]{changebar}
\cbcolor{red}
但是,当我想使用cbstart
和突出显示某个段落时cbend
,它根本不起作用。例如:
\cbstart
In particle theory, the skyrmion is a topologically stable field configuration
of a certain class of non-linear sigma models
\cbend
但是,当我更改为普通时\documentclass
,它可以正常工作:
\documentclass[12pt, letterpaper]{article}
所以 LaTeX 代码应该是正确的。我想这可能是因为 revtex4-2
有人能帮我解决这个问题吗?
答案1
当使用tcolorbox
包放置左侧栏时revtex4-2
不会抱怨。
环境 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}