lamme2024-scientific-project/sty/floatlefttextright.sty

53 lines
1.0 KiB
Plaintext
Raw Normal View History

% 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
\RequirePackage{afterpage}
\RequirePackage{caption}
2024-04-10 13:24:58 +02:00
\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}}
2024-03-21 19:36:09 +01:00
\newcommand\flblankpage{%
\null
\vfill
2024-04-10 13:24:58 +02:00
\@flputfig%
\vfill
2024-04-10 13:24:58 +02:00
%\thispagestyle{empty}%
\clearpage%
2024-04-10 13:24:58 +02:00
% \addtocounter{page}{-1}
\ifbool{flcontinue}{
\afterpage{\flblankpage}
}
}
2024-03-21 19:36:09 +01:00
\iffalse
% Example
2024-03-21 19:36:09 +01:00
% Add this at the beggining of the document:
\afterpage{\flblankpage}
2024-04-10 13:24:58 +02:00
\fladdfig{%
\centering
\includegraphics[scale=1]{Image1}
\caption{Test}
\label{Ima1}
}
\fi
2024-04-10 13:24:58 +02:00
% Wrap figure environment
\NewEnviron{addfigure}{%
% \fladdfig{%
\BODY%
%}%
}