lamme2024-scientific-project/sty/floatlefttextright.sty

48 lines
1.1 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
\iffalse
\RequirePackage{afterpage}
\RequirePackage{caption}
\newcommand\@addfig{\relax}
\newcommand\addfig[1]{\global\long\def\@addfig{#1}}
\newcommand\@putfig{\@addfig\addfig{\relax}}
\newcommand\flblankpage{%
\null
\vfill
\begin{figure}[H]
\captionsetup{type=figure} % Warning: this could be faulty if tables are required
\@putfig%
\end{figure}
\vfill
\thispagestyle{empty}%
\clearpage%
%\addtocounter{page}{-1}
\afterpage{\flblankpage}
}
\iffalse
% Example
% Add this at the beggining of the document:
\afterpage{\flblankpage}
\addfig{%
\centering
\includegraphics[scale=1]{Image1}
\caption{Test}
\label{Ima1}
}
\fi
\fi
\def\@floatplacement{\global\@topnum\c@topnumber
\global\@toproom \topfraction\@colht
\global\@botnum \c@bottomnumber
\global\@botroom \bottomfraction\@colht
\global\@colnum \ifodd\c@page\c@totalnumber\else\z@\fi%<<<<<<<
\@fpmin \floatpagefraction\@colht}