TeXipedia

plain

Provides the fundamental format that implements the basic TeX typesetting system as described in Knuth's TeXbook.

Overview

Represents the original, foundational implementation of TeX's typesetting capabilities, offering a minimal but complete set of macros and definitions for document production. While less feature-rich than LaTeX, it serves as the historical and technical foundation upon which many other formats are built.

  • Offers direct access to TeX's core typesetting mechanisms without additional layers of abstraction
  • Particularly valuable for users requiring precise control over typesetting details
  • Still actively used in specialized publishing workflows and by TeX purists
  • Includes essential macros for basic document structuring, mathematics, and page layout
  • Serves as a learning tool for understanding fundamental TeX concepts and mechanisms

Getting Started

The plain package is the basic Plain TeX format, not a LaTeX package. To use Plain TeX instead of LaTeX:

  1. Create a .tex file with Plain TeX commands
  2. Compile with: tex document.tex instead of using LaTeX commands

Unlike LaTeX, Plain TeX doesn't use document classes or \usepackage commands. A minimal Plain TeX document looks like:

Hello, world!

This is Plain \TeX.
\bye

Note that Plain TeX uses \bye instead of \end{document} to mark the end of the document.

Examples

Using Plain TeX format for a simple document with basic formatting.

\documentclass{article}
\begin{document}
\noindent This is a document that demonstrates the use of Plain TeX commands within LaTeX.

\bigskip
\hrule
\smallskip

\centerline{\bf Centered Title Using Plain TeX Commands}

\smallskip
\hrule
\medskip

\noindent Here we use some Plain TeX formatting commands:
\smallskip

\begin{itemize}
\item First item with plain TeX itemization
\item Second item
\item Third item
\end{itemize}

\bigskip
\noindent And some text with {\it italic}, {\bf bold}, and {\tt typewriter} styles.

\vfill
\newpage

\end{document}

Creating a simple two-column layout using Plain TeX commands.

\documentclass{article}
\begin{document}
\noindent This document demonstrates a two-column layout using Plain TeX commands.

\bigskip
\hrule
\bigskip

\hbox{\vtop{\hsize=0.45\linewidth
This is the left column. Plain TeX provides various primitives for layout control that can be used even within a LaTeX document. This demonstrates how to create a simple multi-column layout using the \tt\string\line\rm\ and \tt\string\vtop\rm\ commands.
}\hfil\vtop{\hsize=0.45\linewidth
This is the right column. The columns are separated automatically and the \tt\string\hfil\rm\ command is used to create space between them. The \tt\string\hsize\rm\ parameter controls the width of each column.
}}

\bigskip
\hrule
\bigskip

\noindent Back to normal single-column text.

\end{document}