.LTX

LTX File

LaTeX Source Document
Ask a question
QUICK ANSWER

An LTX file is a LaTeX source document - the same plain-text typesetting source as a .tex file, just under a less common extension. Open it in any text editor to read it; compile it with TeXworks, TeXstudio, or Overleaf to produce a PDF. If you found an .ltx file in a S.T.A.L.K.E.R. game folder, that is a game configuration file unrelated to LaTeX.

Developer: Leslie Lamport (LaTeX), built on Donald Knuth's TeX Category: Text Files Open standard MIME: application/x-latex
OPENS ON Windows macOS Linux Web
Related: .DOC · .ODT · .DOCX · .GDOC

On this page

19k+ extensions indexed
Last reviewed Aug 15, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the LTX file format?

.ltx is a plain-text source file for LaTeX, a document markup language used for creating text documents. .ltx files store the markup an author writes - backslash commands, text and document structure - rather than output generated by LaTeX. Functionally, .ltx is identical to .tex files; .ltx is simply an alternate extension, sometimes used to identify a project's root document.

LaTeX was designed around the WYSIWYM (What You See Is What You Mean) paradigm. The author defines document elements such as headings, equations and figures in plain text using commands like \section{} and \textbf{}, then a LaTeX engine compiles the source into polished output. A file conventionally opens with \documentclass{} in the preamble, followed by \usepackage{} declarations, and encloses the body between \begin{document} and \end{document}.

LaTeX is the dominant format for scientific, mathematical and academic publishing, but many users outside academia prefer it to GUI word processors for its typographic precision. Modern engines such as pdflatex, xelatex and lualatex compile .ltx source directly to PDF, bypassing the older .dvi step. Large projects are split across multiple files linked via \input{} or \include{} commands.

Security & safety

RISK: MEDIUM

An .ltx file is plain text and harmless to read, but LaTeX is EXECUTABLE markup: TeX runs as a program during compilation and, if shell-escape (\write18) is enabled, can run external system commands. A malicious .ltx from an untrusted source could in principle write or execute files when compiled. Modern distributions restrict shell-escape by default, which limits this. Treat .ltx files from unknown sources like downloaded code - inspect them first and don't enable unrestricted shell-escape. Viewing the source in a text editor carries no risk.

Format details

in a nutshell
FULL NAMELaTeX Source Documentaka LaTeX file, LaTeX document
DEVELOPERLeslie Lamport (LaTeX), built on Donald Knuth's TeXsince LaTeX 1984 (Lamport), on TeX (Knuth, 1978); .ltx is an alternate extension to .tex
CATEGORYText Files
MIME TYPEapplication/x-latex
TYPEPlain-text LaTeX typesetting source (markup with backslash commands)
STANDARDOpen · royalty-free
This extension is also used by…
  • S.T.A.L.K.E.R. game configuration file - The X-Ray engine (S.T.A.L.K.E.R. series) stores plain-text config/settings as .ltx files; edited with a text editor, unrelated to LaTeX.
  • Cherwell / legacy app data files - A few niche applications have used .ltx for their own data or layout files; not a typesetting document.

Programs that open LTX files

