LaTeX - 设置栏线颜色

原创
2018/10/24 09:45
阅读数 1.1K
\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}

法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}

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

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部