0

I use

\documentclass[11pt,twocolumn]{article} 
\setlength{\columnseprule}{1.0pt}

to write a two-column document with a a visible vertical line separation.

However, when I try to use \begin{multicols} to type a two-column section inside one of the columns of the page, the vertical line appears. How can we avoid this line?

enter image description here

  • 3
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – albert Sep 10 '18 at 10:54
  • just locally set it back to 0pt before the multicols (which is presumably inside some minipage or other enviornment that limits the scope.) – David Carlisle Sep 10 '18 at 11:01
  • How do I set it back to 0pt in a mini page? – Jimmy Sabater Sep 10 '18 at 11:05
1

Be aware that a multicols environment will not work if it extends past a main column break, in two column format.

Set \columnseprule to zero locally:

\documentclass[11pt,twocolumn]{article}
\usepackage[a4paper]{geometry}

\usepackage{multicol}

\usepackage{lipsum}

\setlength{\columnseprule}{0.4pt}

\begin{document}

\lipsum[1-2]

\begin{multicols}{2}\setlength{\columnseprule}{0pt}
abc def ghi jklmno
abc def ghi jklmno
abc def ghi jklmno
abc def ghi jklmno
abc def ghi jklmno
abc def ghi jklmno
\end{multicols}

\lipsum

\end{document}

enter image description here

On the other hand, using tasks, for instance, will avoid the usage of multicols.

\documentclass[11pt,twocolumn]{article}
\usepackage[a4paper]{geometry}

\usepackage{tasks}

\usepackage{lipsum}

\setlength{\columnseprule}{0.4pt}

\newenvironment{problem}
 {\par\addvspace{\topsep}%
  \stepcounter{problem}%
  \noindent\textbf{\theproblem}.\ignorespaces}
 {\par\addvspace{\topsep}}
\newcounter{problem}

\begin{document}

\lipsum[1-2]

\begin{problem}
Compute the following integrals
\begin{tasks}[counter-format=tsk[a])](2)
\task $\displaystyle\int 7\sqrt{7x-1}\,dx$
\task $\displaystyle\int \frac{\ln x}{x}\,dx$
\task $\displaystyle\int\sin(2x)\,dx$
\end{tasks}
\end{problem}

\lipsum

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.