Page size 

A4:            209 x 296 mm
Letter:        215 x 279 mm

A4 paper has the dimensions (width x height) 210 mm x 297 mm, whereas Letter paper has the dimensions 8.5" x 11" (= 215.9 mm x 279.4 mm).

Pagesize and Orientation 

Combinations 

In tex, using \documentclass 

Here are samples you can use to alter the page size/orientation and base font size:

\documentclass[10pt]{article}
\documentclass[11pt]{article}
\documentclass[12pt]{article}
\documentclass[a4paper,12pt]{article}
\documentclass[letterpaper,12pt]{article}
\documentclass[letterpaper,landscape,12pt]{article}
\documentclass[letterpaper,landscape,12pt,twocolumn]{article}

From dvi to ps 

dvips -t letter file.dvi
dvips -t a4 -t landscape file.dvi

Using the geometry package 

The geometry package can issue the commands necessary to ensure the correct size is used. If geometry is used when a document is being processed by either PDFLaTeX or VTeX, it will set the neccesary dimensions as a matter of course. If the document is being processed by LaTeX on a TeX or e-TeX engine, there are two package options (dvipdfm and dvips) which instruct geometry which \special commands to use.

So, the resolution of the problem is to add

\usepackage[dvixxx,...]{geometry}

(where dvixxx is your current favourite DVI driver), and the document will run correctly with any of LaTeX (whether or not run on VTeX) or PDFLaTeX.

E.g.,

\usepackage[dvips,dvipdfm]{geometry}

Letter 

Portrait 

\documentclass[letterpaper]{article}
dvips -t letter file.dvi
ps file:
%%Title: xxx.dvi
%%Pages: 1
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%DocumentFonts: CMCSC10 CMSY6 CMSSI8 ShanHeiSun-Light-08

Landscape 

\documentclass[letterpaper,landscape,12pt]{article}
dvips -t letter -t landscape file.dvi
ps file:
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Landscape
%%BoundingBox: 0 0 612 792
%%DocumentFonts: CMCSC10 CMSY6 CMSSI8 ShanHeiSun-Light-08

A4 

Portrait 

\documentclass[a4paper]{article}
dvips -t a4 file.dvi
ps file:
%%Title: xxx.dvi
%%Pages: 1
%%PageOrder: Ascend
%%BoundingBox: 0 0 596 842
%%DocumentFonts: CMCSC10 CMSY6 CMSSI8 ShanHeiSun-Light-08

Landscape 

\documentclass[a4paper,landscape,12pt]{article}
dvips -t a4 -t landscape file.dvi
ps file:
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Landscape
%%BoundingBox: 0 0 596 842
%%DocumentFonts: CMCSC10 CMSY6 CMSSI8 ShanHeiSun-Light-08

documented on: 2004.04.29

Page margins lost during ps2pdf conversion of landscape mode 

Hi,

I need to create this two-column landscape file, which showed up well as .ps file. The problem is that I also need to share it with those Windoze user, some who might not even know of the .ps format. Pdf file seems to be the only file that can still hold the two-column landscape format after the conversion (out of .html and .rtf files).

But the problem is that the page margins are lost after the conversion. The content shift from the center of the page to the lower left corner.

I've been trying my best to solve the problem myself, googling the posting archives, trying dvipdf or pdfelatex… now I'm at the end of my imagination.

Does any know a solution to this two-column landscape file sharing problem?

Thanks a lot

PS. Test file included

\documentclass[twocolumn,landscape]{article}

%% Preamble
\title{The Title}
\author{The Author}
\date{}

\setlength{\parindent}{0pt}

%% Body
\begin{document}
\maketitle

blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah

...

\end{document}

Page margins lost during ps2pdf conversion of landscape mode 

> But the problem is that the page margins are lost after the
> conversion. The content shift from the center of the page to the
> lower left corner.

