2024-03-20 12:19:56 +01:00
|
|
|
% https://www.developpez.net/forums/d910711/autres-langages/autres-langages/latex/mise-forme/texte-recto-figures-verso/
|
2024-04-10 13:24:58 +02:00
|
|
|
% Solution by Martigan on Developpez.net, adapted
|
2024-03-20 12:19:56 +01:00
|
|
|
|
|
|
|
\RequirePackage{afterpage}
|
|
|
|
\RequirePackage{caption}
|
2024-04-10 13:24:58 +02:00
|
|
|
\RequirePackage{etoolbox}
|
|
|
|
\RequirePackage{environ}
|
2024-04-11 17:23:20 +02:00
|
|
|
\RequirePackage{float}
|
2024-04-10 13:24:58 +02:00
|
|
|
\newbool{flcontinue}
|
|
|
|
\newcommand{\flstart}{
|
2024-04-12 06:31:37 +02:00
|
|
|
\booltrue{flcontinue}
|
|
|
|
\afterpage{\flblankpage}
|
2024-04-10 13:24:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand{\flstop}{
|
2024-04-12 06:31:37 +02:00
|
|
|
\boolfalse{flcontinue}
|
2024-04-10 13:24:58 +02:00
|
|
|
}
|
2024-04-19 05:15:33 +02:00
|
|
|
\newcommand\@fladdfloat{\relax}
|
|
|
|
\newcommand\fladdfloat[1]{\global\long\def\@fladdfloat{#1}}
|
|
|
|
\newcommand\@flputfloat{\@fladdfloat\fladdfloat{\relax}}
|
2024-03-21 19:36:09 +01:00
|
|
|
\newcommand\flblankpage{%
|
2024-03-20 12:19:56 +01:00
|
|
|
\null
|
|
|
|
\vfill
|
2024-04-19 05:15:33 +02:00
|
|
|
\@flputfloat%
|
2024-03-20 12:19:56 +01:00
|
|
|
\vfill
|
2024-04-10 13:24:58 +02:00
|
|
|
%\thispagestyle{empty}%
|
2024-03-20 12:19:56 +01:00
|
|
|
\clearpage%
|
2024-04-10 13:24:58 +02:00
|
|
|
% \addtocounter{page}{-1}
|
|
|
|
\ifbool{flcontinue}{
|
|
|
|
\afterpage{\flblankpage}
|
2024-04-12 06:31:37 +02:00
|
|
|
}
|
|
|
|
}
|
2024-03-21 19:36:09 +01:00
|
|
|
|
2024-04-19 05:15:33 +02:00
|
|
|
\newcommand{\fladdfig}[1]{
|
|
|
|
\fladdfloat{
|
|
|
|
\begin{figure}[H]
|
|
|
|
\centering
|
|
|
|
#1
|
|
|
|
\end{figure}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
\newcommand{\fladdtab}[1]{
|
|
|
|
\fladdfloat{
|
|
|
|
\begin{table}[H]
|
|
|
|
\centering
|
|
|
|
#1
|
|
|
|
\end{table}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-20 12:19:56 +01:00
|
|
|
\iffalse
|
|
|
|
% Example
|
|
|
|
|
2024-04-19 05:15:33 +02:00
|
|
|
% Add this at the beginning of the document (typically after the titlepage)
|
2024-04-12 06:31:37 +02:00
|
|
|
\flstart
|
2024-03-21 19:36:09 +01:00
|
|
|
|
2024-04-12 06:31:37 +02:00
|
|
|
% Then for each new figure you want to add, add the following
|
2024-04-19 05:15:33 +02:00
|
|
|
\fladdfloat{%
|
|
|
|
\begin{figure}[H]
|
|
|
|
\includegraphics[scale=1]{Image1}
|
|
|
|
\caption{Test}
|
|
|
|
\label{Ima1}
|
|
|
|
\end{figure}
|
2024-03-20 12:19:56 +01:00
|
|
|
}
|
2024-04-12 06:31:37 +02:00
|
|
|
|
|
|
|
% At the end of the document, to avoid a unwanted late terminated loop of empty page creation, add the following
|
2024-04-19 05:15:33 +02:00
|
|
|
\flstop
|
2024-04-12 06:31:37 +02:00
|
|
|
\fi
|