I don't understand latex programs for Windows

I'm not sure about UNIX).In summary, the options for converting a *.tex file to a *.dvi file are:- Get an editor that can invoke LaTeX for you.- Run LaTeX on the command line.- Use your favorite text editor, which hopefully has a feature that you can customize commands to allow you to "compile" your .tex source into a .dvi / .ps / .pdf file.- Use MikTeX, and invoke it with a batch file.
  • #1
Okay, guys. Here's what I want to do: convert a *.tex file to a *.dvi file, and then look at the pretty *.dvi file. That's it.

But I want to do it in Windows.

I've done this a gazillion times in linux, and it's easy as pie. Just "latex file.tex" in a terminal shell. But of course there's no terminal in windows.

I've installed both miktex and texniccenter, and I can't make heads or tails of either one. This should be simple, and yet...

Any help would be much appreciated. Thanks!
Physics news on Phys.org
  • #2
One option is to get an editor that can invoke LaTeX for you. I know a lot of people use WinEdt - it's shareware, but I'm sure there are free equivalents out there that you could find using e.g. Google. You'll also need a DVI viewer; I think Yap comes as part of MikTeX, or if not it should be available somewhere online.

An alternative would be to run LaTeX on the command line - yes Windows has a terminal, the program is called cmd.exe. The Windows shell kind of sucks though (in my opinion), so if you want something better/more UNIX-like, consider Cygwin.

Of course, there's always my preferred method: just stick to Linux ;-) (for LaTeX at least)
  • #3
Thank you, kind sir. WinEdt works to convert *.tex files to *.dvi, and the *.dvi file loads fine in Yap (which apparently is part of miktex).

Is there any way to use miktex for conversion process, though? I really don't like having strange shareware on my PC, plus the user interface for WinEdt really stinks.
  • #4
Well, the program that does the conversion itself is just plain old LaTeX, which is part of MikTeX. You don't need WinEdt to use it. As I said, Windows does have a terminal and in principle, I think you could run LaTeX from the terminal the same way you would on Linux/UNIX. (All WinEdt does is give you an easier way to run the same program)

I did a bit of Google searching on your behalf (really, it wasn't hard) and came up with this:
  • #5
You can use your favorite text editor,
which hopefully has a feature that you can customize commands to allow you to
"compile" your .tex source into a .dvi / .ps / .pdf file.
(Essentially, it opens a shell and types in the MikTeX commands and parameters you specify.
I believe MikTeX updates the PATH variable... so if you start the shell cmd.exe and navigate to
the directory of your .tex source, you should be able to type "latex myfile" or "latex myfile.tex".)

For instance, you can use notepad++ http://www.tlhiv.org/ma497/software/

With MikTeX-YAP, you can customize it to allow you
to click on some portion of the .dvi and have an editor pop up at that location in the .tex source,
as well,
appear on the .dvi page corresponding to your .tex source.
Last edited by a moderator:
  • #6
(On Windows) I personally use LEd, combined with Miktex. LEd is a pretty damn cool program that can install packages on the fly which I really like. From there though, it can convert from tex>dvi, dvi>pdf, tex>pdf and built in batch scripts which can do it all for you.
  • #7
I use MikTeX, and I invoke it with a batch file. So, I have an icon in the folder where is the tex file, and I simply double-click it to compile the document. (Actually, I usually just keep it hilighted and press enter to compile.) You can create the batch file with notepad; just save it with .bat extension. I use yap (comes with MikTeX) to view the dvi, ghostscript (free to download) to view the ps file, and acroread (also free to download) to view the pdf.

The batch file just has a .bat extension, and it contains the line
"latex filename.tex"
where filename is the name of my tex file that I want to compile. I have to make sure that there is another line in the file, which I guess the command shell understand as ENTER, or else I have to press enter again after the shell comes up. I also have some lines in the batch file:
"#dvips filename.dvi -o filename.ps"
"#ps2pdf filename.ps"
that I uncomment (remove the "#") when I want to produce the .pdf version. (Axodraw does not work on my machine with pdflatex, or even dvipdfm.) BTW, in order to edit the batch file, you will probably have to right-click and select edit, because it may simply execute by default.

I think I had to set an environment variable or something to point to MikTeX. If your source doesn't compile, that is likely the problem. Let me know if you have a problem, and I might be able to help you to set the environment variable (if Windows XP).

1. What is LaTeX?

LaTeX is a typesetting system used for creating professional-looking documents, particularly in fields such as mathematics, science, and engineering.

2. How is LaTeX different from other word processing programs?

Unlike traditional word processors, LaTeX uses a markup language to format documents, making it more versatile and customizable. It also has built-in features for handling equations, figures, and references.

3. Can I use LaTeX on Windows?

Yes, there are versions of LaTeX that are compatible with Windows operating systems, such as MiKTeX and TeX Live. These programs can be downloaded and installed for free.

4. Why is it difficult to understand LaTeX programs for Windows?

LaTeX can have a steep learning curve for beginners because it requires a basic understanding of its markup language and commands. However, there are many online resources and tutorials available to help users learn and navigate the program.

5. Is LaTeX only for scientific documents?

No, while LaTeX is commonly used for scientific and technical documents, it can be used for any type of document, including resumes, letters, and presentations. It offers a range of templates and styles to suit different needs.

Suggested for: I don't understand latex programs for Windows