-1

I am working on a LaTeX document using git and overleaf. I like being able to edit offline and control when changes are applied (git push). The drawback is I do not have the live preview that is available when working on Overleaf online. Is there any tool that lets us render LaTeX offline?

I am looking for something similar to grip for local previews of markdown files -- all i do is type and refresh a page that it serves on localhost. I am hoping if there is a similar tool for LaTeX. Googling has not yielded anything promising so far - does anybody know? Thanks!

aol
  • 357
  • 5
  • 15

1 Answers1

1

Yes, it's called... (pdf)LaTeX. It's not some cloudbased magic that transforms your TeX document into a formatted document. It's either some variant of LaTeX or ye olde latex2html which is quite outdated by now.

You can find it in distributions such as TeXLive (all platforms) and MiKTeX (Windows only).

Basically, all you need to do is

pdflatex mydocument.tex

And if all goes well that will produce mydocument.pdf.

There are editors such as TeXStudio, Kile, TeXMaker, TeXWorks etc. that aim to make your life easier and go more into the direction of "live preview".

There is also a what-you-see-is-what-you-get editor called LyX, perhaps that suits your needs best.

rubenvb
  • 74,642
  • 33
  • 187
  • 332
  • sometimes `pdflatex` has to be run several times to get labels/refs right, maybe interleaved with `bibtex`. I suggest to use `latexmk -pdf mydocument.pdf` which takes care of everything. – eMMe Jun 02 '18 at 18:27
  • @eMMe don't you then need a makefile or something? How does anything know what it needs to do otherwise? – rubenvb Jun 02 '18 at 21:39
  • No [latexmk](https://mg.readthedocs.io/latexmk.html) doesn't need any Makefile: is a perl script included in the texlive distribution, it takes care of dependencies in a make-like way. – eMMe Jun 03 '18 at 06:40