3

I'm sorry I know this question has been asked several times.

I would like to get a 2 pages on 1 using pgfpages as shown by the following:

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[landscape]{geometry}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm]

But I only get that :

2 pages, one above the other

instead of getting the two pages side by side.

What's wrong ?

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage[margin = 1.5cm]{geometry}
\usepackage{babel}
\usepackage{float}
\usepackage{graphicx}
\addto\captionsfrench{\def\figurename{{\textsc{Figure}}}}
\addto\captionsfrench{\def\tablename{{\textsc{Tableau}}}}
\usepackage[official]{eurosym}
\usepackage{color}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{pifont}
\usepackage{fancyhdr}
\usepackage{fancyheadings}
\pagestyle{fancy}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper, border shrink = 5mm, landscape]

%\usepackage{multicol}
%\usepackage{fancybox}
%\usepackage{amsthm}
%\usepackage{amsmath}
%\usepackage{tabvar}
%\usepackage{wrapfig}
%\usepackage[unicode=true,pdfusetitle,%
% bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,%
% breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=true]%
%{hyperref}
\usepackage{hyperref}
\begin{document}
\lipsum


\end{document}

1 Answer 1

5

You need to add landscape to the \pgfpagesuselayout command

\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm,landscape]

And remove the [landscape] option from your \usepackage{geometry}.

Here's a minimal document that shows the correct output:

\documentclass[french, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a4paper,border shrink = 5mm,landscape]
\begin{document}
\lipsum
\end{document}

output of code

9
  • Sorry Alan and thank you but I obtain the two pages side by side on an a4 portrait
    – imotep81
    Commented Feb 17, 2018 at 15:30
  • @imotep81 But then you need to add a compilable minimal document like the one I've added to my answer that shows exactly what you're doing.
    – Alan Munn
    Commented Feb 17, 2018 at 15:42
  • In fact it's totally correct when I compile with the Texlive of my debian distribution. When I compile with TeXwriter on Android the result is not the one I hoped. Thanks
    – imotep81
    Commented Feb 17, 2018 at 16:09
  • Wrong....With your minimal document I get the same also with TeXwriter but with my initial document it doesn't work...Because I use this : \usepackage [unicode=true,pdfusetitle, bookmarks =true, bookmarksnumbered =false, bookmarksopen =false, breaklinks =false, pdfborder= {0 0 0},backref =false, colorlinks =true ] {hyperref } and when I remove it I get what I want
    – imotep81
    Commented Feb 17, 2018 at 16:46
  • @imotep81 Again, without you providing a minimal document that shows the problem, it's hard to diagnose. Adding hyperref to my example document doesn't change anything for me.
    – Alan Munn
    Commented Feb 17, 2018 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .