41

Does anyone know how to convert .tex files to .pdf in windows? I tried cygwin but it said the command "pdflatex" was not recognised

Thanks Philip

Sam
  • 110
  • 1
  • 1
  • 8
Phil
  • 421
  • 1
  • 4
  • 4

5 Answers5

36

There's no reason to complicate things with Cygwin. Go download and install a TeX distribution for Windows - I personally use TeX Live, but various other distributions are available, such as MikTeX or W32TeX.

If you want to use UTF-8 for your bibliography, and you're using BibTeX, I recommend using bibtexu instead of the regular bibtex (since bibtex doesn't actually support UTF-8). There's a download on the W32TeX site.

Alex
  • 8,093
  • 6
  • 49
  • 79
Michael Madsen
  • 54,231
  • 8
  • 72
  • 83
  • I've used MikTeX and it works great. However I've tried to install it three times over the years and only once did it actually work. I was not smart enough (or motivated enough) to figure out why the not-working installs did not work. – dash-tom-bang May 26 '10 at 16:51
  • Yes, installing used to be kind of difficult. Thankfully, Portable MikTeX now exists (http://miktex.org/portable/about). It's intended to be run from a USB stick that you carry around with you, but as a side effect it is also utterly trivial to install and works just as well as the older method. – Kilian Foth May 26 '10 at 17:12
  • 2
    I tried a couple of hours installing TeX Live in Windows 7, but got all kinds of errors, gave up, and installed MikTeX (the regular 64-bit version) easily. – Seppo Enarvi Apr 19 '13 at 11:38
  • I disagree that installing software using Cygwin's package manager is complicating things. It actually makes the whole system more reproductible, like good distros do. I always highly recommend using Cygwin over messy native windows ports, for a better overall UNIX workflow. – Johan Boulé Sep 16 '19 at 09:43
  • FYI: TeX Live worked fine at the 1st try for Winwdows 10. – JCarlosR Apr 29 '20 at 16:05
9

If you need to stick with cygwin, install texlive and texlive-collection-latex

Éibhear
  • 129
  • 1
  • 3
5

The following command worked for me, under cygwin. I installed pandoc 1.13.2 and MiKTeX 2.9.5105 64-bit. Then I ran:

pandoc -s \
--latex-engine='C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe'  \
-f markdown_github -t latex \
"my-file.md" -o "my-file.pdf"

The key here is that I gave the full path for MiKText's pdflatex.exe in the --latex-engine key, in quotes, using the windows path (as the pandoc I installed is the windows pandoc, it requires windows-style paths to find resources).

I used -f markdown_github because of the file format of my-file.md

I used -t latext but that's optional AFAIK.

zgarnog
  • 51
  • 1
  • 3
0

Installing tetex(and optionally tetex-extra) package in Cygwin worked for me.

Wei Shi
  • 4,945
  • 8
  • 49
  • 73
0

MikTex and texify work for me under plain Windows.

Terrence Brannon
  • 4,760
  • 7
  • 42
  • 61