Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 3

11 Jui '19, 02:22

touhami's gravatar image

touhami
9.9k410

Comme son nom l'indique, minipage ne peut pas contient de texte qui dépasse (...) une page, voire une colonne. Il faut alors recourir aux boites plus sophistiquées : [tcolorbox](https://www.ctan.org/pkg/tcolorbox), [framed](https://www.ctan.org/pkg/framed)... Toutefois, l'interaction entre ces boites (extensions) avec certains éléments de LaTeX, multicols entre autres, est très faible. La solution proposée ici est loin d'être optimale, bien qu'elle peut être satisfaisante dans la plupart des cas. Par fois, il faut intervient manuellement pour donner des indictions. Voici une un exemple qui montre deux limitations : \documentclass[french]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{multicol} \usepackage[many]{tcolorbox} \usepackage{mwe} \begin{document} %Expérience 1 \lipsum[1] \begin{tcolorbox}[breakable] \begin{multicols}{2} \lipsum[1-8] \end{multicols} %Expérience 2 \end{tcolorbox} \lipsum[1] \begin{multicols}{2} \lipsum[1] \begin{tcolorbox}[breakable] \lipsum[2] \end{tcolorbox} \lipsum[3] \end{multicols} \lipsum[1] \end{document} Voici, maintenant, la solution avec [tcolorbox](https://www.ctan.org/pkg/tcolorbox) proposée. Elle se base sur l'option `breakable` des boites `tcolorbox` : \documentclass{scrartcl} \documentclass[french]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{multicol} \usepackage[many]{tcolorbox} \usepackage{mwe} \title{Titre} \date{} \begin{document} \maketitle \begin{multicols}{3} \lipsum[1] \begin{multicols}{2} \lipsum[1] \begin{tcolorbox}[breakable,colframe=black,colback=red,boxrule=.4pt,arc=0pt] \tableofcontents \lipsum[2] \end{tcolorbox} \lipsum[1] \section{Section 1} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \lipsum[2] \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \lipsum[3] \section{Section 3} \lipsum[4] \section{Section 4} \lipsum[5] \section{Section 5} \lipsum[6] \section{Section 6} \lipsum[7] \end{multicols} \end{document} \end{multicols} \lipsum[1] \end{document}
cliquez ici pour masquer/afficher la révision 2
mineure

31 Mai '19, 15:14

Pathe's gravatar image

Pathe
7.6k49210252

Voici une solution avec [tcolorbox](https://www.ctan.org/pkg/tcolorbox) [tcolorbox](https://www.ctan.org/pkg/tcolorbox) : \documentclass{scrartcl} \usepackage{multicol} \usepackage[many]{tcolorbox} \usepackage{mwe} \title{Titre} \date{} \begin{document} \maketitle \begin{multicols}{3} \begin{tcolorbox}[breakable,colframe=black,colback=red,boxrule=.4pt,arc=0pt] \tableofcontents \end{tcolorbox} \lipsum[1] \section{Section 1} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \lipsum[2] \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \section{Section 2} \lipsum[3] \section{Section 3} \lipsum[4] \section{Section 4} \lipsum[5] \section{Section 5} \lipsum[6] \section{Section 6} \lipsum[7] \end{multicols} \end{document}
cliquez ici pour masquer/afficher la révision 1

31 Mai '19, 11:41

touhami's gravatar image

touhami
9.9k410

C'est votre première visite ici ? Consultez la FAQ !

×