You did not say what paper size you wanted. I am assuming it is US letter which is what article.cls defaults to. You also did not say what application you are using to make the PDF file.

Use testflow to check out your settings:

http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow/

My best guess is that your Ghostscript based ps2pdf is using A4 papersize.

What does the BoundingBox line say in your .ps file?

Using dvips -T 11in,8.5in file, I obtain a BoundingBox of:

%%Orientation: Landscape
%%BoundingBox: 0 0 612 792

which is correct.

Using the ps2pdf script mentioned in testflow, I then get what appears to be a proper PDF file. Ghostscript can make mistakes when guessing the orientation if the page contains rotated text. See:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=NBIHa.42%24op3.2%40nwrddc04.gnilink.net

for details.

You can also pass paper size commands to dvips and pdftex via these commands in your preamble:

\makeatletter
\@ifundefined{pdfpageheight}{% not using pdflatex, setup paper size for dvips
% Warning: this sets dvips to US letter landscape irrespective of the
% real document settings
\special{papersize=11in,8.5in}}%
{% using pdftex, set paper size for pdftex
\global\pdfpageheight\paperheight\global\pdfpagewidth\paperwidth}
\makeatother

The pdflatex, but not dvips part, will auto-adjust as the document paper size changes. With the above, pdflatex should work just great with whatever paper size you throw at it.

A set of commands like the above, except a more complex one that adjusts the dvips special settings with changes to the document paper size options, should be part of all future versions of the base classes, IMHO.

Mike Shell

Printer paper sizes 

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=papersize

Paper sizes can be a pain: they're a forgotten backwater, because there's no DVI command to specify the paper size of the document. One usually finds American "letter" paper size being used, by default, in macro packages (such as plain and LaTeX); but distributions provide configuration files for DVI drivers (and since most distributions originate in Europe, the drivers usually default to ISO "A4" paper size).

An interestingly different issue arises for users of PDFTeX - the PDF format does have the means of expressing paper size, but much of the core software predates PDFTeX, so not even PDFLaTeX sets the correct values into \pdfpagewidth and \pdfpageheight.

The geometry package (whose main business is defining typeset page areas), also takes notice of the paper size the document is going to print to, and can issue the commands necessary to ensure the correct size is used. If geometry is used when a document is being processed by either PDFLaTeX or VTeX, it will set the neccesary dimensions as a matter of course. If the document is being processed by LaTeX on a TeX or e-TeX engine, there are two package options (dvipdfm and dvips) which instruct geometry which \special commands to use. (Note that the options are ignored if you are using either PDFLaTeX or VTeX.)

So, the resolution of the problem is to add

\usepackage[dvixxx,...]{geometry}

(where dvixxx is your current favourite DVI driver), and the document will run correctly with any of LaTeX (whether or not run on VTeX) or PDFLaTeX.

Landscape mode 

Newsgroups: comp.text.tex
Date: 1999/06/28

I have bought 2 books on LaTex, but can not figure out how to compile (print) my .tex file in landscape mode.

My file looks like this:

\documentclass[letterpaper,landscape]{article}
\begin{document}
lots of text....
\end{document}

I run this:

latex data.tex
dvips -t landscape data.tex -o
gv -swap -antialias -scale 1 data.ps

Problems with landscape… 

> This works, but is not acceptable.  Why do I have to tell dvips to use -t
> landscape?  Isn't this why I specified landscape in the source file?  And
> why do I have to use -swap on gv?
>

You aren't doing anything wrong. The landscape option just sets the paper dimension right. (It swaps width and height) You are supposed to use dvips to rotate the dvi-file. I don't know why your margins are wrong - it works fine for me.

There are two possibilties:

  1. If only some pages (or the document is short) you can use the landscape-package 'lscape.sty' that rotates the text in a portrait paper. Then you can drop the '-t l..' option of dvips and '-swap' of gv.

  2. Using the landscape option it's impossible (?) to avoid the '-t l..' option of dvips, but you can (maybe) fix the margins and avoid the swap of gv using this bit of PS-code:

