A collection of commands focused on consistent notation for mathematics, physics, and engineering.
These days, LuaTeX is the officially recommended engine for all new projects. As such, I've created two versions of this package: one for the pdfLaTeX format and one for the LuaLaTeX format. I started checking out the LuaLaTeX ecosystem recently and found myself appreciating the Unicode support and NewComputerModern font family, so it's probably what I'll be using from now on. Until I completely phase out my use of pdfLaTeX, that version of the package will stay around.
This package exists as my personal replacement for the physics package. You can read about why you might not want to use physics in this thread. In general, the commands defined here exist because I've found myself writing them out the long way multiple times. Naturally, I spent far more time creating this package than would be required to just write the commands themselves. Touché.
Throughout, I make extensive use of DeclarePairedDelimiter and DeclarePairedDelimiterX, both of which belong to mathtools. These commands are great because they produce fixed-size delimiters by default, but also allow for auto-expanding delimiter pairs using their starred variants.
I prefer the clean look of bold vectors,
The braket package is perfectly fine, but there are some small formatting issues that bug me (particularly with how whitespace is handled in front of \kets). I also prefer to define my own shorthand for expectation values, inner products, outer products, and matrix elements.
I'm not a mathematician, but I have included shorthand for all the common sets of numbers. A convenient set-builder notation is also included since it's quite nice to have around.
The matrix shorthand is primarily useful if you're creating row or column vectors, although it's arguably worse than the default \begin{pmatrix}...\end{pmatrix} syntax in terms of formatting larger matrices. I'm still not sure how I feel about including this feature, so it may change in the future.
These commands just serve as an easier way to denote linear maps when working with the Dirac formalism in quantum mechanics.
Some of the more obscure trig functions that aren't included in base mathtools have been defined here for convenience.
I've defined the \real and \imag commands since I find the Fraktur symbols
Note
I don't intend for anyone to actually use this package themselves since notation is an extremely subjective topic. Hopefully the information contained here can still prove useful for those wanting to create their own package, however. If you do end up using natex, thanks!
I use a system-wide installation of MiKTeX on Windows, so that's the installation process I'll elaborate on here.
- Create a new TEXMF root directory and add an appropriate
$\TeX$ directory structure. The directory structure I use isC:\mytexmf\tex\latex\natex. - Place the
natex.styfile inside thenatexdirectory. - Open the MiKTeX admin console, go to the
Directoriestab underSettings, and addC:\mytexmfas a TEXMF root directory.
You can now import the natex package inside your .tex files just as you would with any other package.
For Linux and macOS look here. See this page for more details on MiKTeX specific implementations.
Copyright 2025-2026 Nathan G. Phillips
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2008 or later.
This work has the LPPL maintenance status maintained.
The Current Maintainer of this work is Nathan G. Phillips.
The bundle contains the files:
README.md This file.
natex-lualatex/
natex-lualatex.sty The LuaLaTeX version of the package itself.
natex-lualatex.pdf The package documentation in PDF format.
natex-lualatex.tex The master file that produced natex-lualatex.pdf.
natex-pdflatex/
natex-pdflatex.sty The pdfLaTeX version of the package itself.
natex-pdflatex.pdf The package documentation in PDF format.
natex-pdflatex.tex The master file that produced natex-pdflatex.pdf.