3

If we want to write a document using LaTeX, whatever is our operational system, we need to download two programs, for example, WinShell and TexWorks.

Why can't we use one single program?

4 Answers4

6

Explaining what text editor and TeX engine are might help here.

  1. Text editor is a program to write an input file.
  2. TeX engine is a program to typeset your input file to produce either PDF (usually), DVI, etc.

There are many text editor freely available for LaTeX:

  • TeXnicCenter
  • etc

Each editor give various features such as code folding, auto-completion, etc. Installing many text editors on a single machine might be considered as a hobby.

The most important thing: Make sure that you don't use Microsoft Word as a text editor when writing LaTeX input files.

Actually you also need one more program which is a viewer. For viewing PDF, you can choose Adobe Reader.

6

A TeX distribution consists of much more than just LaTeX. E.g., there are many additional TeX formats out there, e.g., PlainTeX, XeLaTeX, LuaLaTeX, and there are auxiliary programs such as bibtex, biber, makeindex and xindy. A well-configured front-end, in addition to serving as a text editor, makes it easy to access these formats and auxiliary programs.

There are many well-configured text editors to choose from. Some people may already be familiar with one or the other editor from other work they're doing, and it's convenient for them to keep using this editor when they need to write a document using, say, LaTeX. Forcing these people to learn how to use a new editor just for document writing would, in contrast, be anything but convenient, right?

My advice to you is: Get a modern TeX distribution that works on your computer and a good front end that interfaces nicely with the TeX distribution of your choice, and for the most part you'll no longer think that you're using two (or more!) separate programs.

Mico
  • 506,678
4

To use LaTeX, you need an editor to write, texlive or miktex to compile and a PDF Viewer to display the result. If you produce a dvi instead of a PDF, you need a dvi viewer, of course.

In comparison, Word offers "all in one".

"All in one" has a huge disadvantage: If the software has to display the result of what you type ("what you see is what you get") immediately, a process which needs some time will be difficult to implement. Word never will be able to mimic microtype, e.g.

Keks Dose
  • 30,892
4

For a simple text, really you do not need two programs, only one compiler as pdflatex. You can make a file test.pdf with the word "Test" only with this command, at least in TeX Live 2014 with Linux:

 pdflatex -jobname test  \\documentclass{article} \\begin{document}Test \\end{document}

Well, the problem is when you want to write a PDF with some more words, said a whole thesis. Then, beleive me, write it in a single command is rather inconvenient. It is generally better maintain your long text and LaTeX commands in a file for updates and backup purposes. But still you do not need a program for this. For example, with only the system prompt you can write:

echo "\documentclass{article}" > test.tex
echo "\begin{document}" >> test.tex
echo "Test" >> test.tex
echo "\end{document}" >> test.tex

Obtaining the file file test.tex:

\documentclass{article}
\begin{document}
Test
\end{document}

And simply with pdflatex test.tex you can obtain the same file test.pdf that above.

Of course, is a lot easier make even that simple file with a editor. But the most simplest pre-installed text editor in your system (as notepad in Windows or the non comparable nano or mcedit in Linux) is enough. However, it is much better a LaTeX oriented editor, because can help you in the writing process (syntax highlighting, wizzards, etc.), as well as act like a front-end for the compilers (buttons for run this or that compiler, windows to show error messages, etc.).

Finally, in real documents, probably you will need to recompile two or more times the .tex file, for example to solve cross-references, or as Mico explained, run also one or more auxiliary (optional) programs if you want obtain things as a nice alphabetic index or include a huge bibliography from a external database (a .bib file). Some editors also help running the correct sequence of these other commands, so you do not need tangle with the command line directly, but regardless of how much the editor help you to manage your text or interact with the compiler and auxiliary programs, the editor is not a part of LaTeX.

Fran
  • 80,769