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

Florian Diesch diesch at spamfence.net
Thu Apr 15 13:21:34 UTC 2010


p.echols at comcast.net writes:

> ----- "Florian Diesch" <diesch at spamfence.net> wrote:
>
>> p.echols at comcast.net writes:

>> --8<---------------cut here---------------start------------->8---
>> \documentclass[a4paper]{article}
>> \usepackage[T1]{fontenc}
>> \usepackage[utf8]{inputenc}
>> \usepackage{pdfpages}
>> \usepackage{hyperref}
>> 
>> \begin{document}
>> \includepdfmerge[
>>                  picturecommand={\put(500, 30){Page Number \thepage}}
>>                 ]{%
>>  some_file.pdf, 1-200,
>>  other_file.pdf, 5,7,10
>> }
>> 
>> \end{document}
>> --8<---------------cut here---------------end--------------->8---
>> 
>
> Can you change the page size in the middle of a document?  For
> example, if file1.pdf is "us-letter" and file2.pdf is "us-legal",
> could the tex file be written in a way to change the number location
> so that the number ends up the same distance from the bottom of each
> page?

Pages are scaled to the output paper size (A4 in this case, replace
a4paper at the beginning by letterpaper or legalpaper to get other
sizes).

If you want to change the location you can use multiple \includepdfmerge statements

> Here is my other question.  I think I need to read some LaTeX
> documentation on my own.  (Especially since I am sure to have more
> questions.)  Given what you know about what I am trying to do, can you
> suggest a good resource?

<http://www.tug.org/begin.html> is a good starting point. A very good free
introduction is <http://mirror.ctan.org/info/lshort/english/lshort.pdf>.

If you want to play with my example you should have a look at the
documentation of the pdfpages package. Install
texlive-latex-recommended-doc and see
/usr/share/doc/texlive-latex-recommended-doc/latex/pdfpages/pdfpages.pdf
or use 
  texdoc pdfpages 
at the command line.


   Florian
-- 
GUIs programmieren mit Python und Glade:
<http://www.florian-diesch.de/doc/python-und-glade/>




More information about the ubuntu-users mailing list