2

I want to prepare a .tex document using TeXStudio satisfying the following:

  • Take an A4 size paper.

  • What ever is written in the top half of the page.

  • Same writing will be reflected on the bottom half of the page.

  • Whether I read from top or bottom it is the same, i.e., same margin (top,bottom), indent etc.

  • Like the following example below.

I want this

  • 1
    Use a \savebox, minipage and \rotatebox (from the graphicx package). Stick a \vfill in between the top and bottom \usebox. If you want text to flow across pages, that will be much more difficult. – John Kormylo Sep 30 '15 at 4:10
  • 2
    Or you can do it in two steps. Create a half page document (literally) then use pdfpages or \includegrahics to copy these pages into a new document. – John Kormylo Sep 30 '15 at 4:14
  • Your first comment is not clear to me, Please give a minimal example. – Litun John Sep 30 '15 at 5:59
  • Second one is okay. But every time I write any thing I have to take the half page and include it as a figure file, which is not a good idea. Is there any other way to do this? In my example even though I have presented boxed material, but my intention was for all (documents as well as figures). For Example In case of Exam class I want my questions reflected as above in a page, so that I can save paper. – Litun John Sep 30 '15 at 6:19
  • I think @JohnKormylo's 2nd solution is the best easy one. you need 2 files .tex let say source.tex and final.tex you don't need to change any thing in final.tex you just use it to produce your final output. – touhami Sep 30 '15 at 8:13
4

Package atbegshi captures the output box before it is shipped out. This can be used to place a rotated copy of the page on the output page:

\documentclass{article}

\usepackage[a4paper, margin=15mm]{geometry}
\addtolength{\textheight}{-.5\paperheight}

\usepackage{graphicx}
\usepackage{picture}
\usepackage{atbegshi}
\AtBeginShipoutInit
\AtBeginShipout{%
  \AtBeginShipoutUpperLeft{%
    \put(\paperwidth, -.5\paperheight){%
      \rotatebox{180}{%
        \smash{\hbox to 0pt{\kern1in\copy\AtBeginShipoutBox\hss}}%
      }%
    }%
  }%
}

\usepackage{blindtext}

\begin{document}
  \blinddocument
\end{document}

First two pages:

Page 1 Page 2

  • This is the code I was searching for. – Litun John Sep 30 '15 at 11:48
2

THis the source.tex

\documentclass{article}
\usepackage[a5paper,landscape]{geometry}


\usepackage{blindtext}% just for dummy example
\begin{document}
\blinddocument
\end{document}

enter image description here and this is your final.tex produce the output you dont need to change it every time.

\documentclass{article}
\usepackage[a4paper,scale=1]{geometry}
\usepackage{graphicx}
\newcounter{mtpage}

\setlength{\parindent}{0pt}
\begin{document}
\loop
\stepcounter{mtpage}
\includegraphics[scale=.99,page=\value{mtpage}]{doc1.pdf}
\vfill\includegraphics[scale=.99,angle=180,page=\value{mtpage}]{doc1.pdf}
\newpage
\ifnum\value{mtpage}<\pdflastximagepages
\repeat
\end{document}

enter image description here

  • Is there any alternative to this method. Is it possible to get the required result from your Source.tex file, with out using any other .tex file (final.tex). – Litun John Sep 30 '15 at 9:37
  • @LitunJohn see Heiko Oberdiek's answer. – touhami Sep 30 '15 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.