Writing Tips
Usage of "Any" in Math
One must be careful when using the word “any” in mathematical writing because in certain contexts, “any” is ambiguous and can mean both “every” and “at least one”. Consider the following question:
Does $x^2 = 0$ hold for any $x \geq 0$?
There are two correct answers:
- We can rewrite the question as, “does there exist at least one $x \geq 0$ such $x^2 = 0$?” The answer is “yes” because $x = 0$ satisfies $x^2 = 0$.
- Alternatively, we can rewrite the question as, “does every $x \geq 0$ satisfy $x^2 = 0$?” The answer is “no.” If $x = 1$, then $1^2 \neq 0$.
Thus, do not use “any” when what you mean is “all.” Use “for all” or “for each” instead.
Avoid "Respectively"
In many cases, using the word “respectively” makes sentences hard to parse because it requires the reader to map each item in a list based on its position. For example, “Let $x$ and $y$ be the width and height of a rectangle, respectively,” can be more clearly stated, “Let $x$ be the width and $y$ be the height of a rectangle.” By placing the definition of symbol next to the symbol, you allow readers to glean the meaning of each withing needing to backtrack or remember the order that $x$ and $y$ were written.
Another example comes from an actual paper:
Consider a nonlinear system
$$\begin{aligned}
\dot{x} & =f(x) \\
y & =h(x)
\end{aligned}$$where \(f\) and \(h\) are locally Lipschitz continuous and continuous, respectively.
This can be improved (and shortened) by removing “respectively”.
Consider a nonlinear system
$$\begin{aligned}
\dot{x} & =f(x) \\
y & =h(x)
\end{aligned}$$where \(f\) is locally Lipschitz continuous and \(h\) is continuous.
Sometimes rewritten a sentence to remove “respectively” may lengthen it significantly or may introduce tiresome repetition. In such cases, use your judgement to decide whether the improved clarity is worth the increased verbosity.
The Best Notation is No Notation
As P.R. Halmos wrote, “the best notation is no notation.” If you can avoid introducing a new symbol, then the text is often more clear and the reader has one less thing to remember. A rule of thumb is to never use a letter only once. Consider the following definition:
A function $f$ is called a homeomorphism if it is continuous and has a continuous inverse.
The symbol $f$ serves no purpose since it is not used elsewhere in the definition. Thus, it can be omitted.
Make Your Document Color Accessible
When creating documents, make sure that graphs and uses of color are legible when viewed without color. Roughly 1 in 20 people are color-blind. And, regardless of a person’s ability to see color, it’s common to print papers in black and white. If your paper requires color to be understood, then you will lose readers!
For slides, color can play a more important role. You should make presentations accessible to color-blind people, but complete color-blindness is very rare. Most color-blind people are either unable to distinguish between red and green or between blue and yellow, but otherwise distinguish between other colors. Thus, if you pick your colors carefully, they can be seen by almost everybody.
See also:
Don't Use Reuse Mathematical Symbols for Different Meanings
One of the surest sources of confusion in mathematical writing is to use one expression to mean multiple things. Authors often make this mistake with functions. To illustrate, consider a function $f$ from $\mathbb{R}$ to $\mathbb{R}$. The expressions “$f$” and “$f(x)$” have different meanings. The statement “$f(x)$ is monotonically decreasing” is meaningless because “$f(x)$” is a constant real number. Instead, write “$f$ is monotonically decreasing” or “$x \mapsto f(x)$ is monotonically decreasing”. The latter form is useful if you want to talk about the composition of functions without introducing a new symbol: “$x \mapsto f(1 + x^3)$ is monotonically decreasing”.
When is it OK to reuse a symbol?
A complete ban on reusing symbols in a mathematical text would cause you to quickly run out of symbols, especially in long texts. Similar to variables in a programming language, symbols have a particular scope.
The tightest scope is what I will call a bound symbol. A bound symbol is defined and used only in a single expression. The symbol $x$ is a bound variable in the following expressions: “$\forall x\ P(x)$”, “$\exists x\ P(x)$”, and “$x \mapsto f(x)$.” It is OK to immediately use the same bound symbol in multiple expressions, such as, “Consider the functions $x \mapsto f(x)$ and $x \mapsto g(x)$.” To aid the reader, however, each time a bound symbol is reused in a section of text, it should have the same type of meaning.
Symbols introduced in a proof should be restricted to that proof (many readers skip proofs on their first read of a text), so we can treat a proof as a symbol scope. If we introduce “$\varepsilon > 0$ and $\delta = 2\varepsilon$” in the proof of Theorem 1, then it is OK to define “$\delta \in (0, 1)$ and $\varepsilon = \sqrt{\delta}$” in the proof of Theorem 2.
Symbols introduced in definitions and theorems are not scoped in the same way.
Don't Start a Sentence With a Mathematical Expression
Don’t start a sentence with a mathematical expression (numerals, variables, or equations). Instead, start every sentence with a word. Consider, for example, that you have a set $A$. It’s confusing to say: “$A$ is …” because the symbol “$A$” looks like the word “A”. Similar confusion can ensue if a sentence ends with a mathematical expression and the next starts with one. For example, “The value of $X$ is $2$. $5$, $6$ and $7$ are numbers.” It looks, at first blush, that $X = 2.5$. When a clause ends with a mathematical expression followed by a comma, avoid placing another mathematical expression immediately after the comma.
There are several ways to avoid starting with a mathematical expression.
- Say the type of the object before the symbol: “The set $A$ is…,” “The expression $\sigma(2 + x)$ represents…”, “The inequality $a^2 \leq b^2$ holds for…”.
- Say the name of the object or short description: “The empty set $\emptyset$ is…”, “The union $A \cup B$…”.
- Reorder the sentence.
Correctly Format Text in Equations
When writing a mathematical equation that contains a word or other string of characters that is a unified block, place those characters inside a \text{...}
macro.
To understand why this is important, suppose you have defined \(a,\) \(n,\) and \(t\) as real numbers.
What does the expression \(tan(a)\) mean? Anybody experienced with trigonometry, would read this as the tangent of \(a,\) but because juxtaposition indicates multiplication, the expression is ambiguous—it could also be read as \(t\) times \(a\) times \(n\) times \(a.\)
To avoid this ambiguity, write \(\tan(a)\) ($\tan(a)$
or $\operatorname{tan}(a)$
).
The particular way that you format a string depends on the context.
\operatorname{}
to define functions like $\sin$ and $\cos$ that consist of several characters. Based on the context,\operatorname{}
inserts the proper spacing before the text.\text{}
to insert plain text that matches the formatting of the surrounding text environment, such as\text{if } ...
\text{otherwise} ...
in acases
environment.\textup{}
to insert upright text. Useful for equations that appear in italicized environments, like theorems.\texttt{}
to format programming variables and other code-like text.\textsc{}
to format text using “small caps”.
If the string of characters appears repeatedly, define a macro to make it easier to typeset.
Formatting Fractions
Fractions come in two varieties: Display style and text style. A text style fraction is small enough to fit within the height of a line of text, like $\frac{a}{b}$. In contrast, a display style fraction is taller and will extend beyond the normal line height if used in text: $\dfrac{a}{b}$. A text style fraction is used automatically by LaTeX in the following circumstances:
- In inline equations delimited by
$ ... $
or $( … )$, such as$\frac{a}{b}$
($\frac{a}{b}$). - In the numerator or denominator of another fraction.
- In matrix environments, such as
pmatrix
orbmatrix
. - In
cases
environments.
Here is a example that demonstrates text style fractions:
\[ \frac{1 + \frac{1}{2}}{2} + \begin{bmatrix} 1 & \frac{1}{2} & \frac{1}{3} \end{bmatrix} + \begin{cases} 2 + \frac{1}{4} \\ \frac{1}{5} \end{cases} \]Output:
In contrast, a display style fraction is used in the following cases:
- In a display equation, delimited by
\[...\]
,$$...$$
,\begin{equation} \end{equation}
or the other similar environments (equation*
,align
, andalign*
). - Anywhere (including where a text style fraction would normally be used) if
\dfrac
is used instead of\frac
, or if\displaystyle
is placed anywhere before the fraction.
When writing a fraction in LaTeX, consider the following guidelines:
- Do not use display style fractions inline, in text. They will look bad and cause the height of the lines to grow.
- Only use text style fractions for simple fractions, such as $\frac{1}{2}$. Do you want to read a fraction like $\frac{1+\sqrt{x^2}}{e^{-\frac{x}{\pi}}}$? I wouldn’t! Either make the equation a display equation (e.g., if it is in a
bmatrix
environment where there is sufficient space), or rewrite the equation with a slash, like $(1+\sqrt{x^2})/(e^{-x/\pi})$. - If writing a fraction using the slash notation and the expression for the numerator or denominator is taller than a typical line of text, use
\left. <numerator> \middle/ <denominator>\right
to ensure that the slash matches the height of the numerator and denominator. The
\shortfrac
macro provxided here automatically scales the slash for you. - When a minus sign occurs before a fraction, it more easily lost in calculations, so consider rewriting the expression. For instance, rewrite “$-\frac{a}{b}$” into “\frac{-a}{b}”. If possible, eliminate the minus sign by distributing it to the numerator or denominator, such as “$-\frac{a - b}{c}$” changing to “$\frac{b - a}{c}$.”
- When practical, avoid placing fractions inside fractions. For instance, change \(\frac{1 + 1/n}{1} \quad \text{into} \quad \frac{n + 1}{n}.\)
Formatting If-then Statements (Hypotheticals)
In mathematics, statements in the form
- Statement 1: “If P, then Q”
are common. Two examples are
- Statement 2. “If $x > 1$, then $x^2 > x$”
- Statement 3. “If a triangle is a right triangle, then the sum of the squared legs is equal to the square of the hypotenuse.”
Such statements are called hypotheticals. The portion between “If” and “then” is called the antecedent and the portion after “then” is called the consequent. In Statement 1 (“If P, then Q”), the expression P is the antecedent and Q is the consequent. Similarly, in Statement 2, “$x > 1$” is the antecedent and “$x^2 > x$” is the consequent.
Despite their ubiquity, many mathematicians (myself included) still often write if-then statements in ways that are needlessly confusing. The following sections describe guidelines to help clarify hypothetical statements.
Prefer “If P, then Q” over “If P, Q”
In common English, it is perfectly valid grammar to leave out the “then”, and simply say, “If P, Q”, such as, “If the store has eggs, buy a dozen.” This shorter form should not be used in technical writing. Including “then” makes it easier for readers to parse your statement. Consider Statement 3 without the “then”:
- Statement 3’. “If a triangle is a right triangle, the sum of the squared legs is equal to the square of the hypotenuse.”
As the reader progresses through the sentence, they cannot (without prior knowledge) know where the antecedent ends and the consequent begins until they reach the end of the sentence. In particular, they cannot know whether the comma indicates the end of the antecedent or is merely separating items in a list. For example, although Statement 3’ is familiar to anybody who has studied geometry, the portion after the comma could, in fact, go to unexpected places:
- Statement 3’’. “If a triangle is a right triangle, the sum of the squared legs is equal to the square of the hypotenuse, and 1=2, then I am the king of England.”
That’s a very different claim than Statement 3’! (And, perhaps surprisingly, it is true.)
More generally, using “then” alerts readers as soon as possible whether a statement is in the form
- “If P, Q, and R, then S”
or
- “If P, then Q and R”.
(Compare without “then”: “If P, Q, and R, S” and “If P, Q, and R”.) Without “then”, you can the reader off kilter and trying to fill in the gap, so always include it!
Rewriting Hypotheticals
Although you should always include “then” after “if”, you have latitude to rewrite hypotheticals in several other ways. Namely, the hypothetical “If P, then Q” is equivalent to the following statements:
- “If not Q, then not P.” (This is called the contrapositive of “If P, then Q”)
- “Q or not P.” (More verbosely, “either Q is true or P is false”). The order can also be swapped to “Not P, or Q”, but this risks readers thinking it means “not P or not Q”, which is not equivalent.
- “P only if Q.”
If you are unsure of the equivalency of these statements, then you should check their truth tables to make sure they always have the same truth value, for all truth values of P and Q:
P | Q | If P, then Q | If not Q, then not P | Q or not P | P only if Q |
---|---|---|---|---|---|
T | T | T | T | T | T |
T | F | F | F | F | F |
F | T | T | T | T | T |
F | F | T | T | T | T |
In my experience “P only if Q” is almost always more confusing that the alternatives and should not be used (if you find an exception, please let me know). The remaining equivalent forms can all be used, in proper contexts, to clarify a statement.
Initial Value Notation
When writing the initial value of a dynamic system, the initial value should be typeset using a subscript zero (“0
”) not the letter oh (“O
”) or (“o
”).
To illustrate, the initial value of a state \(x(t)\) should be written as \(x_0\) (“x_0
”) not as \(x_O\) (“x_O
”) or \(x_o\) (“x_o
”).
Formatting of align
and aligned
Environments
When writing a multiline expressions in LaTeX using align
or aligned
environments, use well-placed line breaks and alignment and proper spacing to improve readability.
The following example is an example of a poorly formatted equation:
\begin{align} f(x) &:= \sum (a + b + c) + \\ & \iiint f(x + y + z) dx\, dy\, dz \\ &- x + y + z + \sin\Big(x + y \\ &+ x^2 - y^2 \Big) \\ \end{align}Output:
The above snippet contains the following formatting errors:
-
In (\ref{eq:operator at end}), the addition symbol is placed at the end of the line, instead of after the line break. Although this is a matter of taste, I prefer placing plus and minus signs (and other binary operators) so that they are all aligned, allowing the reader to easily identify, for example, if all of the terms are added or if, instead, some terms are subtracted.
- In (\ref{eq:not aligned with rhs of equal sign})-(\ref{eq:line break in middle of parentheses}), the start of the line is aligned with the left side of the equal sign. Instead, the entire expression of the right-hand side of the equality should be aligned to the right of the equal sign.
To achieve this, replace
&:=
in the first line with:=&
. (Alternatively, you can use&\quad
in all of the subsequent lines, but this approach is more verbose and may result in worse alignment.) -
In (\ref{eq:plus sign with unary operator spacing}), the line of code starts with
&-
. In this expression, LaTeX interprets “-
” as a unary operator instead of a binary operator. Since LaTeX places space on both sides of a binary operator but not a unary operator, the minus sign will be displayed with insufficient space (the online display of this equation does not show a much different spacing, but in some LaTeX documents, the difference is dramatic). To force LaTeX to recognize-
or+
as a binary operator, place “{}
” on the left side, like&{}-
and&{}+
. - In the line break between (\ref{eq:plus sign with unary operator spacing}) and (\ref{eq:line break in middle of parentheses}), the break is placed in the middle of a parenthetical grouping.
Line breaks should be placed between the highest level of group possible.
When a break is placed inside parentheses, the start of the new line should align with the start of the parenthetical group. Among other reasons to avoid line breaks between parentheses is that
\left( ... \\ ... \right)
does not work to make the parentheses match the height of the contents—instead, you must manually set the sizes of the parentheses, using, e.g.,\Big( ... \\ ... \Big)
.
Fixing the above problems results in the following aligned equation:
\begin{align} f(x) :={} & \sum (a + b + c) \\ &{} + \iiint f(x + y + z) dx\, dy\, dz \\ &{} - x + y + z \\ &{} + \sin\left(x + y - x^2 - y^2 \right) \end{align}Output:
If the expression inside the parentheses of the \sin
function were longer, and needed to be placed on multiple lines, then the contents should be aligned using manual spacing via the \hspace
command:
\begin{align} f(x) :={} & \sum (a + b + c) \\ &{} + \iiint f(x + y + z) dx\, dy\, dz \\ &{} - x + y + z \\ &{} + \sin\big(x + y \\ &\hspace{3em} {} - x^2 - y^2 \big) \end{align}Output:
Alternatively, alignment can be achieved using \phantom
to insert space equal to the space needed for its argument if its argument was rendered (which it is not).
\begin{align} f(x) :={} & \sum (a + b + c) \\ &{} + \iiint f(x + y + z) dx\, dy\, dz \\ &{} - x + y + z \\ &{} + \sin\big(x + y \\ &{} \phantom{{} + \sin\big(} - x^2 - y^2 \big) % <- Copy a portion of the previous line in \phantom{} \end{align}Output:
Dashes for Parenthetical Statements
When emphasizing a parenthetical statement, an m-dash should be used. In LaTeX, an m-dash is typeset using three hyphens: ---
. There should not be spaces around the m-dash.
Incorrect: This is a sentence --- but I stop to make a parenthetical statement.
\(\text{This is a sentence — but I stop to make a parenthetical statement.}\)
Correct: This is a sentence---but I stop to make a parenthetical statement.
\(\text{This is a sentence—but I stop to make a parenthetical statement.}\)
Be careful when writing an m-dash at the end of a line of LaTeX code because LaTeX will inject a space at each line break. You can suppress the added space by ending the line with “%
” immediately after “---
”:
% Incorrect
This is a sentence---
but I stop to make a parenthetical statement.
% Correct
This is a sentence---%
but I stop to make a parenthetical statement.
Presenting a Sequence of Manipulations to an Expression
When presenting a series of operations performed on an expression, it can be clearer to state the step-by-step recipe of how to perform the manipulations, than to show only the results of each step. The clearest, of course, would be to provide a step-by-step guide that shows the result from each step. Unfortunately, space constraints often prohibit such spacious exposition.
Suppose we want to solve \((a + x)/2 = 3\) for \(x.\) In the following table, the left shows a purely symbolic approach, which leaves the reader to fill in the gaps. The right column describes what is required but does not show the result of every step.
Symbolic Manipulation | Description |
---|---|
$$\begin{aligned} &\frac{a + x}{2} = 3 \\ &a + x = 6 \\ &x = 6 - a \end{aligned}$$ | Multiply both sides by \(2,\) and subtract \(a\) from both sides. The result is \(x = 6 - a.\) |
"Minimize" vs. "Min" in Optimization Problems
When writing an optimization problem, write “minimize” and “subject to” instead of “min” and “such that” or “s.t.”.
Correct | Incorrect |
---|---|
\[\begin{aligned} \operatorname{minimize} \quad & f(x) \\ \operatorname{subject to} \quad & Ax = b, \end{aligned} \] | \[ \begin{aligned} \operatorname{min} \quad & f(x) \\ \operatorname{s.t.} \quad& Ax = b. \end{aligned} \] |
The problem with writing “$\operatorname{min} f(x)$” instead of “$\operatorname{minimize} f(x)$” is that the expression “$\operatorname{min} f(x)$” represents the minimal value of $f$ whereas “$\operatorname{minimize} f(x)$” is a statement of the goal of the optimization problem.
We use the following code when writing optimization problems.
In the preamble, we define \minimize
, \maximize
, and \subjecto
macros, as follows:
% Usage: \minimize{\x \in \reals}
\newcommand*{\minimize}[1]{\operatorname*{minimize}_{#1}\quad}
% Usage: \maximize{\x \in \reals}
\newcommand*{\maximize}[1]{\operatorname*{maximize}_{#1}\quad}
\newcommand{\subjectto}{\textup{subject to}\quad}
The starred version of the \operatorname
macro causes subscripts to be placed below the text in display equations.
In the document body, we write an optimization problem as
\begin{align*}
\minimize{x \in \reals^n} & f(x) \\
\subjectto & Ax \leq 0 \\
& Bx = 0.
\end{align*}
If space is a concern, you may abbreviate “subject to” as “subj. to” (\textup{subj.\ to}
).
Nonbreaking Spaces
By default, LaTeX will insert line breaks at any space between words. In many cases, the default produces nice results, but sometimes the breaks occur at awkward places:
4, I would walk 500
miles to make better
line breaks in my text
[23].
To force LaTeX to not break a line at a given space, replace “
” in the code with a tilde “~
”.
The result is called a nonbreaking space.
You should use nonbreaking spaces in the following cases:
Description | Example | Code |
---|---|---|
Between a number and its unit of measure | “1000 miles” | 1000~miles |
“183 billion” | 183~billion |
|
Between components of a value, such as between feet and inches | “10' 11"” | 10'~11" |
In a date, between the month and the number | “July 4” | July~4 |
Within a reference to a location in the document | “Section 4” | Section~4 |
“Fig. 1.2” | Fig.~1.2 |
|
“Theorem 3.1” | Theorem~3.1415 |
|
Before each citation | “…as was shown by Smith [12]” | ...as was shown by Smith~\cite{smith_2020} |
Before the last word of a paragraph, especially if the word is short. | “…and so we must build it.” | ...and so we must build~it. |
Before or after any number, symbol, or narrow expression that is strongly associated with the adjacent word | “width $w$” | width~$w$ |
“in $\partial S$” | in~$\partial S$ |
|
“$A$ to $B$” | $A$~to~$B$ |
Preventing Line Breaks in Equations
Using ~
to prevent line breaks only works in text.
A different approach is needed in equations.
To prevent line breaks in the middle of an equation, place curly brackets “{...}
” around the equation.
For example ${a \in A}$
will always be displayed on one line, whereas ${a^2 + b^2} = {c^2 + d^2}$
may have a line break at the equal sign but nowhere else.
Preventing Line Breaks in Titles
LaTeX’s placement of line breaks in title is often unappealing. Consider the default output of the title code, in one of my papers:
\title{ Conical Transition Graphs for Analysis of Asymptotic Stability in Hybrid Dynamical Systems }Output:
Conical Transition Graphs for
Analysis of Asymptotic Stability in Hybrid Dynamical
Systems
The placement of “Systems” alone on the third line looks unpleasant.
To force LaTeX to not orphan “Systems,” we add nonbreaking spaces between the words “Hybrid~Dynamical~Systems”.
While we’re at it, I also put ~
into “Conical~Transition~Graphs” and “Asymptotic~Stability” so that LaTeX keeps those phrases grouped together.
\title{ Conical~Transition~Graphs for Analysis of Asymptotic~Stability in Hybrid~Dynamical~Systems }Output:
Conical Transition Graphs for Analysis of
Asymptotic Stability in
Hybrid Dynamical Systems
The above result is better, because it prevents the final word from dangling alone on a line. Ultimately, though, I decided to add even more nonbreaking spaces to prevent the middle line from being narrower than the first and third, and to make the lines roughly the same length. I find the result to be a significant improvement over the default:
\title{ % Note: You need "%" after "~" if you have a line % break immediately after. Otherwise, LaTeX inserts % an extra space at the line break in the code. Conical~Transition~Graphs~for Analysis~of~% Asymptotic~Stability in~Hybrid~Dynamical~Systems }Output:
Conical Transition Graphs for
Analysis of Asymptotic Stability
in Hybrid Dynamical Systems
Adjusting LaTeX’s Automatic Line Breaking
LaTeX determines where to break lines by assigning penalties to line breaks in certain places. You can tweak these penalties to achieve fine-grained control over where automatic line breaks occur. See here for details.
Puncuation in Equations
When writing mathematics, punctuation should be placed in equations at the points where punctuation would occur if the equation was converted to text, as though spoken.
Repeat Yourself
Despite our best efforts, it is inevitable that we, as authors, inadvertently write things that are ambiguous or otherwise difficult to parse. When saying something important and difficult to understand, find ways to repeat yourself without saying exactly the same thing twice. While we often try to be as concise as possible and thus avoid redundancy, a degree of redundancy can be a lifesaver for readers when they encounter a statement that is confusing. Similar to how redundancy is vital in safety-critical control systems to ensure robustness to failures, including redundancy in writing can offer guardrails that protect readers from misunderstanding.
Here are key principles to doing this well:
- When repeating yourself, the repetition should convey the information in a completely different way. Strategies for this are presented below.
- When using information that was stated long before, reiterate the fact (perhaps in an abbreviated version) along with a note of where it was first introduced. This can save readers from needing to flip through previous material.
- Not everything needs to be repeated. Trust the intelligence of your readers. If a fact is absolutely clear with a single statement, then it does not need to be repeated. If it is obvious or common knowledge, then you may omit it completely.
Methods for Strategic Repetition
- After introducing a concept, provide an example that illustrates it. Ideally, pick one or more examples of the concept along with a non-example that the readers might mistakenly expect be an example.
- Before an equation, say in words what the equation says in math. For example, instead of writing, “We have that $\dot T = -\lambda T$,” we might write, “The rate of change of the temperature is $\dot T = -\lambda T$.” (This also allows you to avoid starting sentences with an equation without resorting to filler phrases like, “We have that…”.)
- Choose notation that reinforces the meaning of the symbols. For example, using $r$ for radius or consistently using bold letters for vectors (e.g., $\boldsymbol{x},\boldsymbol{y},\boldsymbol{z}$) are subtle ways to indicate to readers what their meanings are.
- In computer code, include comments that say what the code does.
- When space permits, include diagrams. “A picture is worth a thousand words.”
- Before or after a technical theorem, write an informal description of its important aspects.
- Simply including a proof or derivation after a mathematical statement serves to reiterate the statement by building it up piece-by-piece.
- For statements that are composed of a mix of logical operators and quantifiers, it can sometimes be helpful to readers if you reiterate claims into logically equivalent statements. For example, “all $x$, $P(x)$ holds” can be rewritten as “there does not exist any $x$ such that $P(x)$.” Similarly, “If $P$, then $Q$” can be written as its contrapositive.
"So That" vs. "Such That"
Despite sounding similar, the phrases “so that” and “such that” have different meanings. Using the wrong phrase can cause mathematical statements to be incorrect. The phrase “so that” indicates motivation whereas “such that” imposes a constraint.
We may, for example, say, “Pick \(x \in (-5, 5)\) so that \(x^2 < 25\).” In this case, we are alerting the reader to the fact that it is important that \(x^2 < 25\) but not adding any new information. In other words, replacing the sentence with “Pick \(x < 5\)” does not change the meaning. If, instead, we wrote, “Pick \(x \in (-5, 5)\) such that \(x^2 < 25\)”, the mathematical meaning changes to “Pick \(x\) such that \(x \in (-5, 5)\) and \(x^2 < 25\).” This, of course, is equivalent, but may confuse readers.
The consequence of using “such that” when we mean “so that” is—at worst—moderate confusion, but the result of using “so that” instead of “such that” is logically incorrect statements. For example, suppose we write, “Pick \(x, y \in \mathbb{R}\) such that \(x + y > 0\).” This imposes a constraint on \(x\) and \(y\); namely, their sum must be positive. The sentence “Pick \(x, y \in \mathbb{R}\) so that \(x + y > 0\)” is mathematically incorrect because picking \(x, y \in \mathbb{R}\) does not always result in a positive sum.
Often, readers can figure out your intended meaning if you mix up the two phrases, but doing so forces them to do extra work to infer what you, as the author, should have made explicit.
Size of Spaces of a Period
When LaTeX sees a period followed by a space, “. “, it assumes that the period is the end of a sentence, so it makes the space wider. When using a period that is not at the end of a sentence, the following space should be typeset using “\ “ instead of a normal space “ “. This ensures size of the space after the dot is correct.
Correct | Incorrect |
---|---|
$$\text{My name is P.}\ \text{Wintz}$$ | $$\text{My name is P. Wintz}$$ |
The difference is subtle and the actual spacing will depend on the settings for a particular document, but the difference helps readers discern whether a period ends a sentence.
Best Practices for Formatting Tables
- Eliminate unnecessary rules (lines) between columns and rows.
- Don’t repeat information. If some expression (such as units) occurs in every cell in a column or row, move it to the header.
- Don’t use a table if a plot would be better. If you have a large amount of information and readers are not interested in exact values, it is often better to display it graphically.
- Round aggressively. Readers rarely need more than one decimal point.
- Consider rearranging or transposing the table. If readers are likely to compare two quantities, place them in adjacent columns (it is slightly easier to compare elements between columns than between rows).
- Include a reference to the table in the text of the document and highlight important features.
Use Precise References to Locations in Documents
LaTeX is a powerful tool for cross-referencing.
Use it.
Instead of saying, “In a later section…”, “In the next section…”, or “Below…”, say, “In Section 4…”.
This allows readers to quickly pinpoint the thing you are referencing.
If you have TeX configured correctly (using hyperref
), then references will automatically include a internal link to the given place in the document, allowing readers to immediately jump there.
This advice also applies when citing other works.
If a citation is, say, an entire book, then the reader must spend time searching through it to find what you were talking about.
When citing in TeX, the \cite
macro has an optional argument for giving a locator.
For example, to cite Theorem 3.4 in khalil_nonlinear_2014
, use \cite[Theorem 3.4]{khalil_nonlinear_2014}
.
Some examples
- “Results presented in the next section…” \(\implies\) “Lemma 3 in Section 4…”
- “In the above inequality…” \(\implies\) “In inequality (4)…”
- “This theorem is given by Kahlil in [4]” \(\implies\) “This theorem is given by Kahlil in [Theorem 3.4, 4]”.
Including Links
% Add support for mixing colors, such as "black!30!blue" \usepackage{xcolor} % Enable hyperlinks \usepackage[]{hyperref} \hypersetup{ final, % Include links even if document is in 'draft' mode. hidelinks, % Prevent boxes from being drawn around links in some editors. colorlinks=true, linkcolor=black, % TOC, links to labeled equations and environments urlcolor=black!30!blue, % URLS including links in references citecolor=black!30!blue, % In-line citations }