Graphics, Figures & TablesWide table of two columns

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Wide table of two columns

Post by Cham »

The line command is working great in the two columns (multicols) environment.

However, I'm unable to get the enumitem package to work correctly. Adding the options for the margins ; [itemsep=1ex,leftmargin=1cm], gives me compilation errors.

I suspect it's uncompatible with the multicols environment.

Here's the working code I'm currently using. How would you change the itemize margins ?

Code: Select all

\documentclass[12pt,letterpaper,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{microtype}
\usepackage{array}
\usepackage{multicol}
\usepackage{enumitem}

\begin{document}

\section{Objectif-standard visé}

\begin{multicols}{2}
\setlength{\columnseprule}{.4pt} % Pour ajouter une ligned verticale

	\subsection*{Objectif}

\subsubsection*{Énoncé de la compétence}

Analyser différentes situations ou phénomènes physiques reliés aux ondes, à l'optique et à la physique moderne à partir de principes fondamentaux.

\subsubsection*{Éléments de la compétence}

\begin{itemize}\renewcommand{\labelitemi}{$\cdot$} % \bullet, \circ, \cdot, \star, \ast, autres...
	\item Appliquer les principes de base de la physique à la description des vibrations, des ondes et de leur propagation.
	\medskip
	\item Appliquer les lois de l'optique géométrique.
	\medskip
	\item Appliquer les caractéristiques des ondes aux phénomènes lumineux.
	\medskip
	\item Analyser quelques situations à partir des notions de la physique moderne.
	\medskip
	\item Vérifier expérimentalement quelques lois et principes reliés aux ondes, à l'optique et à la physique moderne.
\end{itemize}

%%%% on a separate column (right column) :

\subsection*{Standard}

\subsubsection*{Critères de performance}

\begin{itemize}\renewcommand{\labelitemi}{$\cdot$} % \bullet, \circ, \cdot, \star, \ast, autres...
	\item Utilisation appropriée des concepts, des principes et des lois.
	\medskip
	\item Schématisation adéquate des situations physiques.
	\medskip
	\item Représentation graphique adaptée à la nature des phénomènes.
	\medskip
	\item Justification des étapes retenues pour l'analyse des situations.
	\medskip
	\item Application rigoureuse des principaux  modèles.
	\medskip
	\item Jugement critique des résultats.
	\medskip
	\item Interprétation des limites des modèles.
	\medskip
	\item Expérimentation rigoureuse.
	\medskip
	\item Rédaction de rapports de laboratoire selon les normes établies.
\end{itemize}
\end{multicols}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Wide table of two columns

Post by mas »

Your sample does not include the options you have mentioned. I tried adding the same and the modified sample is below:

Code: Select all

\documentclass[12pt,letterpaper,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{microtype}
\usepackage{array}
\usepackage{multicol}
\usepackage{enumitem}
\pagestyle{empty}

\begin{document}

\section{Objectif-standard visé}

\begin{multicols}{2}
\setlength{\columnseprule}{.4pt} % Pour ajouter une ligned verticale

        \subsection*{Objectif}

\subsubsection*{Énoncé de la compétence}

Analyser différentes situations ou phénomènes physiques reliés aux ondes, à l'optique et à la physique moderne à partir de principes fondamentaux.

\subsubsection*{Éléments de la compétence}

\begin{enumerate}[itemsep=1ex,leftmargin=1cm,label=$\cdot$]
        \item Appliquer les principes de base de la physique à la description des vibrations, des ondes et de leur propagation.
        \medskip
        \item Appliquer les lois de l'optique géométrique.
        \medskip
        \item Appliquer les caractéristiques des ondes aux phénomènes lumineux.
        \medskip
        \item Analyser quelques situations à partir des notions de la physique moderne.
        \medskip
        \item Vérifier expérimentalement quelques lois et principes reliés aux ondes, à l'optique et à la physique moderne.
\end{enumerate}

%%%% on a separate column (right column) :

\subsection*{Standard}

\subsubsection*{Critères de performance}

\begin{enumerate}[itemsep=1ex,leftmargin=1cm,label=$\times$]
        \item Utilisation appropriée des concepts, des principes et des lois.
        \medskip
        \item Schématisation adéquate des situations physiques.
        \medskip
        \item Représentation graphique adaptée à la nature des phénomènes.
        \medskip
        \item Justification des étapes retenues pour l'analyse des situations.
        \medskip
        \item Application rigoureuse des principaux  modèles.
        \medskip
        \item Jugement critique des résultats.
        \medskip
        \item Interprétation des limites des modèles.
        \medskip
        \item Expérimentation rigoureuse.
        \medskip
        \item Rédaction de rapports de laboratoire selon les normes établies.
\end{enumerate}
\end{multicols}

\end{document}
This compiles fine. I just changed the labels to make it more apparent :-) Is this what you wanted?
x2.jpg
x2.jpg (169.44 KiB) Viewed 5219 times

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Wide table of two columns

Post by Johannes_B »

Just stating that you get errors isn't very informative. You should always mention exactly, what error you are getting. You can also upload the log file of your test example to the forum server.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Wide table of two columns

Post by Cham »

Haa ! Now this works very well !

Thanks a lot !

I can also adjust the right margin in the enumerate list, using the command rightmargin=0.5cm.

But then, the first paragraph doesn't match, and there's a large vertical space for the last item in the left column (strangely, I don't get exactly the same result as with the WriteLaTeX option on the forum) :
list.jpg
list.jpg (80.57 KiB) Viewed 5216 times
There is too much hyphenation for my taste, in the first paragraph.

How can I adjust the right margin of the first paragraph so it matches the list below it, and the vertical spacing of the last item (same spacing for all items) ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Wide table of two columns

Post by Johannes_B »

You could use a minipage once again, but this is a ridicoulusly high amount of code-tweaking to get that ugly result that was once done with Word. Of course, you also can make the column sep a bit wider.

I have seen users cursing LaTeX for its stupidness and the fact that getting results is so freaking complicated.
By design LaTeX tries to prevent users from producing ugly documents. This here is one of the cases.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Wide table of two columns

Post by Cham »

I don't have a choice for the presentation of this text. It's imposed on me, and it's not really related to Word. That text must be presented in two columns.

And I don't think that the LaTeX version is that ugly. It just need a few tweakings.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Wide table of two columns

Post by Johannes_B »

Did you try my suggestions?

I didn't test, as there was no MWE.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: Wide table of two columns

Post by Cham »

Yes, I tred them. The results are very similar, but I find your code a bit harder to understand.

What are the advantages of your code ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Wide table of two columns

Post by Johannes_B »

Cham wrote:What are the advantages of your code ?
Which one?
There might be no advantage at all, those are just different ways. All roads lead to Rome ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Wide table of two columns

Post by Cham »

Well then, to finish this topic :

1. Is there a "simple" way to adjust the vertical space between items in an enumerate environment, so the space is exactly the same (fixed constant) ?

2. And how to adjust the right margin of everything in that multicols environment ?

3. And is there an option to tell LaTeX to not use any hyphenation inside the multicols environment ?
Post Reply