3

I have cut my page in four parts using \pgfpagesuselayout{4 on 1}[a4paper] command. Now there are let's say four quadrants in my page. Since {3 on 1} is not available in this environment, I want to have two portrait style pages in the upper half and one landscape style page in the lower one. In other words, I want to have three pages on one page (two portrait style and one landscape). Is it possible?

This is my preamble

\documentclass{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{Marathi}

\begin{document}

\end{document}

I want such division of my page.

1 Answer 1

3

You can define your custom 3 on 1 layout:

\documentclass{article}

\usepackage{lipsum}

\usepackage{pgfpages}

\pgfpagesdeclarelayout{3 on 1}
{
  \edef\pgfpageoptionheight{\the\paperheight} 
  \edef\pgfpageoptionwidth{\the\paperwidth}
  \edef\pgfpageoptionborder{0pt}
}
{
  \pgfpagesphysicalpageoptions
  {%
    logical pages=3,%
    physical height=\pgfpageoptionheight,%
    physical width=\pgfpageoptionwidth%
  }
  \pgfpageslogicalpageoptions{1}
  {%
    border shrink=\pgfpageoptionborder,%
    resized width=.5\pgfphysicalwidth,%
    resized height=.5\pgfphysicalheight,%
    center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
  }%
  \pgfpageslogicalpageoptions{2}
  {%
    border shrink=\pgfpageoptionborder,%
    resized width=.5\pgfphysicalwidth,%
    resized height=.5\pgfphysicalheight,%
    center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}%
  }%
  \pgfpageslogicalpageoptions{3}
  {%
    border shrink=\pgfpageoptionborder,%
    resized width=.5\pgfphysicalwidth,%
    resized height=.5\pgfphysicalheight,%
    center=\pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight},%
  }%
}

\pgfpagesuselayout{3 on 1}
\begin{document}

\lipsum\lipsum\lipsum

\end{document}

enter image description here

8
  • As per your instructions the output that I got was also rotated. I want it to look straight. Text which is not rotated and straight as we get it in the {2 in 1}. In the upper half I want 2 portrait pages and in the lower half one landscape page. Is it possible?
    – Niranjan
    Commented Jan 5, 2019 at 15:50
  • @Niranjan I'm not sure I understand what layout you have in mind. Can you draw an image how the result should look like? Commented Jan 5, 2019 at 15:53
  • I've added an image to the question, please have a look.
    – Niranjan
    Commented Jan 5, 2019 at 16:10
  • @Niranjan Please see my updated answer Commented Jan 5, 2019 at 16:16
  • Thank you so much Sam! This worked for me. Now one last thing. This is not the first page actually; it is in continuation. I don't want this division before this page and after this page too... Now how to restrict this formatting only for this page?
    – Niranjan
    Commented Jan 5, 2019 at 16:27

You must log in to answer this question.

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