LaTeX - 设置栏线颜色

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

\documentclass[twocolumn]{article}%
\usepackage{color}
\setlength{\columnseprule}{1pt}
\newcommand{\latexcolumnseprulecolor}{\color{red}}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@outputdblcol{% find
    \normalcolor\vrule
}{% and replace by
    \latexcolumnseprulecolor\vrule
}{% success
}{% failure
    \@latex@warning{Patching \string\@outputdblcol\space failed}%
}
\makeatother
\usepackage{lipsum}
\begin{document}
    \lipsum[1-5]
\end{document}

LaTeX - 设置栏线颜色_第1张图片

\documentclass{article}%
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{color}
\setlength{\columnseprule}{1pt}
\renewcommand{\columnseprulecolor}{\color{red}}
\begin{document}
\begin{multicols}{2}
\lipsum[1-5]
\end{multicols}
\end{document}

LaTeX - 设置栏线颜色_第2张图片

本文选自how to change the color of the rule (vertical line) in twocolumn document?

转载于:https://my.oschina.net/shaodongtang/blog/2251587

你可能感兴趣的:(LaTeX - 设置栏线颜色)