Skip to main content
v2026.11,986 entries · CC-BY 4.0

LaTeX Viewer: How to Open and View a .tex File and Its PDF

Open a .tex file as text, or compile it to a PDF in Overleaf or MiKTeX. A situation table, step-by-step compile and Recompile troubleshooting.

Written and maintained by CASRAI Editorial Board

Published

On this page

A LaTeX viewer is not one thing. A .tex file is plain-text source, so you can read it in any text editor, but to see the typeset page you have to compile it into a PDF, either in an online editor such as Overleaf or with a local TeX distribution such as MiKTeX. This guide separates the three jobs people mean by the phrase and shows which route fits which situation.

What it is used for in research

Researchers meet LaTeX when they receive a manuscript, thesis chapter or journal template as a .tex file, often alongside a .bib bibliography and image files. Three different needs hide behind "LaTeX viewer":

  • Reading the source. A .tex file is text, so a plain text editor shows the commands and prose. Nothing is typeset.
  • Seeing the rendered output. The source must be compiled into a PDF. The compile step is what turns .tex, .bib and images into a document.
  • Reading a finished PDF. If you were sent the PDF, any PDF reader is enough; no LaTeX tooling is involved.

Single-file "viewer" tools that accept an uploaded .tex file are view-only conveniences. For a multi-file project with a bibliography and figures, you need a real compile.

Which route fits which situation

Your situation Route Why
You only need to read the commands and text Open the .tex file in a text editor The file is plain text; no compile is needed to read it.
You have a project with .tex, .bib and images and want to see the PDF Compile in Overleaf (online) Overleaf’s Recompile compiles source files, bibliography and images into a PDF and lists errors in the logs.
You want to compile on your own computer Install MiKTeX (Windows), which also installs missing packages on demand if you allow it The MiKTeX installer offers a package-installer setting (ask first, always or never).

Install or access (official source only)

Online: Overleaf

Overleaf runs in the browser, so there is nothing to install. Sign in at overleaf.com, then create or open a project from the project dashboard. The dashboard’s New Project button offers a blank project and an example project. Overleaf’s own guide is at docs.overleaf.com: Your first project.

Local: MiKTeX

MiKTeX’s installation instructions (miktex.org/howto/install-miktex) are: download the Basic MiKTeX Installer and run it; choose a private (per-user) or shared (needs administrator rights) installation, with the private install described as highly recommended; set the paper size and the package-installer behaviour (Ask me first, Always or Never), which controls whether missing packages are installed on the fly; click Start; then open MiKTeX Console and check for updates.

Step by step: view the rendered PDF of a .tex project in Overleaf

  1. Sign in to Overleaf and open the project that contains your .tex file and its supporting files.
  2. Click Recompile. Overleaf compiles the source files (.tex, .bib, images) into a PDF.
  3. Read the PDF in the preview pane. After you edit the source, click Recompile again to see the changes.
  4. If something fails, open the error logs, which list the errors found during the compile.
  5. Optional: open the drop-down beside Recompile and switch on Auto compile, which recompiles every few seconds as you work.

Output and how to read it

The output of a successful compile is a PDF of the typeset document. The source you started with is unchanged; the PDF is regenerated each time you recompile. Treat the error logs as part of the output: they tell you whether the PDF reflects the whole source or was produced despite errors (see below).

Troubleshooting with Overleaf’s Recompile options

Overleaf documents these settings in the drop-down under Recompile (Recompiling your project):

Setting What Overleaf says it does When it helps
Compile mode: Fast [draft] Skips image processing; images appear as empty boxes. If images are the reason a compile is slow or fails, or you are only checking text.
Compile error handling (default) Tries to produce a PDF despite errors. When you want to see the document even with an error in it.
Stop on first error Stops at the first error; no PDF is produced. To fix problems one at a time from the top of the log.
Recompile from scratch Clears temporary helper files. When the output looks stale or inconsistent after changes.
Syntax checks Available in the same menu. To catch syntax problems before compiling.

If a figure shows as an empty box, check first whether the Fast [draft] compile mode is selected. For citation problems, see LaTeX bibliography styles explained.

Tool Type What the official source says
Overleaf Online editor and compiler Recompile compiles .tex, .bib and image files into a PDF (Overleaf docs).
MiKTeX Local TeX distribution Installed with the Basic MiKTeX Installer; can install missing packages on the fly (MiKTeX install page).
TeXworks Local editor with built-in PDF preview The TeX Users Group (tug.org) describes it as an editor with an integrated PDF viewer and source-to-preview synchronisation.

For collaboration on a shared project, see LaTeX and Overleaf for collaborative writing. If your sources live in a reference manager, see Zotero vs JabRef for LaTeX-based writing, and for converting DOIs into .bib entries, DOI to BibTeX. LaTeX also appears inside notebooks: LaTeX in Jupyter Notebook.

FAQ

Can I open a .tex file without installing anything?

Yes, to read it: it is plain text, so any text editor opens it. To see the typeset result without installing anything, upload the project to an online editor such as Overleaf and click Recompile.

Why does my .tex file look like code instead of a document?

Because LaTeX source contains commands that only become a formatted page after compilation. Compile it to a PDF to see the document.

What is the difference between viewing a .tex file and viewing a PDF?

The .tex file is the editable source; the PDF is the compiled output. A PDF reader shows only the output, while a LaTeX editor lets you change the source and recompile.

Why are my images empty boxes in Overleaf?

Overleaf’s Fast [draft] compile mode skips image processing, so images appear as empty boxes. Switch the compile mode back to normal and recompile.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about LaTeX Viewer: How to Open and View a .tex File and Its PDF

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →