My Mathematics LaTeX macros and shortcuts
(La)TeX is a technical typesetting tool and Turing-complete language used by mathematicians (and others!) to type their work. I think the Turing-completeness should be leveraged to the advantage of writers. In programming languages, an important feature of any language is its "readability," or how quickly can readers intuit the intention and functioning of the code. To the unititiated, (La)TeX can be difficult to parse and, to the experienced, has many readability shortfalls.
Specifically, and for good reasons, in (La)TeX, typeset symbols are named after what the symbols are, such as "\cup" for a set union symbol or "\rightarrow" for an arrow pointing right, typically shorthanded by mathematicians to "\to". Such shorthands make code more readable. Contrast f: X \rightarrow Y
to f: X \to Y
. The latter reads more like how a mathematician would refer to the typeset result in English. Thus, I think there are benefits to extending such ideas further, even at the sake of taking slightly longer to type. For instance, I propose A \cup B \cap C
should be long-handed to A \union B \intersect C
. While it takes slightly longer to type, the benefits are 3 fold.
- The intent of the typist is more clear. It is easy to mistype
\cap
for\cup
. This reduces typos. - Parsing the TeX code is much faster for a human reader.
- A standard set of commands makes it easier for readers to change conventions to their tastes.
Many such long-hands will be added here, along with typical convenience functions that I use in my LaTeX documents. Many of these ideas are inspired by my work on ghseeli/grad-school-notes. After using this system with collaborators and on my own, I believe it offers many merits worth the slight time disadvantages that come with typing a few extra characters here or there.
The primary file for this project is readtex-core.sty
. Simply download the file into your TeX project directory, and then add \usepackage{readtex-core}
in with your other package statements below the \documentclass
command.
Other files are for more domain specific areas of math and may have less canonical choices of commands; they were mainly used for me to type up homework assignments in my first year of graduate school. They are provided "as-is" but use at your own risk! Finally, readtex-dangerous.sty
contains commands that will override standard behavior of commands. Only use this file if you know what you are doing!