Windows5 apps
TeXworks Open-source Open the .ltx and click Typeset (pdflatex). Bundled with MiKTeX/TeX Live, which supply the packages.
Texmaker Open-source Cross-platform LaTeX IDE; open the .ltx and compile with the MiKTeX/TeX Live backend.
MiKTeX Open-source The TeX distribution that actually compiles the file; install it, then use an editor or run 'pdflatex file.ltx' from the command line.
TeXstudio Open-source Open the .ltx, then press Build/Compile. Pairs with a MiKTeX or TeX Live backend.
Notepad / VS Code Open-source Open as plain text to read or edit; VS Code with the LaTeX Workshop extension also compiles.
macOS2 apps
TeXShop (MacTeX) Open-source Install MacTeX (TeX Live for macOS); open the .ltx in TeXShop and Typeset to PDF.
TeXworks / Texmaker Open-source Open the .ltx and compile with the MacTeX/TeX Live backend.
Linux2 apps
TeX Live Open-source Install via your distro or upstream, then 'pdflatex file.ltx' or compile from any IDE; 'tlmgr install <pkg>' adds missing packages.
TeXworks / Texmaker / TeXstudio Open-source Open the .ltx in the IDE and build with the TeX Live backend.
Web1 app
Overleaf Freemium Upload the .ltx into a browser project and compile to PDF online - no local TeX install needed. (Rename to .tex if Overleaf doesn't recognize the main file.)

Technical details

deep spec
File encodingPlain text, UTF-8 (default since LaTeX2e 2018 release; earlier files commonly ASCII or ISO-8859-1)
MIME typeapplication/x-latex
Command syntaxBackslash-prefixed commands (e.g. \documentclass, \begin, \section); arguments in curly braces
Document structurePreamble (\documentclass, \usepackage declarations) then body between \begin{document} and \end{document}
Compilation enginespdfLaTeX, XeLaTeX, LuaLaTeX (output PDF directly); legacy latex engine outputs DVI
Compilation outputPrimary: .pdf (modern engines); legacy: .dvi; also generates auxiliary .aux, .log, .toc, .bbl files
Relationship to .texFunctionally identical to .tex - an alternate extension for the same LaTeX source format
LaTeX version targetedLaTeX2e (1994, biannual releases); LaTeX3/expl3 layer in active use for modern packages
Multi-file projectsRoot file uses \input{} or \include{} commands to incorporate separate chapter and section files
Bibliography supportCompanion .bib file processed by BibTeX or Biber generates formatted citations in the compiled output
Typical file size1 KB - a few hundred KB per source file; large projects span many linked input files
Math typesettingNative support for complex mathematical notation via AMSMath and related LaTeX packages
Platform supportCross-platform: TeX Live (Linux/macOS/Windows), MiKTeX (Windows), MacTeX (macOS), Overleaf (browser)
ContainerPlain text; no binary wrapper, compression or encryption
ReleasedLaTeX 1984 (Lamport), on TeX (Knuth, 1978); .ltx is an alternate extension to .tex
Latest versionLaTeX2e (1994, ongoing biannual releases); LaTeX3/expl3 in active use. TeX engine frozen at version 3.141592653
Open standardYes · royalty-free
Specificationwww.latex-project.org

LTX conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with LTX files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about LTX files.

Frequently asked questions

What is an .ltx file?
A LaTeX source document - the same plain-text typesetting source as a .tex file, just the less common extension. It contains backslash commands you compile into a PDF; it is not the finished document.
Is .ltx the same as .tex?
Yes, for LaTeX purposes. Editors and TeX engines treat .ltx and .tex identically; the .ltx spelling historically marked a file as specifically a LaTeX document. You can usually rename .ltx to .tex with no other change.
How do I open an .ltx file?
Any text editor reads it (it's plain text). To compile it, use a LaTeX editor like TeXworks, TeXstudio or Texmaker with a TeX distribution (MiKTeX/TeX Live/MacTeX), or open it on Overleaf in a browser.
How do I convert an .ltx file to PDF?
Compile it: open in TeXworks/TeXstudio/Overleaf and click Build/Typeset, or run 'pdflatex file.ltx' (twice, plus BibTeX/Biber if it has citations). The PDF is the intended output.
Why is there an .ltx file in my S.T.A.L.K.E.R. game folder?
That's a different use of the extension. The S.T.A.L.K.E.R. (X-Ray engine) games store plain-text configuration as .ltx files - open it with a text editor. It has nothing to do with LaTeX.
Why won't my .ltx compile?
Common causes: a missing package (install the .sty via MiKTeX/tlmgr), a syntax error (unbalanced braces, a mistyped command), or missing \begin{document}/\end{document}. The .log file points to the failing line.

References

1The LaTeX Project - documentationwww.latex-project.org
2TeX Users Group (TUG)www.tug.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.BINCD/DVD Disc Image (BIN/CUE)
7.NOMEDIAAndroid No-Media Marker File
8.MDMarkdown Document
9.RPMSGRestricted Permission Message
10.TMPTemporary File

Related extensions

.DOCMicrosoft Word 97-2003 Document
.ODTOpenDocument Text
.DOCXMicrosoft Word Open XML Document
.GDOCGoogle Docs Shortcut (Link to a Google Docs document)
.LSTList File (generic plain-text list / listing)
.VNTvNote (mobile phone text note / memo)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z