I don't understand latex programs for Windows

Click For Summary

Discussion Overview

The discussion revolves around the challenges of converting a *.tex file to a *.dvi file using LaTeX on Windows. Participants share their experiences and suggest various tools and methods for achieving this conversion, including the use of MikTeX and different text editors.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant expresses frustration with using MikTeX and TeXnicCenter on Windows, noting ease of use on Linux.
  • Another suggests using WinEdt as an editor that can invoke LaTeX, while also mentioning the need for a DVI viewer like Yap.
  • A participant confirms that WinEdt successfully converts *.tex files to *.dvi and loads them in Yap but questions the necessity of using WinEdt instead of MikTeX directly.
  • It is noted that LaTeX, which is part of MikTeX, can be run from the command line in Windows, similar to Linux.
  • One participant recommends using a customizable text editor to compile .tex files into various formats, including .dvi, and mentions Notepad++ as an option.
  • Another participant shares their experience using LEd with MikTeX, highlighting its ability to install packages and convert between formats.
  • A participant describes using a batch file to compile LaTeX documents, detailing the setup and commands involved, including environment variable considerations.

Areas of Agreement / Disagreement

Participants present multiple methods and tools for converting *.tex files to *.dvi, with no consensus on a single preferred approach. Some express a preference for specific editors or methods, while others highlight the flexibility of using command line options.

Contextual Notes

Participants mention potential issues with environment variables and the need for specific configurations to ensure successful compilation of LaTeX documents on Windows.

hatsoff
Messages
16
Reaction score
3
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
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)
 
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.
 
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:
http://docs.miktex.org/manual/texifying.html
 
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:
(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.
 
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"
and
"#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).
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
7K