All of the standard LaTeX document classes (article, book and report) declare some basic functionality and parameters based on the condition @compatibility. Here's an extract from from article.cls that defines the standard paper size options available to the class(es):
\if@compatibility\else
\DeclareOption{a4paper}
{\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{a5paper}
{\setlength\paperheight {210mm}%
\setlength\paperwidth {148mm}}
\DeclareOption{b5paper}
{\setlength\paperheight {250mm}%
\setlength\paperwidth {176mm}}
\DeclareOption{letterpaper}
{\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{legalpaper}
{\setlength\paperheight {14in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{executivepaper}
{\setlength\paperheight {10.5in}%
\setlength\paperwidth {7.25in}}
\DeclareOption{landscape}
{\setlength\@tempdima {\paperheight}%
\setlength\paperheight {\paperwidth}%
\setlength\paperwidth {\@tempdima}}
\fi
Starting a document with
\makeatletter\@compatibilitytrue\makeatother
\documentclass{<standard document class>}
skips these paper definitions, including many others. What is the use of this compatibility condition? Does it allow some form of compatibility with LaTeX 2.09 or other platforms? Why would one use it?
For example, the following compiles fine:
%\makeatletter\@compatibilityfalse\makeatother
\documentclass[a4paper]{article}
\begin{document} Hello world. \end{document}
while the following issues a warning:
\makeatletter\@compatibilitytrue\makeatother
\documentclass[a4paper]{article}
\begin{document} Hello world. \end{document}
for the reasons described above.
\documentstyle. – egreg Apr 16 '12 at 19:53