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

19 Déc '17, 22:52

Pathe's gravatar image

Pathe
7.6k53210254

Voici une solution. \documentclass[a4paper]{article} \usepackage{tabto} \usepackage{etoolbox} %--------------------------- juste pour la démonstration \usepackage[hmargin=1cm]{geometry} \usepackage{multicol} \setlength{\columnseprule}{1pt} %--------------------------- \let\mttabto\tabto \makeatletter \patchcmd{\mttabto}{% \protected@xdef\TTo@action{% \vrule\@width\z@\@depth\the\prevdepth \ifdim\CurrentLineWidth>\@tempdimb \ifTTo@overlap\else \protect\newline \protect\null \fi\fi \protect\nobreak \protect\hskip\the\@tempdimb\relax }}{% \protected@xdef\TTo@action{% \vrule\@width\z@\@depth\the\prevdepth \protect\hskip\the\CurrentLineWidth\relax \ifdim\CurrentLineWidth>\@tempdimb \ifTTo@overlap\else \protect\dotfill\newline\protect\null \fi \protect\nobreak \makebox[\the\@tempdimb]{\protect\dotfill} \else \protect\nobreak \makebox[\the\dimexpr\@tempdimb-\CurrentLineWidth\relax]{\protect\dotfill} \fi }}{}{} \makeatother \begin{document} \begin{multicols}{2} Foo texte \tabto{4cm} tabulation\newline et encore \tabto{4cm} tabulation Foo texte assez long pour voir \tabto{4cm} tabulation \begin{itemize} \item Foo texte \tabto{4cm} tabulation \item Foo texte assez long pour voir \tabto{4cm} tabulation \begin{itemize} \item Foo texte \tabto{4cm} tabulation \item Foo texte assez long pour voir \tabto{4cm} tabulation \end{itemize} \end{itemize} et FIN. Foo texte \mttabto{4cm} tabulation\newline et encore \mttabto{4cm} tabulation Foo texte assez long pour voir \mttabto{4cm} tabulation \begin{itemize} \item Foo texte \mttabto{4cm} tabulation \item Foo texte assez long pour voir \mttabto{4cm} tabulation \begin{itemize} \item Foo texte \mttabto{4cm} tabulation \item Foo texte assez long pour voir \mttabto{4cm} tabulation \end{itemize} \end{itemize} et FIN. \end{multicols} \end{document} ![alt text][1] [1]: http://texnique.fr:80/osqa/upfiles/tabto_UdjsXjY.png <img src="/upfiles/tabto_UdjsXjY.png" style="width: 100%;"/>
cliquez ici pour masquer/afficher la révision 1

18 Déc '17, 20:04

touhami's gravatar image

touhami
10.0k410

Voici une solution. \documentclass[a4paper]{article} \usepackage{tabto} \usepackage{etoolbox} %--------------------------- juste pour la démonstration \usepackage[hmargin=1cm]{geometry} \usepackage{multicol} \setlength{\columnseprule}{1pt} %--------------------------- \let\mttabto\tabto \makeatletter \patchcmd{\mttabto}{% \protected@xdef\TTo@action{% \vrule\@width\z@\@depth\the\prevdepth \ifdim\CurrentLineWidth>\@tempdimb \ifTTo@overlap\else \protect\newline \protect\null \fi\fi \protect\nobreak \protect\hskip\the\@tempdimb\relax }}{% \protected@xdef\TTo@action{% \vrule\@width\z@\@depth\the\prevdepth \protect\hskip\the\CurrentLineWidth\relax \ifdim\CurrentLineWidth>\@tempdimb \ifTTo@overlap\else \protect\dotfill\newline\protect\null \fi \protect\nobreak \makebox[\the\@tempdimb]{\protect\dotfill} \else \protect\nobreak \makebox[\the\dimexpr\@tempdimb-\CurrentLineWidth\relax]{\protect\dotfill} \fi }}{}{} \makeatother \begin{document} \begin{multicols}{2} Foo texte \tabto{4cm} tabulation\newline et encore \tabto{4cm} tabulation Foo texte assez long pour voir \tabto{4cm} tabulation \begin{itemize} \item Foo texte \tabto{4cm} tabulation \item Foo texte assez long pour voir \tabto{4cm} tabulation \begin{itemize} \item Foo texte \tabto{4cm} tabulation \item Foo texte assez long pour voir \tabto{4cm} tabulation \end{itemize} \end{itemize} et FIN. Foo texte \mttabto{4cm} tabulation\newline et encore \mttabto{4cm} tabulation Foo texte assez long pour voir \mttabto{4cm} tabulation \begin{itemize} \item Foo texte \mttabto{4cm} tabulation \item Foo texte assez long pour voir \mttabto{4cm} tabulation \begin{itemize} \item Foo texte \mttabto{4cm} tabulation \item Foo texte assez long pour voir \mttabto{4cm} tabulation \end{itemize} \end{itemize} et FIN. \end{multicols} \end{document} ![alt text][1] [1]: http://texnique.fr:80/osqa/upfiles/tabto_UdjsXjY.png

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

×