[OS X TeX] print via engine

Friedrich Vosberg fvosberg at mac.com
Sun Mar 18 11:10:18 EDT 2007


Am 18.03.2007 um 1.52 schrieb Adam M. Goldstein:

> On Mar 17, 2007, at 6:56 PM, Friedrich Vosberg wrote:
>
>> How can I send via an engine a PDF output without creating a PDF  
>> file in the directory directly to the printer dialogue box of  
>> MacOS X?
>
> Hm, could the answer to this question be as simple as: select  
> Pdftex from the "Typeset" menu in TeXShop, and then use cmd-T or  
> the "typeset" button on the toolbar?
>
> That will directly generate a PDF which will appear in the TeXshop  
> viewer.

This is not what I want to.

Let me explain: I wrote a script that produces from one existing PDF  
output (master.pdf) a new PDF (printout.pdf) file that contains three  
different versions of master.pdf by adding different backgrounds (see  
the attached FILE 1). This is only to avoid to create three PDF files  
(master1.pdf, master2.pdf, master3.pdf). So I only have to create one  
master.pdf and can printout different version by run the  
»printmachine« (see FILE 2). I do *not* need remaining files when the  
output of printmachine.tex is printed. For this purpose I want to  
define an engine that runs the »printmachine« and sends the output to  
the printer (see attached file FILE 3). How can I do that?

Kind regards, Friedrich

=FILE 1==== 8><  
================================================================
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{printmachine.sty}[2007/03/17 v0.1.0.0 RA Friedrich  
Vosberg]
% 
%----------------------------------------------------------------------- 
-------
\RequirePackage{helvet}
\RequirePackage{graphicx}
\RequirePackage{ifthen}
\RequirePackage{pdfpages}
% 
%----------------------------------------------------------------------- 
-------
\newcommand{\thefilename}{}%
\newcommand{\filename}[1]{%
   \def\thefilename{#1}%
}%
% 
%----------------------------------------------------------------------- 
-------
\newcommand{\thefileprocessor}[1]{%
   \AddToShipoutPicture{%
     \AtTextCenter{%
       \makebox(0,0)[c]{%
         \resizebox{\textwidth}{!}{%
           \rotatebox{50}{\textsf{\textbf{\textcolor[gray]{0.8}{#1}}}}%	
         }%
       }%	
     }%
   }%
   \includepdf[pages=-]{\thefilename}%
   \ClearShipoutPicture%
}
% 
%----------------------------------------------------------------------- 
-------
\AtBeginDocument{%
   \includepdf[pages=-]{\thefilename}%
   \thefileprocessor{CERTIFIED}%
   \thefileprocessor{COPY}%
}
==== ><8  
===================================================================EOF=

=FILE 2==== 8><  
================================================================
%!TEX TS-program = printmachine
\documentclass[a4paper]{ltxdoc}
\usepackage{printmachine}
% 
%----------------------------------------------------------------------- 
-------
\filename{}
% 
%----------------------------------------------------------------------- 
-------
\begin{document}
\end{document}
==== ><8  
===================================================================EOF=

=FILE 3==== 8><  
================================================================
#!/bin/sh
pdflatex  -shell-escape "$1"
rm printmachine.tex
rm printmachine.log
rm printmachine.aux
==== ><8  
===================================================================EOF=



--
An Apple a day keeps the doc(tor) away.
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list