GeneralAutomation of pdf builds

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
schne438
Posts: 2
Joined: Fri Oct 29, 2010 3:27 pm

Automation of pdf builds

Post by schne438 »

First I apologize if the solution has been given previously, but I tried to search for it here without success.

I'm using XP with WinEdit and pdflatex to build some pdf files.
Suppose I have 100 files in the same folder: A1.tex,...,A100.tex.

How to automate the process of generating the 100 pdf files? (instead or typing pdflatex Ai for each i?). I'm really new to the latex business. A simple example for a solution would be very appreciated.

Thanks!
Last edited by schne438 on Sun Oct 31, 2010 12:52 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Automation of pdf builds

Post by frabjous »

Write a DOS batch file and stick it in the folder with the files.

I.e., open up Notepad, Type in something like:

Code: Select all

for %%I in (*.tex) do "C:\Program Files\MiKTeX\miktex\bin\pdflatex.exe" "%%I"
Save with an extension ending in .bat. Then double clicking the file in My Computer/Windows Explorer should run pdflatex on all the .tex files in the folder.

You'll need to check that where I guessed your LaTeX executables are is right (--it probably isn't; I don't use Windows, so I don't know--). If you need refinements, you should probably read an online guide on DOS batch files. See, e.g., here.

Or you could just type that command on the command line prompt. (Change the double %% to a single % then, if I remember right.)
schne438
Posts: 2
Joined: Fri Oct 29, 2010 3:27 pm

Re: Automation of pdf builds

Post by schne438 »

This is great. Thanks a bunch.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Automation of pdf builds

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic (not the last post) accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
Post Reply