6

I have trouble to make the line which separates two columns in a multicols environment reaching the bottom of the columns.

    \setlength{\columnseprule}{1pt} 

is managing the rule width. Is there any command to set the rule length?

My code and the output

    \documentclass[12pt,a4paper]{article}
    \usepackage[utf8x]{inputenc}
    \usepackage{ucs}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}
    \usepackage{multicol}
    \usepackage{enumitem}
    \usepackage{setspace} % pr utiliser spacing
    \usepackage{graphicx}
    \begin{document}
    \textbf{Exercice 1}\\ Factoriser au maximum les expressions suivantes.
    \setlength{\columnseprule}{1pt}
    \begin{multicols}{2}
    \begin{enumerate}[itemsep=150pt]
    \item $15y^2-5yz-6y+2z$
    \item $y^2+12y+35$
    \item $25y^2-40y+16$
    \item $t^2-2t-8$ 
    \item $z^3+3y^3+3z^2y+zy^2$
    \item $81x^2-90x+25$
    \end{enumerate}
    \end{multicols}
    \end{document}

column separation rule

I can manage it through some fancy ad hoc manipulations. Any elegant idea to solve this would be greatly appreciated!

Thomas

3

In fact, the vertical line is going until the end of each column. Your problem is that the end of each column is not where you think: there is no extra space left after the last question of each column. This is because you're using \itemsep.

I changed your code a bit, replacing \itemsep with a new macro \extraspace that leaves the intended amount of vertical space. Notice the use of \columnbreak; if you leave it out, the fourth question will be at the bottom of the left column. I also cleaned several unused packages.

\documentclass[12pt,a4paper]{article}
\usepackage{multicol}
\setlength{\columnseprule}{1pt}
\newcommand{\extraspace}{\vspace*{150pt}}
\begin{document}
\textbf{Exercice 1}\\ Factoriser au maximum les expressions suivantes.
\begin{multicols}{2}
  \begin{enumerate}
  \item $15y^2-5yz-6y+2z$    \extraspace
  \item $y^2+12y+35$         \extraspace
  \item $25y^2-40y+16$       \extraspace
  \columnbreak
  \item $t^2-2t-8$           \extraspace
  \item $z^3+3y^3+3z^2y+zy^2$ \extraspace
  \item $81x^2-90x+25$       \extraspace
  \end{enumerate}
\end{multicols}
\end{document}

result

| improve this answer | |

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.