53 lines
1.0 KiB
TeX
53 lines
1.0 KiB
TeX
% https://www.developpez.net/forums/d910711/autres-langages/autres-langages/latex/mise-forme/texte-recto-figures-verso/
|
|
% Solution by Martigan on Developpez.net, adapted
|
|
|
|
\RequirePackage{afterpage}
|
|
\RequirePackage{caption}
|
|
\RequirePackage{etoolbox}
|
|
\RequirePackage{environ}
|
|
\newbool{flcontinue}
|
|
\newcommand{\flstart}{
|
|
\booltrue{flcontinue}
|
|
\afterpage{\flblankpage}
|
|
}
|
|
|
|
\newcommand{\flstop}{
|
|
\boolfalse{flcontinue}
|
|
}
|
|
\newcommand\@fladdfig{\relax}
|
|
\newcommand\fladdfig[1]{\global\long\def\@fladdfig{#1}}
|
|
\newcommand\@flputfig{\@fladdfig\fladdfig{\relax}}
|
|
\newcommand\flblankpage{%
|
|
\null
|
|
\vfill
|
|
\@flputfig%
|
|
\vfill
|
|
%\thispagestyle{empty}%
|
|
\clearpage%
|
|
% \addtocounter{page}{-1}
|
|
\ifbool{flcontinue}{
|
|
\afterpage{\flblankpage}
|
|
}
|
|
}
|
|
|
|
\iffalse
|
|
% Example
|
|
|
|
% Add this at the beggining of the document:
|
|
\afterpage{\flblankpage}
|
|
|
|
\fladdfig{%
|
|
\centering
|
|
\includegraphics[scale=1]{Image1}
|
|
\caption{Test}
|
|
\label{Ima1}
|
|
}
|
|
\fi
|
|
|
|
% Wrap figure environment
|
|
\NewEnviron{addfigure}{%
|
|
% \fladdfig{%
|
|
\BODY%
|
|
%}%
|
|
}
|