I've discovered this post to define the command addfig{}
to put figures on the right page.
My problem is that it doesn't work if the figure is a verbatim
element.
Here is a minimal not working example :
\documentclass[a4paper,twoside,12pt]{article}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[labelsep=endash]{caption}
\usepackage{afterpage}
% The addfig function definition
\makeatletter
\newcommand\@addfig{\relax}
\newcommand\addfig[1]{\global\long\def\@addfig{#1}}
\newcommand\@putfig{\@addfig\addfig{\relax}}
\newcommand\blankpage{%
\null
\vfill
\@putfig%
\vfill
\thispagestyle{empty}%
\clearpage%
\addtocounter{page}{-1}
\afterpage{\blankpage}}
\makeatother
\begin{document}
\afterpage{\blankpage}
\addfig{ % The example work without it
\begin{figure}
\begin{verbatim}
Something
\end{verbatim}
\caption{content of the caption}
\end{figure}
}
First Page
\end{document}
Is there a way to redefine the command to accept verbatim
?
\begin{figure}
? – David Carlisle Jun 3 '15 at 13:52\afterpage{\blankpage}
at the beginning of the document add blank page after each page. The commandaddfig
move the figure on this blank page. It's usefull to set all figures on the backside of the page to print it.\begin{figure}
alone just add the figure in the text. That's not what I want. – Thibaut Guirimand Jun 3 '15 at 13:59\clearpage\begin{figure}
(or variants using\cleardoublepage
or\cleartoevenpage
(eg here – David Carlisle Jun 3 '15 at 14:14