Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a simple template whose codes I copy over to a new document each time. But once in a while, when I compile the new document, the old template still shows up as the dvi (despite multiple re-compilation).

I would tweak this and that, restart WinEdt, etc., and would get it to work. But not knowing the reason really bugs me.

It sounds like it has an obvious reason that I simply do not know. Can anyone help?

share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It is considered a lot better to put in some code that will compile, as it makes it a lot easier for us to copy it into our text editor and work with it, and see exactly what it is you are trying to do. –  hpesoj626 Oct 28 '12 at 8:22
In these cases the log file should show an error that it can not right to the dvi file. I have not seen that with dvi, but it is very common with pdf, if you use acrobat to view the pdf it holds the file locked for writing so pdflatex can not make a new file. If that isn't the problem (ie the log shows no error) you will need to give more information. –  David Carlisle Oct 28 '12 at 10:55
thank you for trying to help, but the problem is the code is always the same. Yet when I compiled it the first few times, winedt compiled a CLOSED document instead of the one opening. Then I tried to compile the same code again, and suddenly it works... –  Anh Oct 28 '12 at 17:57
@user19506: I changed the title of your question because your issue is a problem with WinEdt, not LaTeX. For me it sounds that you make the (closed) template the main file ... –  Kurt Oct 29 '12 at 14:06
You are probably working inside a project and once in a while clicking the view button instead of the compile button and WinEDT is opening the master document in the viewer. –  percusse Nov 2 '12 at 16:41
show 3 more comments

1 Answer

As is the case for many other editors, in WinEdt one can define a project in which there exists a main file that we PDFLaTeXify. In this main file there are usually lots of \include{my other chapter} and/or preamble specifications.

Usually compile and view shortcuts point to the main file to prevent the compilation of TeX file fragments (standalone chapter files, figures that don't have a proper TeX preamble etc.).

In your example you might have defined a main file for a project in a template and probably View buttons are still pointing to your original main file's DVI or PDF output.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.