First of all, let me apologize if this is not the best place to post this question. I'm a complete noob on these forums and also quite new working with TeX.
I'm not really writting any TeX code on my own, but generating it via doxygen[1], together with equivalent documents in several other formats (such as HTML and RTF).
I had automated the generation process[2] through batch scripts and most stuff was working fine, but...
When runing pdflatex to generate a PDF file I can't manage to get it right: the "Contents" section (which is supposed to hold the table of contents) appears empty, and the resulting PDF has no bookmarks. With over 300 pages (and growing) of technical reference in there, these navigation helps are critical to make the document usable.
Now, the fun point, is that when building the document from TexnicCenter everything goes perfect: the PDF ends up with the proper bookmarks and ToC, everything properly linked, and so on. The only issue is that generating the PDF file is a step in the middle of a process I need to run unatendedly.
I have tried to figure out things on my own from the TexnicCenter's Profiles dialog: it seems quite obvious that the makeindex command is doing the "magic" for my bookmarks and ToC, but after several tries I have been unable to emulate this from the command line.
My LaTex => PDF profile looks like this:
LaTeX
Run (La)TeX in this profile: Checked
Stop Compilation, if LaTeX-error ocurres: Unchecked
Path to the (La)TeX compiler: C:\Archivos de programa\MiKTeX 2.7\miktex\bin\pdflatex.exe
Command line arguments to pass to the compiler: -interaction=nonstopmode "%pm"
Do not use BibTeX in this profile: Unchecked
Path to the BibTeX executable: C:\Archivos de programa\MiKTeX 2.7\miktex\bin\bibtex.exe
Command line arguments to pass to BibTeX: "%bm"
Do not use MakeIndex in this profile: Unchecked
Path to MakeIndex executable: C:\Archivos de programa\MiKTeX 2.7\miktex\bin\makeindex.exe
Command line arguments to pass to MakeIndex: "%bm"
The Postprocessor tab has an empty list; and I don't think the Viewer tab is relevant (it points to my Acrobat Reader installation, which makes sense enough).
The main file is always the same (at least in the script at hand).
So, to the specific question: how can I turn this profile into command-line equivalents?
[1]Doxygen (http://www.stack.nl/~dimitri/doxygen/index.html) is a tool to generate code documentation from actual code structure and code comments, suporting a wide array of input and output formats.
[2]The script I'm working with takes care of:
[list=1][*]Invoking the compile and make processes to build binaries from my sources.
[*]Invoking doxygen to do most of the work to generate the documentation in several formats (aiming to have, at least, HTML, CHM, and PDF).
[*]Documentation post-processing tasks (for example, re-running the HTML Help Compiler after some automated tweaks on the HTML, or the pdflatex itself).
[*]Copying everything (sources, binaries, docs) under a "distro" folder following a logical hierarchy.
[*]Packing everything under "distro" to a tarball and to a self-extracting 7zip file.
[*]Uploading the packages to my website's ftp server.
[*]Invoking a (password-protected) php script on my site to trigger the update on the database which will include the new packages.[/list]
Obviously, having to split this process to generate the PDF from TexNicCenter is quite annoying, as everything else can be handled automatically; and the process is quite long (currently over 15 minutes, but it gets slower as the codebase grows).
Thanks in advance for any answer provided.
[EDIT]
I have managed to get the desired result by runing (in order) pdflatex, bibtex, makeindex, and pdflatex again. Running pdflatex twice, however, seems quite wrong to me. Is that the correct way to do this? Is that what TexnicCenter does?
[/EDIT]
General ⇒ Automating from the command line what TC does from the GUI
-
- Posts: 6
- Joined: Sat May 02, 2009 2:24 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.
