| 1 |
# revquantum # |
| 2 |
|
| 3 |
This package attempts to solve, or at least mitigate, standard problems with |
| 4 |
writing quantum information papers in ``{revtex4-1}``. In particular: |
| 5 |
|
| 6 |
- Includes titles in BibTeX. |
| 7 |
- Allows for use of nicer-looking fonts via ``{mathpazo}``. |
| 8 |
- Configures ``{hyperref}`` to make nicer-looking links and to correctly use ``\autoref``. |
| 9 |
- Sets up ``{listings}`` for common scientific languages and legacy environments (Python, Mathematica and MATLAB). |
| 10 |
- Provides notation for quantum information and makes defining new notation easier. |
| 11 |
- Reduces boilerplate for author affiliations by providing a (rudimentary) database for a few departments. |
| 12 |
|
| 13 |
A major goal of this package is to reduce the amount of useless crap that needs to be copied and pasted between documents. In particular, a complete document can be written in just a few lines: |
| 14 |
|
| 15 |
```latex |
| 16 |
\documentclass[pra,aps,twocolumn,superscriptaddress,10pt]{revtex4-1} |
| 17 |
\usepackage[pretty,uselistings]{revquantum} |
| 18 |
|
| 19 |
\begin{document} |
| 20 |
|
| 21 |
\title{Example \textsf{revquantum} Document} |
| 22 |
|
| 23 |
\author{Christopher Granade} |
| 24 |
\email{[email protected]} |
| 25 |
\affilUSydPhys \affilEQUS |
| 26 |
|
| 27 |
\date{\today} |
| 28 |
|
| 29 |
\begin{abstract} |
| 30 |
\TODO |
| 31 |
\end{abstract} |
| 32 |
|
| 33 |
\maketitle |
| 34 |
|
| 35 |
\bibliography{example} |
| 36 |
\appendix |
| 37 |
|
| 38 |
\end{document} |
| 39 |
``` |
| 40 |
|
| 41 |
## Installing ## |
| 42 |
|
| 43 |
### Install With PowerShell ### |
| 44 |
|
| 45 |
In an attempt to cut down on the pain of LaTeX package installation, ``{revquantum}`` uses [PoShTeX](https://github.com/cgranade/posh-tex/) to automate installation. If you're running PowerShell already, just run ``Install.ps1``: |
| 46 |
|
| 47 |
```powershell |
| 48 |
PS> Unblock-File Install.ps1 # Mark the installer as safe to run. |
| 49 |
PS> ./Install.ps1 |
| 50 |
``` |
| 51 |
|
| 52 |
PowerShell itself is easy to install on many macOS and Linux systems using the [provided packages](https://github.com/PowerShell/PowerShell#get-powershell). |
| 53 |
|
| 54 |
### Manual Installation ### |
| 55 |
|
| 56 |
I think the following works on Unix-like systems. If not, let me know or pull request with better instructions. |
| 57 |
|
| 58 |
```bash |
| 59 |
$ latex revquantum.ins # Makes the actual .sty from the .dtx file. |
| 60 |
$ pdflatex revquantum.dtx # Makes documentation, such as it is. |
| 61 |
$ mkdir texdir/tex/latex/revquantum # Replace texdir with where you actually installed TeX (e.g. ~/texmf). |
| 62 |
$ cp revquantum.sty texdir/tex/latex/revquantum # As with above, replace texdir. |
| 63 |
$ texhash |
| 64 |
``` |
| 65 |
|
| 66 |
Directions for Windows/MikTeX can be found thanks to [this useful StackOverflow answer](http://tex.stackexchange.com/questions/2063/how-can-i-manually-install-a-package-on-miktex-windows). |
| 67 |
|
| 68 |
## Using ## |
| 69 |
|
| 70 |
I'll write more complete documentation later (hopefully), but for now: |
| 71 |
|
| 72 |
- ``{braket}`` is automatically imported, defining ``\ket``, ``\bra`` and ``\braket``. |
| 73 |
- The notation commands ``\ii`` and ``\dd`` typeset roman "i" and "d" characters, respectively. More generally, ``\newrm{foo}`` creates a new command ``\foo`` that typesets ``foo`` in math-roman. ``{revquantum}`` comes with ``\e``, ``\TVD`` and ``\T`` predefined using ``\newrm``. |
| 74 |
- Similarly, ``\newoperator`` defines new commands which typeset using ``\operatorname``. By default, this is used to define ``\Tr``, ``\Cov``, ``\supp``, ``\diag`` and ``\rank``. |
| 75 |
- The commands ``\defeq``, ``\expect`` and ``\id`` define the common notation ``:=``, double-struck E and double-struck 1 (respectively). |
| 76 |
- ``\newaffil{NAME}{DESCRIPTION}`` defines a new affiliation command ``\affilNAME``. |
| 77 |
- The ``\todo`` command typesets its argument in purple and raises a warning when built. If ``{revquantum}`` is loaded with the ``[final]`` option, this warning is escalated to an error. Similarly, ``\TODO`` takes no argument but inserts the placeholder "TODO" and ``\todolist`` typesets an ``{itemize}`` environment in ``\todo``. |
| 78 |
|
| 79 |
## Known Issues ## |
| 80 |
|
| 81 |
- The BibTeX thing is an unforgivable hack. Thankfully, I'm not asking for anyone's forgiveness. |
| 82 |
- ``\autoref`` chokes on appendices, giving nonsense like "Section A". This should be fixable, though. |
| 83 |
- The use of the "UW" prefix for the University of Waterloo was probably a bad idea, and will likely change so as to not preclude other universities whose names start with "W". |