文档不同部分之间有线条的多列问题

文档不同部分之间有线条的多列问题

我使用 multicols 包,它应用于文档的不同部分。我希望 A 部分两列之间有一条线,但 B 部分中不希望两列之间有线。我该怎么办?

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{multicol}

\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{1cm}

\begin{document}

\section{PartA}
\begin{multicols}{2}
   Some Text         %I want this section has a line between
\end{multicols}

\section{Part B}
\begin{multicols}{2}
   Some text         % This section doesn't need a line between
\end{multicols}

\end{document}

答案1

您可以使用\setlength{\columnseprule}{0pt}来实现无垂直分隔符:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\usepackage{multicol}

\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{1cm}

\begin{document}

\section{PartA}
\begin{multicols}{2}
   Some Text         %I want this section has a line between
\end{multicols}

\section{Part B}
\begin{multicols}{2}
    \setlength{\columnseprule}{0pt}
   Some text         % This section doesn't need a line between
\end{multicols}

\end{document}

这使

在此处输入图片描述

相关内容