Open a command window;
Type cd followed by the name of the folder where you saved your sample document;
Type your LATEX command followed by the name of your LATEX document.
Which LATEX command you type depends on what output you want and how you want it to be created — see the list in the Preface. Whichever way you run LATEX, it will process your file and display a log or record of what it’s doing (see Figure C.2: it looks much the same no matter what system you use).
To typeset your document:
Make sure you are in the right directory (folder) in your terminal, then type the command (latex, pdflatex, or xelatex, for example; or latexmk or one of the other workflow-management commands)
If you are using citation and reference commands for a bibliography, you will then need to run biber or bibtex (followed by a space and the name of your document), whichever you have chosen to use (see § 184.108.40.206)
Run LATEX again as in the listitem ‘Make sure you are in the …’ so that the citations are picked up;
If you are creating an index, you will then need to run makeindex (followed by a space and the name of your document)
Run LATEX again as in the listitem ‘Make sure you are in the …’ so that the citations and index references are resolved.
LATEX and all the ancillary programs write a transcript of what goes, and this will be shown in the window as well as being written into a log file.
If LATEX reports any errors — easily identifiable as lines in the log beginning with an exclamation mark (!) — don’t panic! Turn to § C.3, identify what went wrong, and fix it in your input file. Then re-run LATEX.