Convert TEX to LaTeX
Max file size 100mb.
TEX vs LaTeX Format Comparison
| Aspect | TEX (Source Format) | LaTeX (Target Format) |
|---|---|---|
| Format Overview |
TEX
Plain TeX / Raw TeX Primitives
Plain TeX refers to the minimal format created by Donald Knuth in 1978 that provides basic formatting macros on top of TeX's approximately 300 primitives. It offers the lowest level of control over typesetting, without the structured abstractions that LaTeX provides. It is the foundation upon which all TeX formats are built. Low-Level TeX Primitives |
LaTeX
High-Level Document Preparation System
LaTeX is a document preparation macro package built on TeX by Leslie Lamport in 1984. It provides high-level commands for document structure (sections, figures, tables, bibliographies) while abstracting away TeX's low-level typesetting primitives. LaTeX is the dominant format for academic and scientific publishing. High-Level Macro Package |
| Technical Specifications |
Structure: Primitive commands and basic macros
Engine: TeX, pdfTeX, XeTeX, LuaTeX Format: Plain TeX (plain.fmt) Processing: tex/pdftex Extensions: .tex |
Structure: Semantic markup with \begin/\end environments
Engine: pdfTeX, XeTeX, LuaTeX Format: LaTeX2e macro package Processing: latex/pdflatex/xelatex/lualatex Extensions: .tex, .latex, .ltx |
| Syntax Examples |
Plain TeX low-level primitives: \nopagenumbers
\centerline{\bf Introduction}
\bigskip
This is a paragraph with
{\bf bold} and {\it italic\/}.
\item{1.} First item
\item{2.} Second item
$$E = mc^2$$
\bye
|
LaTeX high-level commands: \documentclass{article}
\begin{document}
\section{Introduction}
This is a paragraph with
\textbf{bold} and \textit{italic}.
\begin{enumerate}
\item First item
\item Second item
\end{enumerate}
$$E = mc^2$$
\end{document}
|
| Content Support |
|
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
TeX Introduced: 1978 (Donald Knuth)
Current Version: TeX 3.141592653 (converging to pi) Plain TeX: Included with all TeX distributions Status: Frozen by design (Knuth's intent) |
LaTeX Introduced: 1984 (Leslie Lamport)
LaTeX 2.09: 1985-1994 LaTeX2e: 1994-present Status: Active development (LaTeX3 kernel) |
| Software Support |
TeX Live: pdftex, tex, luatex
MiKTeX: Plain TeX support Editors: Any text editor Compilation: pdftex filename.tex |
TeX Live: pdflatex, xelatex, lualatex
MiKTeX: Full LaTeX support Overleaf: Online LaTeX editor Editors: TeXstudio, TeXmaker, VS Code |
Why Convert Plain TeX to LaTeX?
Converting plain TeX documents to LaTeX is a common upgrade path for users who want to take advantage of LaTeX's powerful document structuring capabilities. While plain TeX provides direct control over TeX primitives, LaTeX offers high-level commands that automate numbering, cross-referencing, bibliography management, and float placement -- features that would require extensive manual work in plain TeX.
One of the primary reasons for this conversion is access to LaTeX's vast package ecosystem. With thousands of packages available on CTAN (Comprehensive TeX Archive Network), LaTeX users can easily add functionality for specialized tables, advanced graphics, code listings, chemical formulas, musical notation, and much more. Plain TeX documents cannot directly use these packages without significant adaptation.
Academic publishing is another major driver. Nearly all scientific journals, conference proceedings, and university thesis templates are provided in LaTeX format. Converting plain TeX documents to LaTeX makes them compatible with these templates and submission systems, such as those used by IEEE, ACM, Springer, and Elsevier. Overleaf and other collaborative LaTeX platforms also expect LaTeX input.
Collaboration and maintainability benefit greatly from LaTeX's structured approach. LaTeX's semantic commands (\section, \textbf, \begin{enumerate}) are more readable than plain TeX's low-level equivalents ({\bf ...}, \item{1.}). This makes LaTeX documents easier for co-authors to understand, edit, and maintain, especially in team environments where not everyone is a TeX expert.
Key Benefits of Converting Plain TeX to LaTeX:
- Package Ecosystem: Access thousands of CTAN packages for extended functionality
- Journal Compatibility: Meet publisher requirements with standard LaTeX templates
- Automatic Numbering: Sections, figures, tables, and equations numbered automatically
- Cross-References: Built-in \ref, \cite, and \label for linking within documents
- Collaboration: Easier for co-authors to read and edit structured LaTeX
- Overleaf Support: Use online collaborative LaTeX editors
- Community Support: Large LaTeX community for troubleshooting and guidance
Practical Examples
Example 1: Basic Document Structure
Input plain TeX file (document.tex):
\font\titlefont=cmr17
\font\authorfont=cmr12
\font\sectionfont=cmbx12
\font\bodyfont=cmr12
\bodyfont
\centerline{\titlefont My Document}
\smallskip
\centerline{\authorfont Jane Doe}
\bigskip
\noindent{\sectionfont 1\quad Introduction}
\medskip
This is the first paragraph of the
introduction to our document.
\bigskip
\noindent{\sectionfont 2\quad Methods}
\medskip
We used {\bf standard techniques}
and {\it novel approaches\/}.
\bye
Output LaTeX file (document.tex):
\documentclass[12pt]{article}
\title{My Document}
\author{Jane Doe}
\begin{document}
\maketitle
\section{Introduction}
This is the first paragraph of the
introduction to our document.
\section{Methods}
We used \textbf{standard techniques}
and \textit{novel approaches}.
\end{document}
Example 2: Mathematical Content
Input plain TeX file (math.tex):
\noindent{\bf 1\quad Theorem}
\medskip
The Euler identity states:
$$e^{i\pi} + 1 = 0 \eqno(1)$$
The integral of a Gaussian:
$$\int_{-\infty}^{\infty} e^{-x^2}\, dx
= \sqrt{\pi} \eqno(2)$$
\bye
Output LaTeX file (math.tex):
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\section{Theorem}
The Euler identity states:
\begin{equation}
e^{i\pi} + 1 = 0
\end{equation}
The integral of a Gaussian:
\begin{equation}
\int_{-\infty}^{\infty} e^{-x^2} dx
= \sqrt{\pi}
\end{equation}
\end{document}
Example 3: Lists and Formatting
Input plain TeX file (list.tex):
\noindent{\bf 1\quad Requirements}
\medskip
The system requires:
\smallskip
\item{$\bullet$} 8 GB of RAM
\item{$\bullet$} 50 GB disk space
\item{$\bullet$} Linux or macOS
\smallskip
Installation steps:
\smallskip
\item{1.} Download the archive
\item{2.} Extract files
\item{3.} Run the installer
\bye
Output LaTeX file (list.tex):
\documentclass{article}
\begin{document}
\section{Requirements}
The system requires:
\begin{itemize}
\item 8 GB of RAM
\item 50 GB disk space
\item Linux or macOS
\end{itemize}
Installation steps:
\begin{enumerate}
\item Download the archive
\item Extract files
\item Run the installer
\end{enumerate}
\end{document}
Frequently Asked Questions (FAQ)
Q: What is the difference between plain TeX and LaTeX?
A: Plain TeX is a minimal set of macros that Donald Knuth defined on top of TeX's raw primitives, providing basic formatting capabilities. LaTeX is a macro package built by Leslie Lamport that provides high-level commands (\section, \begin{itemize}, \textbf) for document structure. LaTeX automates many tasks (numbering, cross-references, float placement) that must be done manually in plain TeX. Think of plain TeX as the assembly language and LaTeX as the high-level language of typesetting.
Q: Do both formats use .tex file extension?
A: Yes, both plain TeX and LaTeX files typically use the .tex extension. The difference is how they are compiled: plain TeX files are processed with `tex` or `pdftex`, while LaTeX files are processed with `latex` or `pdflatex`. The content of the file itself determines which format it uses -- plain TeX files end with \bye, while LaTeX files begin with \documentclass and end with \end{document}.
Q: Will mathematical equations be preserved?
A: Yes, TeX's mathematical typesetting is the same in both plain TeX and LaTeX. The $ and $$ delimiters, along with commands like \frac, \sqrt, \int, and superscripts/subscripts work identically. Plain TeX's manual equation numbering via \eqno is converted to LaTeX's automatic numbering using the equation environment, which provides better cross-referencing support.
Q: Can I use LaTeX packages after conversion?
A: Yes! One of the main benefits of converting to LaTeX is access to the vast CTAN package ecosystem. After conversion, you can add \usepackage commands to include packages for specialized tables (booktabs), code listings (listings, minted), graphics (tikz, pgfplots), bibliographies (biblatex), and thousands more. This is not possible with plain TeX.
Q: Is plain TeX still relevant today?
A: Plain TeX remains relevant for TeX engine developers, custom format creators, and typesetting specialists who need absolute control. However, for most document authors, LaTeX is the practical choice due to its automation, package support, and publisher acceptance. Converting to LaTeX gives you the best of both worlds -- you can still use TeX primitives within LaTeX when needed.
Q: Will the converted document compile with pdflatex?
A: Yes, the converted LaTeX document is designed to compile with pdflatex, xelatex, or lualatex. The conversion replaces plain TeX constructs with their LaTeX equivalents: \bye becomes \end{document}, manual font selection becomes \textbf/\textit, and \item{...} becomes LaTeX list environments. The resulting document follows standard LaTeX conventions.
Q: Can I submit the converted document to academic journals?
A: The converted LaTeX document provides a good starting point for journal submissions. However, most journals require specific document classes (e.g., IEEEtran, acmart, svjour3) and formatting guidelines. After conversion, you may need to adapt the document to the target journal's template. The key advantage is that LaTeX is the accepted format -- plain TeX submissions would typically be rejected.
Q: How does the conversion handle custom plain TeX macros?
A: Standard plain TeX constructs (font selection, spacing, lists, math) are converted to their LaTeX equivalents. Custom macros defined with \def in your plain TeX document are preserved and can often work within LaTeX, though some may need adjustment. For complex custom macros, you may want to rewrite them using LaTeX's \newcommand for better compatibility with the LaTeX ecosystem.