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

Aart Koelewijn aart at mtack.xs4all.nl
Tue Apr 13 18:55:23 UTC 2010


On Tue, 13 Apr 2010 18:00:09 +0000, p.echols wrote:

> 
> Actually, that is exactly what I was looking for, someone to tell me
> that the idea is not in the "realm of realistic" and not to go there!
> 
> My limited understanding of LaTeX is that you create a source file that
> has both text and markup.  That file is then interpreted when printed. 
> Would it be in the realm of realistic for someone such as yourself to
> identify the segments that would have to be in a script to do such a
> thing?  My analogy in "fake" html would be
> 
> <document>
> <head>
> -Format code
> -Font Code
> -etc
> </head>
> <text position=bottom-left>
> Page Number 0001
> </text>
> <pagebreak><text position=bottom-left> Page Number 0002
> </text>
> <pagebreak><text position=bottom-left> Page Number 0003
> </text>
> </document>
> 
> (For the critics, I am not good at html, but I know this is wrong, and
> why and that's not the point)
> 
> The changing parts in such a page would be few, and the result easily
> scriptable.  For my purposes, I would not have to understand the LaTeX
> code for it to work.  Something you might think of as a fun challenge?
> 

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.

LaTeX is a dream if you have to do a lot of work with a standard lay-out. 
You define that lay-out once and will never have to bother about it 
anymore. You can also change your lay-out definition and then al your new 
and your old documents can have the new lay-out.

What you want might be possible, but if it is possible, it will be rather 
difficult and will need a LaTeX expert.

Aart





More information about the ubuntu-users mailing list