GeneralRunning pdflatex into a bash script

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
eswap0
Posts: 17
Joined: Tue Sep 28, 2010 8:40 pm

Running pdflatex into a bash script

Post by eswap0 »

Hi,
I am using pdflatex to generate reports from txt files, but have some doubts I can not solve by myself using the man page.
  1. Rerun pdflatex
    Quite often you need to rerun pdflatex, to achieve the desired result. Now, I simply do:

    Code: Select all

    --bash code here---
    pdflatex file.tex
    pdflatex file.tex
    --more bash code here--
    But I am afraid this is not the right way to do it. Is there any better way to tell pdflatex to compile twice?
  2. Stop on errors
    While running pdflatex manually, quite often you are prompted to do something when errors occur. How to tell pdflatex to just stop and avoid being waiting for a response? I tried -halt-on-error without fortune
  3. Errors file
    I don't understand from the man page how to create an error file to debug the tex file...I have tried -file-line-error and -interaction errorstopmode without success.
    Thanks a lot!
Last edited by eswap0 on Tue Apr 19, 2011 9:25 pm, 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.

shadgrind
Posts: 140
Joined: Thu Jul 16, 2009 12:39 am

Running pdflatex into a bash script

Post by shadgrind »

Run pdflatex in your bash script like this:

Code: Select all

pdflatex -interaction batchmode file.tex
You can see any errors in the file.log file.
System: TeX Live 2012, Fedora 18 x86_64, GNU Emacs 24.2
eswap0
Posts: 17
Joined: Tue Sep 28, 2010 8:40 pm

Re: Running pdflatex into a bash script

Post by eswap0 »

Sorry for my late reply: thanks!
Post Reply