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

22 Mar '21, 08:51

touhami's gravatar image

touhami
9.9k410

Voici une solution qui demande deux passes. ![alt text][1] \documentclass[a4paper, 12pt]{scrartcl} \usepackage{kpfonts} \usepackage[T1]{fontenc} \usepackage[savepos]{zref} \usepackage[Export]{adjustbox} \usepackage{mwe} \newcounter{mtimg}[page] \makeatletter \newenvironment{mtfigure} {\par\noindent \begin{minipage}[t]{\textwidth}% \def\@captype{figure} \centering \ifnum\value{mtimg}=0 \stepcounter{mtimg}% \ifodd\value{page}% \zsaveposy{pg\arabic{page}}% \else \@ifundefined{Z@R@pg\the\numexpr\value{page}-1}\relax{\vskip\dimexpr\paperheight-\zposy{pg\the\numexpr\value{page}-1}sp-\topmargin-\headheight-\headsep-\topskip-1in\relax} \fi} \fi\fi} {\end{minipage}\par} \makeatother \begin{document} \section{Première partie} \subsection{Première sous-partie} \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:1a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:1b} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:2a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:2b} \end{mtfigure} \newpage \subsection{Première sous-partie} \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:3a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:3b} \end{mtfigure} \end{document}\end{document} [1]: https://texnique.fr/osqa/upfiles/22.png
cliquez ici pour masquer/afficher la révision 1

21 Mar '21, 17:13

touhami's gravatar image

touhami
9.9k410

Voici une solution qui demande deux passes. \documentclass[a4paper, 12pt]{scrartcl} \usepackage{kpfonts} \usepackage[T1]{fontenc} \usepackage[savepos]{zref} \usepackage[Export]{adjustbox} \usepackage{mwe} \makeatletter \newenvironment{mtfigure} {\par\noindent \begin{minipage}[t]{\textwidth}% \def\@captype{figure} \centering \ifodd\value{page}% \zsaveposy{pg\arabic{page}}% \else \@ifundefined{Z@R@pg\the\numexpr\value{page}-1}\relax{\vskip\dimexpr\paperheight-\zposy{pg\the\numexpr\value{page}-1}sp-\topmargin-\headheight-\headsep-\topskip-1in\relax} \fi} {\end{minipage}\par} \makeatother \begin{document} \section{Première partie} \subsection{Première sous-partie} \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:1a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:1b} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:2a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:2b} \end{mtfigure} \newpage \subsection{Première sous-partie} \begin{mtfigure} \includegraphics[width=\textwidth,valign=T]{example-image-a} \captionof{figure}{Une première illustration} \label{fig:3a} \end{mtfigure} \newpage \begin{mtfigure} \includegraphics[width=\textwidth, height=8cm,valign=T]{example-image} \captionof{figure}{Une deuxième illustration} \label{fig:3b} \end{mtfigure} \end{document}