LaTeX Document
A TEX file contains LaTeX source code, a plain-text markup language compiled into PDF by engines like pdflatex or xelatex. It is the standard format for academic papers, theses, and scientific publishing. FileDex does not convert TEX files but provides format reference information.
LaTeX requires the TeX typesetting engine for compilation to PDF, not available in browser WASM.
Looking to convert? Try a related format:
Common questions
How do I compile a TEX file to PDF?
Run 'pdflatex document.tex' in a terminal with a TeX distribution installed (TeX Live, MiKTeX, or MacTeX). For bibliography support, run bibtex then pdflatex twice more.
What is the difference between pdflatex, xelatex, and lualatex?
pdflatex is the classic engine (fast, wide compatibility). XeLaTeX adds native Unicode and OpenType font support. LuaLaTeX embeds the Lua scripting language for advanced customization. All produce PDF output.
Can I convert a TEX file to Word?
Yes, using Pandoc: 'pandoc document.tex -o document.docx'. Complex layouts and custom macros may require manual adjustment after conversion.
What makes .TEX special
What is a TEX file?
TEX files contain LaTeX source code, a document preparation system built on Donald Knuth's TeX typesetting engine. LaTeX is the standard for producing scientific papers, theses, books, and technical documents. It excels at mathematical typesetting, bibliography management, and consistent formatting.
Continue reading — full technical deep dive
How to open TEX files
- Overleaf (Web) — Online LaTeX editor, collaborative
- TeXstudio (Windows, macOS, Linux) — Free IDE
- VS Code (Windows, macOS, Linux) — With LaTeX Workshop extension
- Any text editor — TEX files are plain text
Technical specifications
| Property | Value |
|---|---|
| Language | LaTeX (macro layer over TeX) |
| Output | PDF (via pdflatex, xelatex, lualatex) |
| Encoding | UTF-8 (recommended) |
| Package Manager | CTAN / TeX Live / MiKTeX |
| Bibliography | BibTeX, BibLaTeX |
Common use cases
- Academic papers: Research articles for journals and conferences.
- Theses: University dissertations and theses.
- Books: Technical books and textbooks.
- Mathematical documents: Equations, proofs, and formulas.
.TEX compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| ..TEX vs ..DOCX | Mathematical typesetting quality LaTeX produces publication-quality math typography with precise spacing; Word's equation editor is adequate but less refined | .TEX wins |
| ..TEX vs ..MD | Ease of learning Markdown has a far simpler syntax for basic formatting, while LaTeX requires learning commands, environments, and package ecosystems | .MD wins |
| ..TEX vs ..TYP | Modern usability Typst offers faster compilation, simpler syntax, and built-in scripting while approaching LaTeX output quality | .TYP wins |
Technical reference
- MIME Type
text/x-tex- Developer
- Leslie Lamport / Donald Knuth
- Year Introduced
- 1984
- Open Standard
- Yes
Binary Structure
TEX files are plain-text files containing LaTeX markup. They begin with a document class declaration (\documentclass{}) followed by a preamble with package imports (\usepackage{}) and configuration commands. The document body is enclosed between \begin{document} and \end{document}. Content uses backslash commands for formatting, environments for structures, and dollar signs for math mode.
Attack Vectors
- \write18 (shell escape) can execute arbitrary system commands if enabled
- \input and \include can read arbitrary files from the filesystem
- Malicious packages from untrusted sources could contain shell escape calls
Mitigation: FileDex does not open, execute, or parse these files. Reference page only.