Scripting a TeX document - (or other way to number pdf pages)

p.echols at comcast.net p.echols at comcast.net
Wed Apr 14 17:13:15 UTC 2010


----- "Aart Koelewijn" <aart at mtack.xs4all.nl> wrote:

> On Tue, 13 Apr 2010 23:59:40 +0000, p.echols wrote:
> 
> > 
> >> I once did almost all my textwriting with LaTeX, but have hardly
> used
> >> it
> >> for some time. But the nice thing about LaTeX is, that keeps
> lay-out
> >> and
> >> text separated as much as possible. In that it is a bit like HTML.
> >> 
> >> Now, the first line of a LaTeX file will be something like:
> >> 
> >> \documentclass[english, dutch, a4paper, 10pt]{article}
> >> 
> >> And if you will have pagenumbers or not and where they will be is
> >> usually
> >> part of that documentclass. You will never see pagenumbers
> mentioned in
> >> your LaTeX file itself. You can change your pagesize or your
> fontsize
> >> 
> >> whenever you want, and then the pagenumbers will be in the new
> places,
> >> 
> >> automatically.
> > 
> > But can you explicitly give page breaks?  If so then your script
> could
> > say:
> > 
> > * * *
> > echo '\documentclass [ appropriate formatting for page
> > numbers](article)' x=2
> > while [ $x -le $total_number_of_pages ] do
> > echo "[page break symbol]"
> > x=$[$x+1]
> > done
> > 
> > * * *
> > 
> > Now you would have a document with no text, but a bunch of pages
> that
> > would "print" blank except for the page number.  If you think that
> is
> > even remotely possible, I'll try and do some reading up on it. 
> Thanks!
> 
> I think you could make a document with a number of empty numbered
> pages 
> with:
> 
> \documentclass[some options]{your class}
> % you could put the package
> % \usepackage{fancyheadings}
> % to get a lot of control over the headings including pagenumbering
> \begin{document}
> \newpage
> \newpage
> \newpage
> \end{document}
> 
> Aart
> 
> 

This is great!  Exactly what I was asking for.  The entire process of creating such a pdf should be a pretty straightforward scripting job.  

Thanks very much.  When I have a script that does what I want, I'll post for commentary.

--PE




More information about the ubuntu-users mailing list