LaTeX Preamble with macros, operators, and symbols for writing about Precision Medicion/Precision Health using semantic commands. Write what you mean, not the markup
Syntactic: A policy
Syntactic: The estimated policy
$\valhat{\polhat}
Even better might be
Syntactic: \textit{Clostridium} \newrobustcmd*{\est}[1]{\widehat{#1}}% Semantic: \est{val} (\est{\pol})
The intended benefits of this file are to:
-
Make notation easy to change - To change the symbol for something one line in the preamble needs to be changed. Avoids find and replace which is liable to break in unforeseen ways.
-
Enhance document readability - Compare a) \val(\pol) vs. b) \mathcal{V}(\pi) . To understand (a) you have to remember the shorthand, while to understand (b) you have to remember the meaning of each symbol.
-
Reduce typos - writing what you mean instead of the associated symbols can prevent inconsistencies like forgetting to wrap a character in \mathbb{} or \mathrm{}
If you are using the preamble in a paper do not clone this repository. Instead, download the preamble file directly to your project directory.
Git clone is appropriate here.
Define downstream quantities using the commands defined up stream.
Good:
\DeclareMathOperator{\val}{{\mathcal{V} }} % value function
\DeclareMathOperator{\valhat}{{\widehat{\val}}} % estimated value function
Bad:
\DeclareMathOperator{\val}{{\mathcal{V}}} % value function
\DeclareMathOperator{\valhat}{{\widehat{\mathcal{V} }}} % estimated value function
Commands for operators and symbols should use all lower case letters
Commands changing the font for a character should use lower case letters for the portion of the command representing the style and a character matching the desired output i.e. an upper-case letter if the output will be an upper-case letter.
Good:\mbbR for \mathbb{R}
Bad: \mbbr for \mathbb{R}