Typesetting A Document Using LaTeX

2. In any convenient location, create a new directory named “LatexTest”.

3. In the newly created LatexTest directory, create a new text file named “LatexTest.tex”, containing the following text.

\documentclass{article}
\begin{document}
This is a test of LaTeX.
\end{document}

4. Copy the file “latex.exe” to the LatexTest directory from wherever the MiKTex installer put it. As of this writing, the default location of this file is at “C:\Program Files (x86)\MiKTeK 2.9\miktex\bin\”.

5. Still in the LatexTest directory, create a new text file named “LatexTest-Run.bat”, containing the following text.

latex LatexTest.tex

6. Execute LatexTest-Run.bat. The LatexText.tex input file will be processed, and a new file named “LatexTest.dvi” will be created in the LatexTest directory.

7. Double-click the LatexTest.dvi file to open it. The LaTeX file viewer “Yap” will start, and the contents of the LatexTest.dvi file will be displayed.

Notes

• It’s also pretty easy to create a .pdf file rather than a .dvi, simply by using a different executable that is also included with the MiKTeX package.