Insert the following code just before the "%%EndSetup" comment line into your PostScript files:

 ---snip---
  /my_beginpage
  {currentpagedevice/PageSize get aload pop translate
-1 -1 scale} cvlit def
  currentpagedevice/BeginPage known
  {<< %start of dict construction
   /BeginPage
  [currentpagedevice/BeginPage get cvlit aload pop % get the original
    my_beginpage aload pop % append own code
   ] %make an array
   cvx % make executable
   >> %now the constructed dict contains the key value pair
      % /BeginPage {old code appended code}
   }
   {<</BeginPage {pop my_beginpage aload pop}>>
   }ifelse
  setpagedevice
 ---snip---

I hope this was any help.

Hans Fredrik Nordhaug

Problem with landscape in article class 

Newsgroups: comp.text.tex
Date: 1995/05/29

I'm trying to set a table in LaTeX, and since it will have long entries, decided that landscape would be best for it. The output looks like the new dimensions aren't getting to (La)TeX, as it seems to be using the portrait textwidth (unless the margins are changed for landscape?). Would someone be able to tell me what is happening here, or am I missing something obvious :-) .

Input file

\documentclass[landscape]{article}
\begin{center}
{\LARGE A Centred Heading}
\begin{tabular}{llllll}
text  & more text here  & a little text  & a little more text
& text & a lot more text for TeX to typeset, but which overflows the hbox.
\end{tabular}
\end{center}
\end{document}

From .log file: overfull \hbox (150+ pt too wide)…

Problem with landscape in article class 

The last column should be 'p' instead of 'l'.

T

Problem with landscape in article class 

If you will be using dvips as your dvi driver, you can use the rotating package from your nearest CTAN. The rotating package defines an environment sidewaystable.

Jeffrey Goldberg

Problem with landscape in article class 

I have tried a similar one. It works with 'ReVTEX'. But I have found it more convenient to usr the style file 'portland.sty' which can be got from CTAN. And see similar articles posted in this group some days ago.

ZxZ

Landscape mode for one page only 

Newsgroups: comp.text.tex
Date: 1998/09/25
> Can anyone tell me how to switch to landscape mode for one page (I have a
> wide table)?  I also need the page number to remain in the same place (i.e.,
> as if it was still in portrait mode).
\usepackage{lscape}
\begin{landscape}
Some stuff
\end{landscape}

Boris

11x17 Landscape Layout 

Newsgroups: comp.text.tex
Date: 2000/04/27
> b)When I have wide equations (and I have some VERY wide ones),
> traditionally I've used:
>
> \begin{figure*}
> \begin{equation}
> ...
> \end{equation}
> \end{figure*}
>
> This works great for technical papers, and lets me have huge equations
> that span the columns.
>
> Can I use this same trick and get equations that are very huge
> (something like 15 inches) across, that span both of my "columns"?

You can, but why not try the multicol package? This allows you to switch between different numbers of columns in the middle of your text. You could do something like

first line      third line
second line     fourth line
a very large equation
fifth line      seventh line
sixth line      eighth line
\documentclass{article}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
first line\\
second line\\
third line\\
fourth line
\end{multicols}
\[
  \mbox{a very long equation}
\]
\begin{multicols}{2}
fifth line\\
sixth line\\
seventh line\\
eighth line
\end{multicols}
\end{document}

Thomas Lotze

including files in landscape with 2 columns 

Newsgroups: comp.text.tex
Date: 1995/10/08
> So what I want to do is to write my appendices 2 to a page (landscape
> and 2 columns).
> Does anyone know of a good package(s) I can use to do this?

I think you could do it with the help of the package 'portland.sty' and 'multicol.sty'. You would be able to find them at any CTAN sites. A simple example would look like this:

\documentclass{article}
\usepackage{portland}
\usepackage{multicol}
\begin{document}

