[texhax] help: Mirror postscript file

Heiko Oberdiek heiko.oberdiek at googlemail.com
Mon Aug 9 08:47:19 CEST 2010


On Mon, Aug 09, 2010 at 11:15:06AM +0530, Ganesh Sharma wrote:

> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Please configure your mail client to generate plain text instead
of HTML.

> I have some dvi files &amp; I want to have mirror postscript files of
> these files.

> Kindly explain the method of getting mirror postscript files of dvi
> files.

A solution for LaTeX that is independent from the driver
(can also be adopted for plain TeX):

\documentclass{article}
\usepackage{graphicx}
\usepackage{atbegshi}
\usepackage{ifpdf}
\newcommand*{\thehorigin}{1in}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname pdfhorigin\endcsname\relax
\else
  \ifpdf
    \renewcommand*{\thehorigin}{\pdfhorigin}%
  \fi
\fi
\AtBeginShipout{%
  \global\setbox\AtBeginShipoutBox=\hbox to \wd\AtBeginShipoutBox{%
    \kern-\thehorigin
    \reflectbox{%
      \hbox to \paperwidth{%
        \kern\thehorigin
        \box\AtBeginShipoutBox
        \hss
      }%
    }%
    \hss
  }%
}
\begin{document}
\section{Hello World}
\end{document}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list