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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run the latex project: http://www.sigchi.org/publications/chipubform/sigchi-papers-latex-template/at_download/file through command line. I have written a shell script(*.sh file), where I plan to execute *.tex with pdflatex, and *.bib with bibtex respectively. What and how shall I execute *.cls and *.bst files? So that it finally converts into the pdf!

So far I am done with:

pdflatex sigchi-sample.tex 
bibtex sample.bib

I however, don't know what to do with:


The figure stays as it is in the folder, I guess. Please help! Thanks.

share|improve this question
You don't need to do anything with those two files: they are automatically loaded and used during the pdflatex and bibtex runs respectively. – egreg Jun 6 '12 at 9:06
@egreg Thanks for your suggestion. So, I tried running the script. It ran this time (I don't know why it didn't run before), and it generated the *.pdf. However, it could not include the bib content in the References. The error I got it says: Output written on sigchi-sample.pdf (3 pages, 532776 bytes). Transcript written on sigchi-sample.log. I couldn't open file name `sample.bib.aux' – user365402 Jun 6 '12 at 20:55
Sorry, I didn't notice that the second instruction is wrong: it should be bibtex sample (without .bib). – egreg Jun 6 '12 at 20:57
Thanks for your quick help @egreg but now it gives the error, saying "I couldn't open file name 'sample.aux'". – user365402 Jun 6 '12 at 21:00
up vote 3 down vote accepted

The correct order of the commands should be

pdflatex sigchi-sample
bibtex sigchi-sample

You can omit the extension .tex and the input for bibtex must definitely not have the .bib extension (the implicit one is actually .aux).

The file names should be the same: bibtex reads the data produced by the first run of pdflatex and stored in sigchi-sample.aux.

Then you have to run again

pdflatex sigchi-sample
pdflatex sigchi-sample

in order that the bibliographic references are correctly solved. Of course it's not necessary to always do all four runs. Do them when you need to have the document in final form.

share|improve this answer
Awesome, thank you so much @egreg! really appreciate your help! – user365402 Jun 6 '12 at 23:09

Your Answer


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.