48

I'm writing a LaTeX document and am using the command line to compile the LaTeX code into a PDF document. In Linux I would just open the PDF with Evince PDF Viewer, and whenever I recompiled the LaTeX code, the PDF would refresh after a couple of seconds.

I'm now trying to do the same thing in Windows. The trouble is, whenever I have the PDF open in Adobe Reader or Foxit Reader, it doesn't even allow me to write to the PDF file. I get this error in the command line when I run pdflatex test.tex:

! I can't write on file `test.pdf'.

Is there a PDF viewer for Windows that does the following?

  1. Disables write protection when opening a PDF
  2. Auto-refreshes when a new PDF is generated
Gareth
  • 19,080
Eddy
  • 3,427

5 Answers5

48

SumatraPDF is free, for Windows, and plays nicely with LaTeX. It will automatically refresh when the pdf is updated.

Rob Hyndman
  • 1,044
19

There's an Evince version for Windows.

jjlin
  • 16,120
Noam Kremen
  • 731
  • 4
  • 5
11

I know the question is old, but I think an important option is missing.

As a lot of people use MiKTeX on Windows they already have TeXworks installed. The PDF viewer included with TeXWorks does indeed refresh.

start texworks main.pdf

or right click any PDF file and select to open with TeXworks.

I'm not saying that the PDF viewer itself is the best, but it's very convenient (if you have MiKTeX) as you don't have to install yet another PDF viewer.

hansfn
  • 213
  • 2
  • 6
2

PDF-XChange Viewer has an option for this, too. Invoke from command line (cmd.exe):

pdfxcview /A "nolock=yes=OpenParameters" test.pdf

See similar question

panny
  • 675
1

Install WSL as Administator user in Windows 10. Install "Debian on Windows" using the Windows 10 app (not as administrator, this is not clear at all in the document or forums!!!), alternatively use Ubuntu/OpenSUSE. Install Xming for Windows 10, run it. Inside the debian command line install texlive and evince

Create a Makefile to build your tex file and bibliography:

pdflatex myfile.tex
pdflatex myfile.tex
bibtex myfile.bib
pdflatex myfile.tex

Run:

make
evince myfile.pdf &

Then you can edit the myfile.tex as many times as you like and just run make to see the automatically updated PDF in evince.