Here, one-column portrait text.

\begin{landscape}
\begin{multicols}{2}

Here, two-column landscape text.

\end{multicols}
\end{landscape}
\end{document}

ZxZ

lanscape-mode two side-by-side figures 

Newsgroups: comp.text.tex
Date: 2000/05/06

I just tested 'multicol' and 'lscape' packages. They work fine together. You can do it this way:

\usepackage{lscape}
\usepackage{multicol}
...
\begin{landscape}
 \begin{figure}
  \begin{multicols}{2}
%your graphics here
\caption{your caption}
%another graphics
\caption{another caption}
  \end{multicols}
 \end{figure}
\end{landscape}

The .dvi looks incorrect in Xdvi. But you can dvips it to .ps and it looks right in ghostview and on hard copy.

Xiaotian

double column section 

Newsgroups: comp.text.tex
>Please show me how to change one of my appendix chapters into double
>column output. Thanks

A short test file that shows the principle and commands:

\documentclass{article}
\begin{document}
Hello World
\twocolumn[\section{abc}]
First column\newpage Second column
\onecolumn
One column again \hfill end of line.
\end{document}
Heiko

double column section 

Or in plain tex:

\input eplain
Hello World
\doublecolumn
First column text...
\columnfill
Second column text...
\singlecolumn
One column again.
\bye

If the \columnfill command is omitted then the columns are automatically balanced, a nice feature.

Most users mean LaTeX, not plain TeX when they ask about TeX. The above example just illustrates in a small way why I prefer the simpler life under the plain TeX tent (more control, fewer keystrokes.)

John Culleton

two columns text in a page (????) Journals style. 

Newsgroups: comp.text.tex
Date: 1996/06/13

http://groups.google.com/groups?hl=en&selm=4pojf9%249pt%40pss100.psi.ch

>How do u get two columns text in a page? Do I have to include it in
>the documentclass options?

There are two ways. Either you use LaTeX's \twocolumn command, which will however not balance the columns and will not allow you to switch between one- and two-column mode on one and the same page. Or you use the multicol package, which implements the multicols environment, which lets you switch between one-, two-, … , five-column mode without starting a new page. The package is available on CTAN (ftp.tex.ac.uk).

Alain Kessi

Help with putting two-col and one-col text on same page.. 

Newsgroups: comp.text.tex
Date: 1995/12/21

http://groups.google.com/groups?hl=en&selm=21DEC199515201096%40reg.triumf.ca

>column and two column text as done in journals.

This is also as done in LaTeX!

\documentclass[twocolumn]{article}
\title{This s long title spanning the whole line.}
\author{Names}
\begin{document}
\maketitle
...
\end{document}
Donald Arseneau

style definitions in document 

> I put some definitions in my document, but I get the error:
> ! Use of \@ doesn't match its definition.

This is the case where you have to include \makeatletter before the definitions to allow the "internal" LaTeX commands to be accessed.

There are several internal LaTeX commands that are protected from change by having @ in them. Since @ is not a letter, it is normally not allowed as part of a multi-letter command name. To access internal commands you need to tell LaTeX to pretend that @ is a letter. This happens automatically when LaTex reads a style file, but in your main documant you need to surround the offending commands with \makeatletter…\makeatother. Your definitions should be in a style file anyway, and after moving them there you should have no problem.

LaTeX and multi-column output 

http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/columns.html

Two column output 

Most classes take a [twocolumn] option command switches to single column output and the \twcolumn command switches back, but both commands start a new page.

Putting page-wide items into a two column document can pose problems

In twocolumn mode, \newpage and \pagebreak start a new column whereas \clearpage and \cleardoublepage always start new pages.

In a twocolumn document, the ftnright package puts footnotes only under the right columns.

Switching between different formats - multicol 

The multicol package lets you change the number of columns in mid-page and its effect can extend over several pages. The columns on the final page are balanced (equal height) by default.

