Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Even though I can find this command hiding somewhere on the internet, I though it might be useful to have it up here for the LaTeX community in general.

How does one run TeX from the command line interface (Terminal) in Linux? Are there any required parameters? What if the command is part of a bigger script, how does the script knows when the TeX processing is done to continue with any subsequent actions needed? Is there a clear manual for this somewhere?


A starting point might be:

pdflatex [options] filename.tex

latex [options] filename.tex

xelatex [options] filename.tex

share|improve this question
5  
Hi! In my opinion, your question does not seem to me to be really good. There are couple reasons: (1) You answer the question in the question text. (2) You obviously somehow know the answer and you don't ask "for yourself", but in the current shape, I don't think it can help anybody. (3) Please note that most of the "broad" questions like this one are posted after some discussion in the community, usually on TeX - LaTeX Meta or in chat, in both of which you're most welcome ;) (Notice that I didn't downvote it since I think -1 is enough.) –  tohecz Dec 17 '12 at 9:38
4  
@tohecz I need to mention how much I like what you have done here. Most people do not take the time to comment when they downvote a question. Without even downvoting it you explained very well why you think the question is bad and in such a friendly manner! I wish this happened more often. –  Vivi Dec 17 '12 at 10:07
    
Have to tried man pdftex? This is Unix, you know. –  Martin Schröder Dec 18 '12 at 7:47
    
It's amazing. This question has been viewed over a thousand times, yet it seems like it is considered a useless question, for nobody vote on it. Why are people viewing it then? –  McGafter Jan 16 at 9:53

1 Answer 1

up vote 7 down vote accepted

You've right: latex filename.tex and the other above command are the mean to run a flavor of TeX from the command line.

They don't really require parameters, but you could also have a look at the configuration of GUI software like Texmaker, or type in the command line latex --help to show the complete list of available options. For example the option -interaction=nonstopmode makes latex not stopping on every error...

These programs run in single shot: they will not make action. For that, in Linux, you could write a Makefile that will arrange the required compilation steps, as shown here or here.

For the manual, you could try man latex, but I don't think that it is a good answer or question. The above commands runs Latex/Pdflatex/... the same ways that a GUI editor will do.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.