> tee credo.tex

Credo

Four things you can write in LaTeX source:

x
$x$
\textit{x}
\times

A letter in prose. A mathematical variable. Emphasised text. A multiplication sign. They are not the same thing.

x is not $x$ is not \textit{x} is not \times.

Paraphrasing Gertrude Stein

This is how I write LaTeX.

Meaning. First.

The rule

Content is tagged by what it is, not by where it sits. A variable stays a variable whether it appears in a theorem or inside a sentence. A phrase stays a phrase whether it sits in prose or inside a formula. The surrounding environment doesn’t change what the thing is — only the right macro protects its meaning.

Examples

\text{For every }x is wrong. “For every” is prose, x is a variable. Leaving the variable bare relies on the ambient math mode to look italic, while saying nothing about meaning. \text{for every $x$} is right: prose contains a variable, both are marked for what they are.

e^{2x}, when you mean Euler’s number, is wrong. Bare e is a letter. The constant deserves its own macro — I use \eul.

\text{sin}\, x is wrong. sin isn’t a trigonometric function here, it’s three italic letters shaped like one. The function is \sin.

Why it matters — restyling

$x$ is math, rendered by default as italic. \textit{x} is italic type. In a vanilla build they look identical. Under restyling they diverge completely.

If the book decides math symbols should be red and bold, $x$ follows; \textit{x} does not. If the book switches the text font but keeps math as it is, \textit{x} follows; $x$ does not. The macro you choose locks the content into one stylistic category. Choose the wrong one and the content bends the wrong way the moment the style changes.

Numbers are not always numbers

The year 2026 is a name. The sum $n = 2026$ is a quantity. the year \num{2026} is wrong — it applies number-formatting rules (thousand separators, old-style figures) to something that has no arithmetic in it. Digits that happen to spell an identifier — years, version numbers, page labels, street numbers — are text. Only quantities that carry arithmetic or measurement should be wrapped.

Structure is meaning too

The rule doesn’t stop at tokens. It applies to structure.

A theorem should live in a theorem environment. A code block should live in a code environment. An exercise in an exercise environment. Not in \begin{quote} dressed up with \textbf{Theorem.} — not in a stack of minipage and multicols that happens to look right today.

If the class doesn’t define \begin{theorem}, I write it — once, in the preamble. Then every theorem in the document is a theorem: named, styled from one place, restyled globally when the brief changes.

\begin{minipage} is not \begin{theorem}. A layout container that produces the same output is not a semantic environment. The moment the style changes, the container stays wrong and the environment adapts.

The source should be a map of what things are, not a recipe for what they look like. The layout is a consequence of the meaning. Never the other way.

How I work

Before I write or fix a LaTeX fragment, I ask: what is this content, really? I pick the macro for that meaning and let the surrounding environment adapt around it.

I never use \text{} to escape math mode for math content. I never use $...$ to force italics on prose. I never use \num{} on numbers that are names.

The source should read so that meaning is obvious from the tags. The rendered output should stay correct through any restyling. Both come from the same discipline.

saved as credo.tex

Even if part of this website does use cookies from third parties, the owner doesn't because he doesn't know how to read cookies and he doesn't have time to profile you. View more
Cookies settings
Accept
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Website address: https://latex.guru.

Comments

Visitors are not allowed to make comments. If you try, I get notified and I can see some of your details. But I don't have time for that.

Cookies

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

I don't share data with anyone (third parties aside).
Save settings
Cookies settings