TeX / LaTeX Document
DocumentsTEX normally contains TeX/LaTeX source rather than finished pages. Producing a PDF requires the matching engine and dependencies such as figures and bibliography files.
- What it is used for
- Typesetting source for mathematics and technical publications
- What the file contains
- Text
All sections, questions and sources
Content reviewed: · Editor:Kai
Opening steps
Choose your environment or purpose to see its steps.
Menu labels and support vary by app, OS and version. Preserve the original before making changes.
Troubleshooting by symptom
- Japanese output depends on the engine and fonts; follow the project’s stated configuration.
- Missing figures or classes require the referenced images, CLS/STY and bibliography files with their relative paths.
- Start with the first log error; later errors may cascade from it.
- Undefined control sequence: inspect the first reported command and its required package rather than chasing later cascading errors.
- File not found: check relative paths and capitalization for images, STY and BIB files.
- Missing Japanese text: check the engine and Japanese packages as well as encoding.
LaTeX source → PDF
- Compile the main document with the specified engine and bibliography/index workflow.
- Inspect equations, figures, citations and reference numbers; rerun the workflow if references remain unresolved.
- Inspect equations, citation numbers, image resolution and text search in the PDF; retain the source bundle.
Renaming does not typeset the source. Do not casually enable shell escape for an unknown project.
Build order and reading logs
Typesetting and bibliography processing can be separate stages. For unresolved references, inspect labels and whether the document was rebuilt.
Auxiliary files do not replace the source. Record the engine, first error and dependencies when diagnosing failures.
Source for these steps:LaTeX Project / learnlatex.org · Working with LaTeX
Delivering reproducible source
Preserve the directory structure of the main file, images, references and custom styles; document the environment in a README.
Consider external-command permissions only when the template needs them; inspect untrusted source before enabling them.
Source for these steps:LaTeX Project / learnlatex.org · Working with LaTeX
Related-format differences
| Format | Main role | Selection notes |
|---|---|---|
| TEX | Typesetting source | Requires an engine and assets |
| Final-document sharing | Does not restore source structure | |
| DOCX | Word-processing collaboration | Check equation and layout transfer |
Handling and security
Readable source is not proof of safety. Verify its origin and use a controlled environment for unfamiliar macros or external commands.
Questions and answers
Is one TEX file enough to reproduce the PDF?
Not when external figures or packages are referenced; obtain the complete project.
Which TEX file should I compile?
Follow the README or author’s instructions; chapter files are normally included by a main document.
Why do references show question marks?
Bibliography processing or another compilation pass may be missing; inspect the log and build instructions.
Is the TEX alone enough?
Images, custom STY files, bibliography and font requirements may also be needed. Include the project and build settings.
Can PDF be converted back to TEX?
The original equations and structure cannot reliably be reconstructed. Ask for the source first.
Format facts: name, steward and MIME type
- Formal name
- TeX / LaTeX source document
- Steward / specification
- TeX ecosystem / LaTeX Project
- MIME type
- Depends on the producer or server; an extension alone does not establish a MIME type.
Primary and official sources
- Project documentationLaTeX Documentation
Entry point to the project’s own documentation.
LaTeX Project · Link checked: - Project documentationWorking with LaTeX
Explains the source-editing and typesetting workflow.
LaTeX Project / learnlatex.org · Link checked: