lamme2024-scientific-project/sty/floatlefttextright.sty

48 lines
1.1 KiB
Plaintext
Raw Normal View History

% https://www.developpez.net/forums/d910711/autres-langages/autres-langages/latex/mise-forme/texte-recto-figures-verso/
% Solution by Martigan on Developpez.net
2024-03-21 19:36:09 +01:00
\iffalse
\RequirePackage{afterpage}
\RequirePackage{caption}
\newcommand\@addfig{\relax}
\newcommand\addfig[1]{\global\long\def\@addfig{#1}}
\newcommand\@putfig{\@addfig\addfig{\relax}}
2024-03-21 19:36:09 +01:00
\newcommand\flblankpage{%
\null
\vfill
2024-03-21 19:36:09 +01:00
\begin{figure}[H]
\captionsetup{type=figure} % Warning: this could be faulty if tables are required
\@putfig%
2024-03-21 19:36:09 +01:00
\end{figure}
\vfill
\thispagestyle{empty}%
\clearpage%
2024-03-21 19:36:09 +01:00
%\addtocounter{page}{-1}
\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}
\addfig{%
\centering
\includegraphics[scale=1]{Image1}
\caption{Test}
\label{Ima1}
}
\fi
2024-03-21 19:36:09 +01:00
\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}