Skip to content

LaTeX File Format (.tex)

A TEX file holds LaTeX source: plain-text markup and commands that a TeX engine compiles into a typeset document, rather than a finished document you open and read directly.

.texDocuments

LaTeX at a glance#

Full nameLaTeX document
File extension.tex
CategoryDocuments
DeveloperLeslie Lamport
First released1985
MIME typesapplication/x-texapplication/x-latex
Other extensions.latex
CompressionUncompressed
FileFlip supportFileFlip reads and writes this format

What a .tex file can hold#

These are the things a LaTeX file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Selectable textYes
Human readableYes

Strengths and limitations of LaTeX#

What LaTeX does well

  • Produces the best mathematical typesetting available, which is why math and physics journals default to it
  • Free and openly specified, with decades of existing templates and journal classes ready to reuse
  • The same source and package versions reproduce the same PDF on any machine, which matters for reproducible papers

Where LaTeX falls short

  • The source is a program, not a document: a page's final layout depends on compiling the whole file, so it can't be skimmed like a Word file
  • A missing package or a different engine version can break compilation, so a document that builds on one machine can fail on another
  • Formatting is written as commands rather than seen directly, which is a real learning curve next to a word processor

Write in LaTeX when a document needs serious mathematical typesetting or has to match a journal's official LaTeX class file.

Convert a LaTeX file when the reader only needs the finished PDF, or when a collaborator without a LaTeX install needs to edit the text directly.

How to open a .tex file#

A .tex file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts LaTeX into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
WindowsTeXstudio, MiKTeX (TeXworks), Visual Studio Code (LaTeX Workshop)
macOSTeXShop, TeXstudio, Visual Studio Code (LaTeX Workshop)
LinuxTeXstudio, Kile, Vim or Emacs with a LaTeX plugin
WebOverleaf, FileFlip

LaTeX questions people ask#

Why won't my .tex file open in Word or Google Docs?

A .tex file is LaTeX source code, not a document those programs know how to render, so they either show raw markup or refuse the file. It has to be compiled by a TeX engine such as pdfTeX or XeLaTeX, or opened in a LaTeX editor that runs one for you, to produce the actual PDF.

What's the difference between a .tex file and a .pdf file?

The .tex file is the LaTeX source, the editable commands and text before typesetting. The .pdf is the compiled output, the finished pages a reader actually sees. Editing means changing the .tex file and recompiling, never the PDF itself.

Can I convert a LaTeX file to Word?

A LaTeX file can be converted to a .docx with tools like Pandoc, and plain text and headings usually come across cleanly. Complex math, custom macros and packages that Word has no equivalent for often need manual cleanup afterward, so treat the result as a draft rather than a final copy.

What's the difference between TeX and LaTeX?

TeX is Donald Knuth's original low-level typesetting engine, and LaTeX is a set of higher-level commands built on top of it that handle sections, citations and layout so an author doesn't write raw TeX. Almost every .tex file encountered today is LaTeX rather than plain TeX.

Why do LaTeX documents sometimes fail to compile on a different computer?

A LaTeX document depends on the exact packages installed and the TeX engine used, so a file that compiles on one machine can error on another if a package is missing or a different engine changes how a command behaves. This is the tradeoff for LaTeX being a program rather than a self-contained document.

Converting LaTeX files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.