Here's an example of getting 3-column output.

\begin{multicols}{3}{
Put the text here. Maths, tabulars, pictures etc are all ok (but not
figures and tables). Remember to load in the \texttt{multicol}
package at the top of your document.
}
\end{multicols}

Figures present a problem in a multicol environment. See the multicol hints page for details. http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/multicol_hint.html

Balancing columns at the end of a document 

See the LaTeX FAQ. http://www.tex.ac.uk/cgi-bin/texfaq2html?label=balance

Details 

The gap between columns is controlled by \columnsep. The width of the column rule is controlled by \columnseprule.

Booklets 

Newsgroups: comp.text.tex
 > Is their some nice and easy (or even not-so-easy) way to produce a booklet
with LaTeX2e? prefably with A5 pages on A4 sheets

The following approach is for letter paper folded in half, but could be modified for other sizes. Start by creating the document in the size desired, e.g.,

\documentclass[twoside,11pt]{article}
\setlength{\paperwidth}{5.5in}   % half the long dimension
\setlength{\paperheight}{8.5in}
\setlength{\topmargin}{2.8in}
\setlength{\textheight}{6.9in}
\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{-0.3in}
\setlength{\textwidth}{4.0in}
\begin{document}
etc.

Then run latex/bibtex/makeindex/dvips as usual to generate the ps file (e.g., manual.ps), followed by:

# Reorder pages in booklet order
psbook manual.ps manual1.ps
# Merge pages in 2up landscape format
psnup -pletter -l -s1.0 -2 manual1.ps manual2.ps

Psbook and psnup are part of psutils, which comes with Miktex. Manual2.ps is the result. If not using a duplex printer, print even pages followed by odd using gsview.

Gordon Everstine

How to print PDF as booklet 

Newsgroups: comp.text.tex
Date: 2003-12-01 13:34:13 PST
> Is it possible to print a PDF file as a booklet or, rather, as a
> book? I have the documentation file for the memoir class,
> memman.pdf, and I would like to print it as a book, i.e. page 1-16
> as a separate booklet, 17-32 as a booklet etc. How can the printer
> be instructed to order the pages appropriately and possibly even
> reduce them in size to fit on a landscape A4-page?
pdftops memman.pdf memman.ps
psresize -P letter -p a4 memman.ps memman-a4.ps
psbook -s16 memman-a4.ps memman-signatures.ps

What I'd do is grab the source file, add "a4paper" to the class options, and build a real A4 version. Then send either a PS or PDF file to your printer and have them sort out the signatures.

Philipp Lehman

PS files and PS printers 

Newsgroups: comp.text.tex
> > > > Can PS printers directly handle PS files? I.e., is it ok to send a
> > > > PS file directly to a PS printers without any drivers/translators,
> > > > etc?
> > >
> > > Yes.
> >
> > Depending on the file and the printer, you may have to add a
> > Ctrl-D to the end of the file to get the last page ejected.
> > Otherwise you might have to hit the "form-feed" or
> > "on-line/off-line" to get it to spit out the last page.
>
> Oh, good. Last time, I didn't succeed doing so.
>
> I used to print from my Linux, to a network printer. Last time, when
> our network was down, I hooked up the printer directly to a laptop
> and issued the following command in pure DOS (no Windoze interfered):
>
> copy /B file.ps prn:
>
> The above command sends the PS file directly to the PS printers (HP5)
> without any drivers/filters. But I got garbages in output. Anybody
> know what's went wrong? Any tips if I have to do it again? thanks

IIRC, LJ5 printers can be set up to expect either PS or PCL. There is a PCL command to switch to PS mode (and vice-versa). If the printer is expecting PS, then it should work. If it's expecting PCL, then you've got to put a PCL command in front of the file that switches the printer into PS mode. I don't remember what that PCL command is.

Grant Edwards

PS files and PS printers 

Could be the preamble (non-postscript, and often non-ascii data at the beginning of the file).

Could also be that .ps file was designed for a particular printer (it is possible to make a device-dependant .ps files and some printer drivers do).

MicroPress, Inc.

Printing Barcodes 

Newsgroups: comp.text.tex
Date: 1998/01/29
> I am looking for *free* tools to print bar codes.

A quick search in http://www.infoseek.com/ yielded:

http://www.adams1.com/pub/russadam/share.html

A lot of tips there.

Jon Haugsand

Printing Barcodes 

there are at least two barcode fonts on ctan under (!) fonts/barcodes

willadt's version seems to be rather well documented and organised, but i've never tried using it.

there's also olsak's macros/generic/ean, which incidentally contains an update of the ocrb fonts (which he doesn't feel confident of replacing on the archive in their fonts/ position).

Robin Fairbairns

Printing Barcodes 

> there's also olsak's macros/generic/ean, which incidentally contains
> an update of the ocrb fonts (which he doesn't feel confident of
> replacing on the archive in their fonts/ position).

they're very nice. i use them with a true orc-b (type 1) and i modified them to be more accurate at low resolutions (simply made the basic dimens an integer multiple of a 1in/300 dot)

The codes output on a deskjet were easily recognized.

Thierry Bouche

Printing Barcodes 

> What tools (not necessarily restricted to TeX) can you
> recommand?

There are two problems in printing barcodes:

  1. Printing itself. This is easily emulated by \rule's

  2. Calculation of control characters (most barcode schemes have some sort of checksums). This can be done by TeX.

I faced this problem when I designed my envlab package (see CTAN or my home page). It printed barcoded postal indexes according to the US Postal Service rules. I implemented there methods for automatic extraction of zip codes, calculating checksums and printing. I think a barcode printing package based on these methods is relatively easy to implement---especially for such TeX guru as Joerg Knappen.

Boris http://www.plmsc.psu.edu/~boris/

Printing Barcodes 

> I am looking for *free* tools to print bar codes.

In case you're talking about ean-codes, have a look at

ftp.dante.de/tex-archive/macros/generic/ean/*

works fine

Jan

Printing Barcodes 

Thanks to all who have replied to my query.

We finally decided to use the ean package (tex-archive/macros/generic/ean).

J"org Knappen

LaTeX for business/financial applications 

Newsgroups: comp.text.tex
Date: 2001-05-01 12:25:38 PST
: For some time, if been looking for LaTeX packages to do
: business/financial documents, such as invoices, offers, balances etc.
: However, I have never found anything useful in this area. Are there any
: of such packages been written? Where can I find them? Or am I the only
: one using LaTeX in this area?

I am using LaTeX regularly for charging my clients. I made an invoice environment where I

  1. Announce the project to which costs and fees are charged

  2. List my fees as multiples of a unit (day or hour)

  3. List all my expenses in their native currency

  4. Either start a new project to charge, OR

  5. say "Sum" which will print subtotals for all fees, expenses and taxes and will also print a total, as needed.

The package is being used in alpha stage for about one year, I never bothered publishing it. The nice thing is that it does all its calculations automagically, you simply enter once things like base currency and tax rate, and the rest is done by heavy usage of calculation macros.

The system is very fault-tolerant because I designed the sequence of projects, fees, expenses, subtotals and main totals in such a way that whenever a new project is started without preceding subtotal (of the preceding project), then the subtotal is generated first. Kind of a finite state automaton, also in its implementation.

I'll make it "camera-ready" and upload it to CTAN within the next days. Perhaps it is already a starter.

Dr. Oliver Corff

numbered copies of document 

Newsgroups: comp.text.tex
Date: Thu, 02 Mar 2006

I have an project where the copies of report should be numbered like

year mounth day
    <numb>

where <numb> is number of printed copy. this number should appear as "wattermark", so i experimented with eso-pic package. it work fine, but i haven't any idea how to achieve that for example if i need 18 copies of report, that at each printing of copy the <numb> will be incremented …

i try something like this:

\documentclass{article}
        \usepackage{eso-pic,xcolor}

    \newcounter{copy}
     \newsavebox{\watermarkbox}
     \sbox\watermarkbox{\textcolor{yellow}{osnutek}}
%---------------------------------------- printing watermark text
     \AddToShipoutPicture{\addtocounter{copy}{1}% numbered watermark
     \sbox\watermarkbox{\textcolor{yellow}{
         \parbox[t]{6em}{\quad\centering{\footnotesize 20060302}\\[-1ex]
                        \quad\thecopy}}}   }
\AtTextCenter{\makebox[0pt]{
               \scalebox{16}{
               \rotatebox[origin=b]{45}{
               \usebox{\watermarkbox}}}}}
                     }%end of watermark

        \begin{document}
document with numbered copies in watermark
        \end{document}

but this not increment counter copy at printing … (expected, since in pdf document in such way can not be) … so i need some another approach to solve this. Any idea how?

regards, Zarko

numbered copies of document 

Try something like the following:

% a simple test document called "myNumber.tex"
\documentclass{article}

\newcounter{copy}

\begin{document}

  \Huge\thecopy

\end{document}

Then type at the command line

pdflatex '\AtBeginDocument{\setcounter{copy}{17}}\input{myNumber.tex}'

The correct (incremented) number instead of "17" must be calculated inside a script (shell script?).

Rolf Niepraschk

numbered copies of document 

> Try something like the following:
> % a simple test document called "myNumber.tex"
> [...]

Similar (untested):

\documentclass{article}
\providecommand\ThisCopy{0} % 0 only applies if \ThisCopy is not already
           %  defined, se below
\begin{document}
  \Huge\thecopy
\end{document}

pdflatex '\def\ThisCopy{12}input{myNumber.tex}'

(just less code ;-)

it might even be an idea to just the -jobname option.

the idea is of course to have the same source code and use an external source to get the numbers for the different copies. But you wil have to recompile each time.

/daleif

LaTeX FAQ

numbered copies of document 

Once TeX makes a document (the dvi or pdf file), the printing process doesn't change it (except perhaps PDF might allow some embedded script that might do that).

You can probably insert some simple PS code with a \special, create a .ps document and then print it with

'gs -sCopyNumber="17" ...',

but I don't know enough postscript to either tell what the code should be (except that would have to reference CopyNumber) nor what the "…" should be.

Surely there are ps-to-ps scripts that will impose a watermark? Or even clever lpr …

If worse came to worse, you could print sheets with the watermarks only and load them in the copier….

Dan Luecking

numbered copies of document 

> If worse came to worse, you could print sheets with the watermarks
> only and load them in the copier....

i was thinking about how to avoid these obstacles, result is the following (very rudimentary) solution :

\documentclass{article}% or whatever
       \usepackage{eso-pic,graphicx,ifthen}

     \newcounter{copynum}\newcounter{NumCopy}

     \AddToShipoutPicture{\AtTextCenter{\makebox[0pt]{
         \scalebox{4}{\rotatebox[origin=b]{45}{
                             copy no. \thecopynum}}}}
                         }

     \begin{document}
     \setcounter{NumCopy}{3}%<number of document copies>}

     \whiledo{\thecopynum<\theNumCopy}{%
       \newpage
       \setcounter{page}{1}% something for initialization of "document"
       \addtocounter{copynum}{1}

       \input{document}
     }% end whiledo
     \end{document}

%---------------
% file document.tex

     \centering
     \Huge   Hello!  Hello!  Hello!
\newpage
             Hi!     Hi!     Hi!
     \endinput

short test show, that this code do what i need (for now). i afraid that here can arise some problems, if the "document" is large and large number of copies is requested … then the pdf file can become too huge. but for now i will left this for later consideration.

thank you for your answer!

documented on: 03 Mar 2006, Zarko