texlive[41860] Master: phfqit (16aug16)

commits+karl at tug.org commits+karl at tug.org
Mon Aug 15 22:39:09 CEST 2016


Revision: 41860
          http://tug.org/svn/texlive?view=revision&revision=41860
Author:   karl
Date:     2016-08-15 22:39:09 +0200 (Mon, 15 Aug 2016)
Log Message:
-----------
phfqit (16aug16)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/phfqit/
    trunk/Master/texmf-dist/doc/latex/phfqit/Makefile
    trunk/Master/texmf-dist/doc/latex/phfqit/README.md
    trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
    trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk
    trunk/Master/texmf-dist/source/latex/phfqit/
    trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx
    trunk/Master/texmf-dist/source/latex/phfqit/phfqit.ins
    trunk/Master/texmf-dist/tex/latex/phfqit/
    trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty
    trunk/Master/tlpkg/tlpsrc/phfqit.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/phfqit/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/Makefile	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,10 @@
+
+PKG = phfqit
+
+-include pkg.mk
+
+pkg.mk:
+	ln -sf ../mkcommon/pkg.mk pkg.mk
+
+install:  install_sty install_doc
+


Property changes on: trunk/Master/texmf-dist/doc/latex/phfqit/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/phfqit/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/README.md	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,19 @@
+# The phfqit package
+
+Utilities to typeset stuff in Quantum Information Theory (quite biased towards
+theory).
+
+Provides macros to typeset some general mathematical operators (identity
+operator, trace, diagonal, rank, ...), a powerful implementation of the bra-ket
+notation (kets, bras, brakets, matrix elements etc. which can be sized as
+required), delimited expressions such as averages and norms, and some basic Lie
+algebra/group names. Provides also macros for entropy measures for quantum
+information theory (smooth min- and max-entropy, smooth relative entropies,
+etc.).
+
+
+# Documentation
+
+Run 'make sty' to generate the style file and 'make pdf' to generate the package
+documentation. Run 'make' or 'make help' for more info.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/phfqit/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf	2016-08-15 20:38:41 UTC (rev 41859)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf	2016-08-15 20:39:09 UTC (rev 41860)

Property changes on: trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,167 @@
+
+#
+# Common useful definitions
+#
+LATEX = latex
+
+PDFLATEX = TEXINPUTS="$$TEXINPUTS:../phfnote" pdflatex
+PDFLATEXOPTS = -interaction=batchmode
+PDFLATEXOPTSLAST = -interaction=batchmode --synctex=1
+
+MAKEINDEX = makeindex
+
+
+#
+# Set default PREFIX. This can be overridden with 'make install PREFIX=/installation/directory'
+#
+DEFAULT_PREFIX := $(shell kpsewhich -var-value TEXMFHOME)
+PREFIX ?= $(DEFAULT_PREFIX)
+
+
+#
+# package should be set in variable PKG
+#
+PKGREADME = README.md
+
+#
+# packages may specify additional files in the distribution with this variable
+# (by default empty)
+#
+DIST_ADDITIONAL_FILES ?= 
+
+
+PKGDTX = $(PKG).dtx
+PKGINS = $(PKG).ins
+PKGSTY = $(PKG).sty
+PKGPDF = $(PKG).pdf
+PKGTDSZIP = $(PKG).tds.zip
+PKGZIP = $(PKG).zip
+
+
+
+.PHONY: help sty pdf install install_sty install_doc tdszip dist clean cleanall cleansty cleanaux cleanpdf cleantdszip cleandist
+
+
+help:
+	@echo "Targets for $(PKG):"
+	@echo "make sty             -- generate LaTeX package file $(PKG).sty"
+	@echo "make pdf             -- generate pdf documentation"
+	@echo "make install         -- install style and documentation files to TEXMF tree"
+	@echo "make install PREFIX=[specify texmf directory]"
+	@echo "make $(PKG).tds.zip  -- create TDS.ZIP to include in CTAN upload"
+	@echo "make dist            -- create distribution ZIP, ready for upload to CTAN"
+	@echo "make clean           -- remove LaTeX auxiliary files"
+	@echo "make cleansty        -- remove generated style file"
+	@echo "make cleanpdf        -- remove generated pdf documentation"
+	@echo "make cleanall        -- remove all generated files, incl. distribution zip"
+
+
+clean: cleanaux
+
+cleanall: cleansty cleanaux cleanpdf cleantdszip cleandist
+
+# ------------------------------------------------
+# make sty
+# ------------------------------------------------
+
+sty: $(PKGSTY)
+
+$(PKGSTY): $(PKGINS) $(PKGDTX)
+	$(LATEX) $<
+
+cleansty:
+	@rm -f $(PKGSTY)
+
+# ------------------------------------------------
+# make pdf
+# ------------------------------------------------
+
+pdf: $(PKG).pdf
+
+#
+# fake index & glossary so they get a TOC entry from the beginning, and so the page
+# numbers in the index are correct.
+#
+$(PKG).aux $(PKG).idx $(PKG).glo: $(PKGDTX) $(PKGSTY)
+	DTX=$< ; echo '\\begin{theindex}\\item index here \\end{theindex}' >$${DTX%.dtx}.ind
+	DTX=$< ; echo '\\begin{theglossary}\\item changes here\\end{theglossary}' >$${DTX%.dtx}.gls
+	$(PDFLATEX) $(PDFLATEXOPTS) $<
+	$(PDFLATEX) $(PDFLATEXOPTS) $<
+	$(PDFLATEX) $(PDFLATEXOPTS) $<
+
+$(PKG).ind: $(PKG).idx
+	$(MAKEINDEX) -s gind.ist -o $@ $<
+
+$(PKG).gls: $(PKG).glo
+	$(MAKEINDEX) -s gglo.ist -o $@ $<
+
+# final steps of making the PKG.pdf doc file.  At the end, touch the ind and gls files so
+# that they don't look out-of-date (because the idx and glo files were overwritten again)
+$(PKGPDF): $(PKGDTX) $(PKG).aux $(PKG).ind $(PKG).gls
+	$(PDFLATEX) $(PDFLATEXOPTS) $<
+	$(PDFLATEX) $(PDFLATEXOPTS) $<
+	$(PDFLATEX) $(PDFLATEXOPTSLAST) $<
+	touch $(PKG).ind $(PKG).gls $(PKG).pdf
+
+
+cleanaux:
+	@rm -f *.aux *.log *.toc *.glo *.gls *.ind *.idx *.ilg *.out *.bbl *.blg *.synctex.gz *.hd
+
+cleanpdf:
+	@rm -f $(PKGPDF)
+
+# ------------------------------------------------
+# 'make install' partial installation targets
+# ------------------------------------------------
+
+#
+# The install target itself is defined per-package, in case packages want to install more
+# files (such as bibtex styles)
+#
+
+install_sty: $(PKGSTY)
+	mkdir -p $(DESTDIR)$(PREFIX)/tex/latex/$(PKG)
+	cp $(PKGSTY)  $(DESTDIR)$(PREFIX)/tex/latex/$(PKG)
+
+install_doc: $(PKGPDF)
+	mkdir -p $(DESTDIR)$(PREFIX)/doc/latex/$(PKG)
+	cp $(PKGPDF) $(PKGREADME)  $(DESTDIR)$(PREFIX)/doc/latex/$(PKG)
+
+
+
+# ------------------------------------------------
+# make tdszip
+# ------------------------------------------------
+
+TDSTMPDIR = $(CURDIR)/_install_tds_zip.make.tmp
+
+tdszip: $(PKGTDSZIP)
+
+$(PKGTDSZIP): $(PKGSTY) $(PKGPDF)
+	mkdir $(TDSTMPDIR)
+	$(MAKE) install PREFIX=$(TDSTMPDIR)
+	cd $(TDSTMPDIR) && zip -r $(CURDIR)/$(PKGTDSZIP) *
+	rm -rf $(TDSTMPDIR)
+
+cleantdszip:
+	@rm -f $(PKGTDSZIP)
+
+
+# ------------------------------------------------
+# make dist
+# ------------------------------------------------
+
+DISTTMPDIR = $(CURDIR)/_install_dist_zip.make.tmp
+
+dist: $(PKGZIP)
+
+$(PKGZIP): $(PKGTDSZIP)
+	rm -rf $(DISTTMPDIR)
+	mkdir -p $(DISTTMPDIR)/$(PKG)
+	cp $(PKGTDSZIP) $(DISTTMPDIR)
+	cp $(PKGDTX) $(PKGINS) $(PKGPDF) $(PKGREADME) Makefile pkg.mk $(DIST_ADDITIONAL_FILES) $(DISTTMPDIR)/$(PKG)
+	cd $(DISTTMPDIR) && zip -r $(CURDIR)/$(PKGZIP) $(PKGTDSZIP) $(PKG)
+	rm -rf $(DISTTMPDIR)
+
+cleandist:
+	@rm -f $(PKGZIP)


Property changes on: trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,1361 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2016 by Philippe Faist <philippe.faist at bluewin.ch>
+% -------------------------------------------------------
+% 
+% This file 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:
+%
+%    http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX 
+% version 2005/12/01 or later.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{phfqit.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+%<package>\ProvidesPackage{phfqit}
+%<*package>
+    [2016/08/15 v1.0 phfqit package]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{xcolor}
+\makeatletter
+\providecommand\phfnote at pkgdoc@setupmainfont{
+  \renewcommand{\rmdefault}{futs}% only rm font, not math
+}\makeatother
+\usepackage[preset=xpkgdoc]{phfnote}
+\usepackage{phfqit}
+\usepackage{needspace}
+\EnableCrossrefs         
+\CodelineIndex
+\RecordChanges
+\begin{document}
+  \DocInput{phfqit.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{0}
+%
+% \CharacterTable
+%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%   Digits        \0\1\2\3\4\5\6\7\8\9
+%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%   Dollar        \$     Percent       \%     Ampersand     \&
+%   Acute accent  \'     Left paren    \(     Right paren   \)
+%   Asterisk      \*     Plus          \+     Comma         \,
+%   Minus         \-     Point         \.     Solidus       \/
+%   Colon         \:     Semicolon     \;     Less than     \<
+%   Equals        \=     Greater than  \>     Question mark \?
+%   Commercial at \@     Left bracket  \[     Backslash     \\
+%   Right bracket \]     Circumflex    \^     Underscore    \_
+%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%   Right brace   \}     Tilde         \~}
+%
+%
+% \changes{v1.0}{2016/04/20}{Initial version}
+%
+% \GetFileInfo{phfqit.dtx}
+%
+% \DoNotIndex{\newcommand,\newenvironment,\def,\gdef,\edef,\xdef,\if,\else,\fi,\ifx}
+% 
+% \title{\phfqitltxPkgTitle{phfqit}}
+% \author{Philippe Faist\quad\email{philippe.faist at bluewin.ch}}
+% \date{\pkgfmtdate\filedate}
+% \maketitle
+%
+% \begin{abstract}
+%   \pkgname{phfqit}---Utilities to typeset stuff in Quantum Information Theory
+%   (quite biased towards theory), in particular general mathematical symbols,
+%   operators, and shorthands for entropy measures.
+% \end{abstract}
+%
+% \inlinetoc
+%
+% \section{Introduction}
+%
+% This package provides some useful definitions, mainly for notation of
+% mathematical expressions which are used in quantum information theory (at
+% least by me).
+%
+% Are included utilities for:
+% \begin{itemize}
+% \item General symbols and mathematical expressions (identity operator,
+%   trace, rank, diagonal, \ldots)  (\autoref{sec:symbols})
+% \item Formatting of bits and bit strings (\autoref{sec:bits})
+% \item Formatting of names of logical gates (\autoref{sec:gates})
+% \item Typesetting the names of Lie groups and algebras, for example $\su(N)$
+%   (\autoref{sec:Lie-groups-algebras})
+% \item Bra-ket notation, and delimited expressions such as average, norm,
+%   \ldots (\autoref{sec:delimited})
+% \item Typesetting entropy measures, including the Shannon/von Neumann entropy,
+%   the smooth entropies, relative entropies, as well as my coherent relative
+%   entropy
+% \end{itemize}
+%
+%
+% \section{Basic Usage}
+%
+% This package is straightforward to use.  There are no package options.
+% \begin{verbatim}
+% \usepackage{phfqit}
+% \end{verbatim}
+%
+% [TODO: In the future, use package options to control which definitions we
+% want?]
+%
+% \subsection{Semantic vs. Syntactic Notation}
+%
+% The macros in this package are meant to represent a \emph{mathematical
+% quantity}, independently of its final \emph{notation}.  For example, |\Hmaxf|
+% indicates corresponds to the ``new-style'' max-entropy defined with the
+% fidelity,\footnote{see Marco Tomamichel, Ph. D., ETH Zurich (2012)
+% \href{https://arxiv.org/abs/1203.2142}{arXiv:1203.2142}} independently of the
+% notation.  Then, if the default notation ``$\Hmaxf{}$'' doesn't suit your
+% taste, you may then simply redefine this command to display whatever you like
+% (see for example instructions in \autoref{sec:entropy-measures}).  This allows
+% to keep better distinction between different measures which may share the same
+% notation in different works of literature.  It also allows to switch notation
+% easily, even in documents which use several quantities whose notation may be
+% potentially conflicting.
+%
+%
+% \subsection{Size Specification}
+% \label{topic:size-specification-backtick}
+%
+% Many of the macros in this package allow their delimiters to be sized
+% according to your taste.  For example, if there is a large symbol in an
+% entropy measure, say
+% \begin{align}
+%  \Hmin{\displaystyle\bigotimes_i A_i}[B]\ ,
+% \end{align}
+% then it may be necessary to tune the size of the parenthesis delimiters.
+%
+% This is done with the optional size specification \meta{size-spec}.  The
+% \meta{size-spec}, whenever it is accepted, is always optional.
+%
+% The \meta{size-spec} starts with the backtick character ``|`|'', and is
+% followed by a single token which may be a star |*| or a size modifier macro
+% such as |\big|, |\Big|, |\bigg| and |\Bigg|.  If the star is specified, then
+% the delimiters are sized with |\left| and |\right|; otherwise the
+% corresponding size modifier is used.  When no size specification is present,
+% then the normal character size is used.
+%
+% For example:
+% \begin{center}
+%   \begin{tabular}{ll}
+%       |\Hmin{\bigotimes_i A_i}[B]|  & gives\quad  $\Hmin{\displaystyle\bigotimes_i A_i}[B]$, \\[1.5em]
+%       |\Hmin`\Big{\bigotimes_i A_i}[B]|  & gives\quad  $\Hmin`\Big{\displaystyle\bigotimes_i A_i}[B]$,~~and \\[1.5em]
+%       |\Hmin`*{\bigotimes_i A_i}[B]|  & gives\quad  $\Hmin`*{\displaystyle\bigotimes_i A_i}[B]$. \\
+%   \end{tabular}
+% \end{center}
+%
+%
+% \section{General Symbols (and Math Operators)}
+% \label{sec:symbols}
+%
+% \DescribeMacro{\Hs}
+% Hilbert space = $\Hs$.
+%
+% \DescribeMacro{\Ident}
+% Identity operator = $\Ident$.
+%
+% \DescribeMacro{\IdentProc}
+% Identity process.  Possible usage syntax is:
+% \begin{center}
+% \begin{tabular}{lc}
+%     |\IdentProc[A][A']{\rho}| &  $\IdentProc[A][A']{\rho}$ \\
+%     |\IdentProc[A]{\rho}| &  $\IdentProc[A]{\rho}$ \\
+%     |\IdentProc[A][A']{}| &  $\IdentProc[A][A']{}$ \\
+%     |\IdentProc[A]{}| &  $\IdentProc[A]{}$ \\
+%     |\IdentProc{}| &  $\IdentProc{}$ \\
+%     |\IdentProc{\rho}| &  $\IdentProc{\rho}$ \\
+%     |\IdentProc`\big[A]{\rho}| &  $\IdentProc`\big[A]{\rho}$ \\
+% \end{tabular}
+% \end{center}
+% This macro accepts a size specification with the backtick (`|`|'), see
+% \autoref{topic:size-specification-backtick}.
+%
+% \begingroup\catcode`\^=12\relax
+% \DescribeMacro{\ee^X}\endgroup
+% A macro for the exponential.  Type the \LaTeX{} code as if |\ee| were just the symbol,
+% i.e.\@ as |\ee^{<ARGUMENT>}|.  The ideas is that this macro may be redefined to change
+% the appearance of the $e$ symbol, or even to change the notation to |\exp{<ARGUMENT>}|
+% if needed for inline math.
+%
+%
+% \subsection{Math/Linear Algebra Operators}
+% \label{sec:math-operators}
+%
+% \needspace{6\baselineskip}
+% \DescribeMacro{\tr} \DescribeMacro{\supp} \DescribeMacro{\rank}
+% \DescribeMacro{\linspan} \DescribeMacro{\spec} \DescribeMacro{\diag} Provide
+% some common math operators.  The trace $\tr$, the support $\supp$, the rank
+% $\rank$, the linear span $\linspan$, the spectrum $\spec$ and the diagonal
+% matrix $\diag$.  (Note that |\span| is already defined by \LaTeX{}, so that we
+% resort to |\linspan|.)  \vspace{1.5cm}
+%
+% \DescribeMacro{\Re} \DescribeMacro{\Im} Also, redefine |\Re| and |\Im| (real
+% and imaginary parts of a complex number), to the more readable $\Re(z)$ and
+% $\Im(z)$.  (The original symbols were {\makeatletter $\phfqit at Re(z)$ and
+% $\phfqit at Im(z)$}.)
+%
+% \subsection{Poly symbol}
+%
+% \DescribeMacro{\poly} Can be typeset in $\poly(n)$ time.
+% \iffalse meta-comment \changedreftext{v1.0-added-poly-command} \fi
+% 
+%
+% \subsection{Bits and Bit Strings}
+% \label{sec:bits}
+%
+% \DescribeMacro{\bit} Format a bit value, for example |\bit{0}| or |\bit0|
+% gives $\bit0$ or $\bit1$.  This command works both in math mode and text mode.
+%
+% \DescribeMacro{\bitstring} Format a bit string.  For example
+% |\bitstring{01100101}| is rendered as \bitstring{01100101}.  This command
+% works both in math mode and text mode.
+%
+% \subsection{Logical Gates}
+% \label{sec:gates}
+%
+% \DescribeMacro{\gate} Format a logical gate.  Essentially, this command
+% typesets its argument in small-caps font.  For example, with |\gate{C-not}|
+% you get \gate{C-not}.  (The default formatting ignores the given
+% capitalization, but if you redefine this command you could exploit this,
+% e.g.\@ by making the ``C'' in ``Cnot'' larger than the ``not''.)
+%
+% This command works both in math mode and in text mode.
+%
+% \needspace{5\baselineskip}
+% \DescribeMacro{\AND} \DescribeMacro{\XOR} \DescribeMacro{\CNOT}
+% \DescribeMacro{\NOT} \DescribeMacro{\NOOP} Some standard gates.  These typeset
+% respectively as \AND, \XOR, \CNOT, \NOT, and \NOOP. \vspace{3\baselineskip}
+%
+%
+% \section{Lie Groups and Algebras}
+% \label{sec:Lie-groups-algebras}
+%
+% \needspace{7\baselineskip}
+% \DescribeMacro{\uu(N)} \DescribeMacro{\UU(N)} \DescribeMacro{\su(N)}
+% \DescribeMacro{\SU(N)} \DescribeMacro{\so(N)} \DescribeMacro{\SO(N)}
+% \DescribeMacro{\SN(N)} Format some common Lie groups and algebras.
+%
+% |\SN(N)| is the symmetric group of $N$ items, and formats by default as
+% $\SN(N)$. \vspace{4\baselineskip}
+%   
+% \section{Bra-Ket Notation and Delimited Expressions}
+% \label{sec:bra-ket} \label{sec:delimited}
+%
+% All commands here work in math mode only.  They all accept an optional
+% argument, which is a size modifier.  Use the starred form to enclose the
+% delimiters with |\left...\right| and have the size determined automatically.
+% Usage for example is:
+% \begin{center}
+%   \begin{tabular}{lc}
+%       |\ket{\psi}|  &  $\ket{\psi}$ \\[1em]
+%       |\ket[\big]{\psi}|  &  $\ket[\big]{\psi}$ \\[1em]
+%       |\ket[\Big]{\psi}|  &  $\ket[\Big]{\psi}$ \\[1em]
+%       |\ket[\bigg]{\psi}|  &  $\ket[\bigg]{\psi}$ \\[1em]
+%       |\ket[\Bigg]{\psi}|  &  $\ket[\Bigg]{\psi}$ \\[1em]
+%       |\ket*{\displaystyle\sum_k \psi_k}|  &  $\ket*{\displaystyle\sum_k \psi_k}$ \\
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\ket}
+% Typeset a quantum mechanical ket.  |\ket{\psi}| gives $\ket{\psi}$.
+%
+% \DescribeMacro{\bra}
+% Typeset a bra.  |\bra{\psi}| gives $\bra{\psi}$.
+%
+% \DescribeMacro{\braket}
+% Typeset a bra-ket inner product.  |\braket{\phi}{\psi}| gives $\braket{\phi}{\psi}$.
+%
+% \DescribeMacro{\ketbra}
+% Typeset a ket-bra outer product.  |\ketbra{\phi}{\psi}| gives $\ketbra{\phi}{\psi}$.
+%
+% \DescribeMacro{\proj}
+% Typeset a rank-1 projector determined by a ket.  |\proj{\psi}| gives $\proj{\psi}$.
+%
+% \DescribeMacro{\matrixel} Typeset a matrix element.
+% |\matrixel{\phi}{A}{\psi}| gives $\matrixel{\phi}{A}{\psi}$.
+%
+% \DescribeMacro{\dmatrixel} Typeset a diagonal matrix element of an operator.
+% |\dmatrixel{\phi}{A}| gives $\dmatrixel{\phi}{A}$.
+%
+% \DescribeMacro{\innerprod} Typeset an inner product using the mathematicians' notation.
+% |\innerprod{\phi}{\psi}| gives $\innerprod{\phi}{\psi}$.
+%
+%
+% There are also some further delimited expressions defined, for convenience.
+%
+% \DescribeMacro{\abs} The absolute value of an expression.  |\abs{A}| gives
+% $\abs{A}$.
+%
+% \DescribeMacro{\avg} The average of an expression. |\avg[\big]{\sum_k A_k}|
+% gives $\avg[\big]{\sum_k A_k}$.
+%
+% \DescribeMacro{\norm} The norm of an expression.  |\norm{A_k}| gives
+% $\norm{A_k}$.  (You can add subscripts, e.g.\@ |\norm{A_k}_\infty| is
+% $\norm{A_k}_\infty$.)
+%
+% \DescribeMacro{\intervalc} A closed interval. |\intervalc{x}{y}| gives
+% $\intervalc{x}{y}$.
+%
+% \DescribeMacro{\intervalo} An open interval. |\intervalo{x}{y}| gives
+% $\intervalo{x}{y}$.
+%
+% \DescribeMacro{\intervalco} A semi-open interval, closed on the lower bound
+% and open on the upper bound. |\intervalco{x}{y}| gives $\intervalco{x}{y}$.
+%
+% \DescribeMacro{\intervaloc} A semi-open interval, open on the lower bound
+% and closed on the upper bound. |\intervaloc{x}{y}| gives $\intervaloc{x}{y}$.
+%
+%
+%
+% \section{Entropy Measures}
+%
+% \subsection{Entropy, Conditional Entropy}
+% \label{sec:entropy-measures}
+%
+% The entropy measures (except for |\Hfunc|) all share the same syntax.  This
+% syntax is only described for the min-entropy |\Hmin|, but the other entropy
+% measures enjoy the same features.
+%
+% The name of the macros are chosen such that they identify the \emph{abstract
+% entropy measure}, and not necessarily the way one uses to write it down in a
+% specific context.  For example, for the ``old'' max-entropy
+% $H_\mathrm{max,old}(X)_\rho = \log\rank\rho$, you should use |\Hzero|
+% independently of whether it should be denoted by $H_0$, $H_\mathrm{max}$ or
+% $H_\mathrm{max,old}$.  This allows you to change the notation by redefining
+% the command |\Hzero|, while making sure that the correct quantity is
+% addressed.  (You might have both ``old''-style and ``new''-style max-entropy
+% in the same paper.)  The macros |\Hmin|, |\Hzero|, |\Hmaxf| and |\HH| may be
+% redefined to change the subscript by using the following code (change
+% ``|\mathrm{max},0|'' to your favorite subscript text):
+% \begin{verbatim}
+% \makeatletter
+% \renewcommand\Hzero{\@HHbase{\HHSym}{\mathrm{max},0}}
+% \makeatother
+% \end{verbatim}
+%
+% These commands are robust, meaning they can be used for example in figure
+% captions and section headings.
+%
+% \DescribeMacro{\Hmin} Min-entropy.  The general syntax is
+% |\Hmin|\hspace{0pt}\oarg{state}\hspace{0pt}\oarg{epsilon}\hspace{0pt}\relax
+% \marg{target system}\hspace{0pt}\oarg{conditioning system}.  For example:
+% \begin{center}
+%   \begin{tabular}{lc}
+%       |\Hmin{X}|   & $\Hmin{X}$ \\
+%       |\Hmin[\rho]{X}|   & $\Hmin[\rho]{X}$ \\
+%       |\Hmin[\rho][\epsilon]{X}[Y]|   & $\Hmin[\rho][\epsilon]{X}[Y]$ \\
+%       \verb+\Hmin[\rho|\rho][\epsilon]{X}[Y]+   & $\Hmin[\rho\mid\rho][\epsilon]{X}[Y]$ \\
+%       |\Hmin[][\epsilon]{X}[Y]|   & $\Hmin[][\epsilon]{X}[Y]$ \\
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\HH} Shannon/von Neumann entropy.  This macro has the same
+% arguments as for |\Hmin| (even though, of course, there is no real use in
+% smoothing the Shannon/von Neumann entropy\ldots).  For example,
+% |\HH[\rho]{X}[Y]| gives $\HH[\rho]{X}[Y]$.
+%
+% \DescribeMacro{\Hzero} R\'enyi-zero max-entropy.  This macro has the same
+% arguments as for |\Hmin|.  For example, |\Hzero[][\epsilon]{X}[Y]| gives
+% $\Hzero[][\epsilon]{X}[Y]$.
+%
+% \DescribeMacro{\Hmaxf} The max-entropy.  This macro has the same
+% arguments as for |\Hmin|.  For example, |\Hmaxf[][\epsilon]{X}[Y]| gives
+% $\Hmaxf[][\epsilon]{X}[Y]$.
+%
+% \DescribeMacro{\Hfunc} The entropy, written as a mathematical function.  It is
+% useful to write, e.g., $\Hfunc(p_1\rho_1 + p_2\rho_2)$ (code:
+% |\Hfunc(p_1\rho_1 + p_2\rho_2)|).  Sizing specifications also work, e.g.\@
+% |\Hfunc`\big(x)| or |\Hfunc`*(x)|.  However there is neither support for an
+% epsilon-like superscript nor for a conditioning system.
+%
+% \DescribeMacro{\HHSym} You may redefine this macro if you want to change the
+% ``$H$'' symbol of all entropy measures.
+% \begingroup \def\HHSym{\spadesuit} For example, with
+% |\renewcommand\HHSym{\spadesuit}|, |\Hmin{A}[B]| would give $\Hmin{A}[B]$.
+% \endgroup
+%
+% \subsection{Relative Entropy Measures}
+% \label{sec:relative-entropies}
+%
+% Relative entropies also have a corresponding set of commands.
+%
+% \DescribeMacro{\DD}
+% Generic relative entropy.  The syntax of this command is either of the following:\\
+% |\DD|\hspace{0pt}\meta{size-spec}\hspace{0pt}\marg{state}\hspace{0pt}\marg{relative-to state},\\
+% |\DD_|\marg{subscript}\hspace{0pt}\meta{size-spec}\hspace{0pt}\marg{state}\hspace{0pt}\marg{relative-to state},\\
+% |\DD_|\marg{subscript}|^|\marg{superscript}\hspace{0pt}\meta{size-spec}\relax
+% \hspace{0pt}\marg{state}\hspace{0pt}\marg{relative-to state},\\
+% |\DD^|\marg{superscript}\hspace{0pt}\meta{size-spec}\hspace{0pt}\marg{state}\hspace{0pt}\marg{relative-to state}.
+%
+% In all cases, the argument is typeset as:
+% $\bigl(\meta{state}\big\Vert\meta{relative-to state}\bigr)$.  The size of the
+% delimiters can be set with a size specification using the standard backtick
+% syntax, as for the other entropies and as described in
+% \autoref{topic:size-specification-backtick}.
+% 
+% Examples:
+% \begin{center}
+%   \begin{tabular}{lc}
+%       |\DD{\rho}{\sigma}|  & $\DD{\rho}{\sigma}$ \\
+%       |\DD*{\rho}{\sigma}|  & $\DD*{\rho}{\sigma}$ \\
+%       |\DD`\big{\rho}{\sigma}|  & $\DD`\big{\rho}{\sigma}$ \\
+%   \end{tabular}
+% \end{center}
+%
+% You can also play around with subscripts and superscripts, but it is
+% recommended to use the macros |\Dminf|, |\Dminz| and |\Dmax| directly.
+% Specifying the subscripts and superscripts to |\DD| should only be done within
+% new custom macros to define new relative entropy measures.
+% \begin{center}
+%   \begin{tabular}{lc}
+%       |\DD_{\mathrm{Rob}}^{\epsilon}{\rho}{\sigma}|  & $\DD_{\mathrm{Rob}}^{\epsilon}{\rho}{\sigma}$ \\
+%       |\DD^{sup}{\rho}{\sigma}|  & $\DD^{sup}{\rho}{\sigma}$ \\
+%   \end{tabular}
+% \end{center}
+%
+% \DescribeMacro{\Dmax} The max-relative entropy.  The syntax is
+% |\Dmax|\hspace{0pt}\oarg{epsilon}\hspace{0pt}\meta{size-spec}\relax
+% \hspace{0pt}\marg{state}\hspace{0pt}\marg{relative-to state}
+%
+% For example |\Dmax[\epsilon]{\rho}{\sigma}| gives
+% $\Dmax[\epsilon]{\rho}{\sigma}$ and |\Dmax[\epsilon]`\big{\rho}{\sigma}| gives
+% $\Dmax[\epsilon]`\big{\rho}{\sigma}$.
+% 
+% The size-spec is as always given using the backtick syntax described in
+% \autoref{topic:size-specification-backtick}.
+%
+% \DescribeMacro{\Dminz} The ``old'' min-relative entropy, based on the
+% R\'enyi-zero relative entropy.  The syntax is the same as for
+% |\Dmax|.
+% 
+% \DescribeMacro{\Dminf} The ``new'' min-relative entropy, defined using the
+% fidelity.  The syntax is the same as for |\Dmax|.
+%
+% \DescribeMacro{\Dr} The Rob-relative entropy.  The syntax is the same as for
+% |\Dmax|.
+%
+% \DescribeMacro{\DHyp} The hypothesis testing relative entropy.  The syntax is
+% the same as for |\Dmax|, except that by default the optional argument is
+% |\eta|.  That is, |\DHyp{\rho}{\sigma}| gives $\DHyp{\rho}{\sigma}$.  (This is
+% because this quantity is directly defined with a $\eta$ (or $\epsilon$) built
+% in, and it is not a zero-error quantity which is smoothed with the purified
+% distance.)
+%
+% \DescribeMacro{\DDSym} The symbol to use to denote a relative entropy.  You
+% may redefine this command to change the symbol.  (This works like |\HHSym|
+% above.)
+%
+%
+% \subsection{Coherent Relative Entropy}
+% \label{sec:coh-rel-entr}
+%
+% A macro for a new quantity, the coherent relative entropy, is also available.
+%
+% \DescribeMacro{\DCoh}
+% Typeset a coherent relative entropy.  The syntax is
+% |\DCoh|\hspace{0pt}\oarg{epsilon}\hspace{0pt}\meta{size-spec}\hspace{0pt}\marg{rho}\hspace{0pt}\relax
+% \marg{A}\hspace{0pt}\marg{B}\hspace{0pt}\marg{Gamma-1}\hspace{0pt}\marg{Gamma-2}.
+%
+% For example, |\DCoh[\epsilon]{\rho}{A}{B}{\Gamma_A}{\Gamma_B}| gives
+% $\DCoh[\epsilon]{\rho}{A}{B}{\Gamma_A}{\Gamma_B}$.
+%
+% The subscript |BA| is automatically added to the \meta{rho} argument.  If this
+% is not desired, then begin the \meta{rho} argument with a star.  For example,
+% |\DCoh{*\sigma_A\otimes\rho_B}{A}{B}{\Gamma_A}{\Gamma_B}| gives
+% $\DCoh{*\sigma_A\otimes\rho_B}{A}{B}{\Gamma_A}{\Gamma_B}$.
+% 
+% The \meta{size-spec} is of course optional and follows the same syntax as
+% everywhere else (\autoref{topic:size-specification-backtick}).
+%
+% \DescribeMacro{\emptysystem} Use the |\emptysystem| macro to denote a trivial
+% system.  For example, |\DCoh{\rho}{X}{\emptysystem}{\Gamma}{1}| gives
+% $\DCoh{\rho}{X}{\emptysystem}{\Gamma}{1}$.
+% 
+% \DescribeMacro{\DCSym} The symbol to use to denote a coherent relative
+% entropy.  You may redefine this command to change the symbol.  (This works
+% like |\HHSym| and |\DDSym| above.)
+%
+%
+%
+%
+%
+%
+%
+%
+%
+% \StopEventually{\clearpage\PrintChanges
+%     \vspace{2cm plus 2cm minus 2cm}\PrintIndex}
+%
+% \section{Implementation}
+%
+% First, load dependent packages.  Toolboxes, fonts and so on.
+%    \begin{macrocode}
+\RequirePackage{calc}
+\RequirePackage{etoolbox}
+\RequirePackage{amsmath}
+\RequirePackage{dsfont}
+\RequirePackage{mathrsfs}
+\RequirePackage{mathtools}
+%    \end{macrocode}
+%
+% \subsection{Simple Symbols and Shorthands}
+% 
+% 
+% \subsubsection{General Symbols}
+%
+% These symbols are documented in \autoref{sec:symbols}.
+%
+% \begin{macro}{\Hs}
+%   Hilbert space.
+%    \begin{macrocode}
+\newcommand{\Hs}{\mathscr{H}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Ident}
+%   Identity operator, $\Ident$.
+%    \begin{macrocode}
+\newcommand{\Ident}{\mathds{1}}
+%    \end{macrocode}
+% \end{macro}
+% 
+%
+% \begin{macro}{\IdentProc}
+%   Identity process.
+%    \begin{macrocode}
+\def\IdentProc{%
+  \phfqit at parsesizearg\phfqit at IdentProc@maybeA%
+}
+\newcommand\phfqit at IdentProc@maybeA[1][]{%
+  \def\phfqit at IdentProc@val at A{#1}%
+  \phfqit at IdentProc@maybeB%
+}
+\newcommand\phfqit at IdentProc@maybeB[1][]{%
+  \def\phfqit at IdentProc@val at B{#1}%
+  \phfqit at IdentProc@arg%
+}
+\def\phfqit at IdentProc@arg#1{%
+  \def\phfqit at IdentProc@val at arg{#1}%
+%    \end{macrocode}
+% 
+% At this point, prepare the three arguments, each expanded exactly as they were when
+% given to these macros, and delegate the formatting to |\phfqit at IdentProc@do|.
+%    \begin{macrocode}
+  \edef\@tmp at args{%
+    {\expandonce{\phfqit at IdentProc@val at A}}%
+    {\expandonce{\phfqit at IdentProc@val at B}}%
+    {\expandonce{\phfqit at IdentProc@val at arg}}%
+  }%
+  \expandafter\phfqit at IdentProc@do\@tmp at args%
+}
+\def\phfqit at IdentProc@do#1#2#3{%
+  \operatorname{id}_{#1\notblank{#2}{\to #2}{}}%
+  \notblank{#3}{\expandafter\phfqit at inner@parens\phfqit at val@sizearg{#3}}{}%
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+%
+%
+% \begingroup\catcode`\^=12\relax
+% \begin{macro}{\ee^...}
+%   Macro for the exponential.
+%    \begin{macrocode}
+\def\ee^#1{e^{#1}} % we could imagine that in inlines, we replace this by exp()...
+%    \end{macrocode}
+% \end{macro}
+% \endgroup
+%
+% \subsubsection{Math Operators}
+%
+% See user documentation in \autoref{sec:math-operators}.
+%
+% \needspace{6\baselineskip}
+% \begin{macro}{\tr}
+% \begin{macro}{\supp}
+% \begin{macro}{\rank}
+% \begin{macro}{\linspan}
+% \begin{macro}{\spec}
+% \begin{macro}{\diag}
+%   Some common math operators.  Note that |\span| is already defined by \LaTeX{}, so we
+%   resort to |\linspan| for the linear span of a set of vectors.
+%    \begin{macrocode}
+\DeclareMathOperator{\tr}{tr}
+\DeclareMathOperator{\supp}{supp}
+\DeclareMathOperator{\rank}{rank}
+\DeclareMathOperator{\linspan}{span}
+\DeclareMathOperator{\spec}{spec}
+\DeclareMathOperator{\diag}{diag}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% 
+% \begin{macro}{\Re}
+% \begin{macro}{\Im}
+%   Also, alter the appearance of |\Re| and |\Im| to something more readable.
+%    \begin{macrocode}
+\let\phfqit at Re\Re
+\DeclareMathOperator{\phfqit at Realpart}{Re}%
+\renewcommand{\Re}{\phfqit at Realpart}
+\let\phfqit at Im\Im
+\DeclareMathOperator{\phfqit at Imagpart}{Im}%
+\renewcommand{\Im}{\phfqit at Imagpart}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsubsection{Poly}
+%
+% \begin{macro}{\poly}
+%   Poly symbol.
+%   \iffalse meta-comment
+%         \changed[v1.0-added-poly-command]{v1.0}{2015/05/22}{Added \phfverb\poly\space command}
+%   \fi
+%    \begin{macrocode}
+\DeclareMathOperator{\poly}{poly}
+%    \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Bits and Bit Strings}
+% 
+% See documentation in \autoref{sec:bits}
+%
+% \begin{macro}{\bit}
+% \begin{macro}{\bitstring}
+%   Bits and bit strings.
+%    \begin{macrocode}
+\newcommand\bit[1]{\texttt{#1}}
+\newcommand\bitstring[1]{\phfqit at bitstring{#1}}
+%    \end{macrocode}
+% 
+% The implementation of |\bitstring| needs some auxiliary internal macros.
+%    \begin{macrocode}
+\def\phfqit at bitstring#1{%
+  \begingroup%
+  \setlength{\phfqit at len@bit}{\maxof{\widthof{\bit{0}}}{\widthof{\bit{1}}}}%
+  \phfqitBitstringFormat{\phfqit at bitstring@#1\phfqit at END}%
+  \endgroup%
+}
+%    \end{macrocode}
+% 
+% The internal |\phfqit at bitstring@| macro picks up the next bit, and puts it
+% into a \LaTeX{} |\makebox| on its own with a fixed width.
+%    \begin{macrocode}
+\def\phfqit at bitstring@#1#2\phfqit at END{%
+  \makebox[\phfqit at len@bit][c]{\phfqitBitstringFormatBit{#1}}%
+  \if\relax\detokenize\expandafter{#2}\relax%
+  \else%
+%    \end{macrocode}
+%
+% If there are bits left, then recurse for the rest of the bitstring:
+%    \begin{macrocode}
+    \phfqitBitstringSep\phfqit at bitstring@#2\phfqit at END%
+  \fi%
+}
+\newlength\phfqit at len@bit
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% 
+% \begin{macro}{\phfqitBitstringSep}
+% \begin{macro}{\phfqitBitstringFormat}
+%   Redefine these to customize the bit string appearance.
+%    \begin{macrocode}
+\newcommand\phfqitBitstringSep{\hspace{0.3ex}}
+\newcommand\phfqitBitstringFormat[1]{\ensuremath{\underline{\overline{#1}}}}
+\def\phfqitBitstringFormatBit{\bit}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsubsection{Logical Gates}
+%
+% See user documentation in \autoref{sec:gates}.
+%
+% \begin{macro}{\gate}
+%   Generic macro to format a gate name.
+%    \begin{macrocode}
+\DeclareRobustCommand\gate[1]{\ifmmode\textsc{\lowercase{#1}}%
+  \else{\rmfamily\textsc{\lowercase{#1}}}\fi}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \needspace{5\baselineskip}
+% \begin{macro}{\AND}
+% \begin{macro}{\XOR}
+% \begin{macro}{\CNOT}
+% \begin{macro}{\NOT}
+% \begin{macro}{\NOOP}
+%   Some common gates.
+%    \begin{macrocode}
+\newcommand{\AND}{\gate{And}}
+\newcommand{\XOR}{\gate{Xor}}
+\newcommand{\CNOT}{\gate{C-Not}}
+\newcommand{\NOT}{\gate{Not}}
+\newcommand{\NOOP}{\gate{No-Op}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% 
+%
+% \subsubsection{Lie Groups \& Algebras}
+%
+% \needspace{7\baselineskip}
+% \begin{macro}{\uu(N)}
+% \begin{macro}{\UU(N)}
+% \begin{macro}{\su(N)}
+% \begin{macro}{\SU(N)}
+% \begin{macro}{\so(N)}
+% \begin{macro}{\SO(N)}
+% \begin{macro}{\SN(N)}
+%   Some Lie Groups \& Algebras.  See \autoref{sec:Lie-groups-algebras}
+%    \begin{macrocode}
+\def\uu(#1){\phfqit at fmtLieAlgebra{u}(#1)}
+\def\UU(#1){\phfqit at fmtGroup{U}(#1)}
+\def\su(#1){\phfqit at fmtLieAlgebra{su}(#1)}
+\def\SU(#1){\phfqit at fmtGroup{SU}(#1)}
+\def\so(#1){\phfqit at fmtLieAlgebra{so}(#1)}
+\def\SO(#1){\phfqit at fmtGroup{SO}(#1)}
+\def\SN(#1){\mathrm{S}_{#1}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% 
+% \begin{macro}{\phfqit at fmtLieAlgebra}
+% \begin{macro}{\phfqit at fmtLieGroup}
+%   Override these to change the appearance of the group names or algebra names.  The
+%   argument is the name of the group or algebra (e.g. |su| or |SU|).
+%    \begin{macrocode}
+\def\phfqit at fmtLieAlgebra#1{\mathrm{#1}}
+\def\phfqit at fmtGroup#1{\mathrm{#1}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+%
+% \subsection{Bra-Ket Notation}
+%
+% 
+% \needspace{8\baselineskip}
+% \begin{macro}{\ket}
+% \begin{macro}{\bra}
+% \begin{macro}{\braket}
+% \begin{macro}{\ketbra}
+% \begin{macro}{\proj}
+% \begin{macro}{\matrixel}
+% \begin{macro}{\dmatrixel}
+% \begin{macro}{\innerprod}
+%   Bras, kets, norms, some delimiter stuff.  User documentation in
+%   \autoref{sec:bra-ket}.  
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\ket[1]{\lvert}{\rangle}{{#1}}
+\DeclarePairedDelimiterX\bra[1]{\langle}{\rvert}{{#1}}
+\DeclarePairedDelimiterX\braket[2]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+}
+\DeclarePairedDelimiterX\ketbra[2]{\lvert}{\rvert}{%
+  {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#2}%
+}
+\DeclarePairedDelimiterX\proj[1]{\lvert}{\rvert}{%
+  {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#1}%
+}
+\DeclarePairedDelimiterX\matrixel[3]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+  \hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#3}%
+}
+\DeclarePairedDelimiterX\dmatrixel[2]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+  \hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#1}%
+}
+\DeclarePairedDelimiterX\innerprod[2]{\langle}{\rangle}{%
+  {#1},\hspace*{0.2ex}{#2}%
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Delimited Expressions}
+% Delimited expressions are documented in \autoref{sec:delimited}.
+% 
+% \begin{macro}{\abs}
+% \begin{macro}{\avg}
+% \begin{macro}{\norm}
+%   Other delimited expressions.
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\abs[1]{\lvert}{\rvert}{{#1}}
+\DeclarePairedDelimiterX\avg[1]{\langle}{\rangle}{{#1}}
+\DeclarePairedDelimiterX\norm[1]{\lVert}{\rVert}{{#1}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% 
+% 
+% \begin{macro}{\phfqit at insideinterval}
+%   Format the contents of an interval.  Utility for defining |\intervalc| and
+%   friends.
+%    \begin{macrocode}
+\def\phfqit at insideinterval#1#2{{#1\mathclose{},\mathopen{}#2}}
+%    \end{macrocode}
+% \end{macro}
+%
+% \needspace{4\baselineskip}
+% \begin{macro}{\intervalc}
+% \begin{macro}{\intervalo}
+% \begin{macro}{\intervalco}
+% \begin{macro}{\intervaloc}
+% Open/Closed/Semi-Open Intervals
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\intervalc[2]{[}{]}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervalo[2]{]}{[}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervalco[2]{[}{[}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervaloc[2]{]}{]}{\phfqit at insideinterval{#1}{#2}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Entropy Measures}
+%
+% \subsubsection{Some Internal Utilities}
+%
+% \begin{macro}{\phfqit at parsesizearg}
+%   Internal utility to parse size argument with the backtick specification
+%   (\autoref{topic:size-specification-backtick}).
+%
+%   Parses a size argument, if any, and stores it into |\phfqit at val@sizearg|.
+%   The value stored can directly be expanded as an optional argument to a
+%   |\DeclarePairedDelimiter|-compatible command (see \pkgname{mathtools} package).
+%
+%   |#1| should be a command token.  It is the next action to take, after
+%   argument has been parsed.
+%    \begin{macrocode}
+\def\phfqit at parsesizearg#1{%
+  \begingroup%
+  \mathcode`\`="0060\relax%
+  \gdef\phfqit at val@sizearg{}%
+  \@ifnextchar`{\phfqit at parsesizearg@withsize{#1}}{\endgroup#1}%
+}
+\def\phfqit at parsesizearg@withsize#1`#2{%
+  \def\@tmp at arg{#2}%
+  \def\@tmp at star{*}%
+  \def\@tmp at endgroupandcontinue{\endgroup#1}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\phfqit at val@sizearg{*}%
+    \expandafter\@tmp at endgroupandcontinue%
+  \else%
+    \gdef\phfqit at val@sizearg{[#2]}%
+    \expandafter\@tmp at endgroupandcontinue%
+  \fi%
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+%
+% \begin{macro}{\phfqit at inner@parens}
+%   Simple parenthesis-delimited expression, with
+%   |\DeclarePairedDelimiter|-compatible syntax.  For example,
+%   \par |\phfqit at inner@parens|\marg{content} \quad$\to$\quad
+%   \fbox{\phfverb( \meta{content} \phfverb)}
+%   \par |\phfqit at inner@parens*|\marg{content} \quad$\to$\quad
+%   \fbox{\phfverb\left\phfverb( \meta{content} \phfverb\right\phfverb)}
+%   \par |\phfqit at inner@parens[\big]|\marg{content} \quad$\to$\quad
+%   \fbox{\phfverb\bigl\phfverb( \meta{content} \phfverb\bigr\phfverb)}
+%
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\phfqit at inner@parens[1]{(}{)}{#1}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsubsection{Entropy, Conditional Entropy, and Entropy Function}
+%
+% See user documentation in \autoref{sec:entropy-measures}.
+%
+% \begin{macro}{\HHSym}
+%   The symbol used to designate an entropy measure (not relative).
+%    \begin{macrocode}
+\newcommand\HHSym{H}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begingroup\makeatletter
+% \begin{macro}{\@HHbase}
+%   Base macro for entropy macros.
+%
+%   USAGE:
+%   |\@HHbase|\marg{H-symbol}\hspace{0pt}\marg{subscript}\hspace{0pt}\relax
+%   \marg{superscript}\hspace{0pt}\meta{size-spec}\hspace{0pt}\oarg{state}\hspace{0pt}\relax
+%   \oarg{epsilon}\hspace{0pt}\marg{target system}\hspace{0pt}\oarg{conditioning system}
+%
+%   The argument \meta{size-spec} is optional, and is documented in
+%   \autoref{topic:size-specification-backtick}.  For example \meta{size-spec} =
+%   |`*| or |`\Big|.
+%
+%   This command is robust.
+% 
+%   Examples: 
+%   \par |\@HHbase{\hat{H}}{\mathrm{max}}[\rho][\epsilon]{E}[X']|
+%   \quad$\to$\quad
+%   \fbox{$\@HHbase{\hat{H}}{\mathrm{max}}[\rho][\epsilon]{E}[X']$}
+%   \par |\@HHbase{\hat{H}}{\mathrm{max}}`*[\rho][\epsilon]{\bigotimes_i E}[X']|
+%   \quad$\to$\quad
+%   \fbox{$\@HHbase{\hat{H}}{\mathrm{max}}`*[\rho][\epsilon]{\displaystyle\bigotimes_i E}[X']$}
+%   \par |\@HHbase{\hat{H}}{\mathrm{max}}`\big[\rho][\epsilon]{E}[X']|
+%   \quad$\to$\quad
+%   \fbox{$\@HHbase{\hat{H}}{\mathrm{max}}`\big[\rho][\epsilon]{E}[X']$}
+%   
+%    \begin{macrocode}
+\def\@HHbase#1#2{%
+  #1_{#2}%
+  \@HHbase at parsesize%
+}
+\robustify\@HHbase
+%    \end{macrocode}
+% 
+%
+% TODO: use our generic size parser, don't duplicate code....  this is
+% historical and I don't dare change it without thorough testing:
+%    \begin{macrocode}
+\def\@HHbase at parsesize{%
+  \begingroup\mathcode`\`="0060\relax%
+  \gdef\HH at tmp@sizearg{}%
+  \@ifnextchar`\@HHbase at withsize\@HHbase at endgroupandparseinner%
+}
+\def\@HHbase at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\HH at tmp@sizearg{*}%
+    \expandafter\@HHbase at endgroupandparseinner%
+  \else%
+    \gdef\HH at tmp@sizearg{[#1]}%
+    \expandafter\@HHbase at endgroupandparseinner%
+  \fi%
+}
+\def\@HHbase at endgroupandparseinner{\endgroup\@HHbase at parseinner}
+\newcommand\@HHbase at parseinner[1][]{%  arg: state
+  \def\HH at tmpstore@state{#1}%
+  \@HHbase at parseinner@%
+}
+\newcommand\@HHbase at parseinner@[2][]{% arg: epsilon and target system
+  \def\HH at tmpstore@epsilon{#1}%
+  \def\HH at tmpstore@system{#2}%
+  \@HHbase at parseinner@@%
+}
+\newcommand\@HHbase at parseinner@@[1][]{% arg: conditioning system
+  \def\HH at tmpstore@condsys{#1}%
+  \@HHbase at do@inner%
+}
+\newtoks\HH at tmp@toks
+\def\HH at addtoks#1\@HH at END@ADD at TOKS{\HH at tmp@toks=\expandafter{\the\HH at tmp@toks#1}}%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@HHbase at do@inner}
+%   Format the entropy measure.  All information is stored in macros of the form
+%   |\HH at tmpstore@<FIELD>|.  The base string (entropy symbol and subscript) have
+%   already been typeset.
+%    \begin{macrocode}
+\def\@HHbase at do@inner{%
+%    \end{macrocode}
+% Add the superscript:
+%    \begin{macrocode}
+  ^{\HH at tmpstore@epsilon}%
+%    \end{macrocode}
+% If system is blank, we just want the symbol itself with no
+% argument. (|\notblank| is from the \pkgname{etoolbox} package.)  Otherwise, add the
+% rest:
+%    \begin{macrocode}
+  \expandafter\notblank\expandafter{\HH at tmpstore@system}{%
+%    \end{macrocode}
+% Construct the parenthetic argument to the entropy, which we will store in the
+% token register |\HH at tmp@toks|:
+%    \begin{macrocode}
+    \HH at tmp@toks={}%
+%    \end{macrocode}
+% \ldots{} add system name:
+%    \begin{macrocode}
+    \expandafter\HH at addtoks\HH at tmpstore@system\@HH at END@ADD at TOKS%
+%    \end{macrocode}
+% \ldots{} add conditional system, if specified:
+%    \begin{macrocode}
+    \expandafter\notblank\expandafter{\HH at tmpstore@condsys}{%
+      \HH at addtoks\mathclose{}\,\delimsize\vert\,\mathopen{}\@HH at END@ADD at TOKS%
+      \expandafter\HH at addtoks\HH at tmpstore@condsys\@HH at END@ADD at TOKS%
+    }{}%
+%    \end{macrocode}
+% The tokens are ready now. Prepare the argument to the |\phfqit at inner@parens|
+% command, and go:
+%    \begin{macrocode}
+    \edef\tmp at args{\expandonce{\HH at tmp@sizearg}{\the\HH at tmp@toks}}%
+    \expandafter\phfqit at inner@parens\tmp at args%
+%    \end{macrocode}
+% Finally, add the state as subscript, if any:
+%    \begin{macrocode}
+    _{\HH at tmpstore@state}% 
+    %
+  }{}%
+  %
+}
+%    \end{macrocode}
+% \end{macro}
+% \endgroup
+%
+%
+%
+% Now, we have the proper entropy commands.
+%
+% \needspace{4\baselineskip}
+% \begin{macro}{\HH}
+% \begin{macro}{\Hzero}
+% \begin{macro}{\Hmin}
+% \begin{macro}{\Hmaxf}
+%   The definition of individual entropy macros just delegates to |\@HHbase|
+%   with the relevant subscript.
+%    \begin{macrocode}
+\newcommand\HH{\@HHbase{\HHSym}{}}
+\newcommand\Hzero{\@HHbase{\HHSym}{\mathrm{max},0}}
+\newcommand\Hmin{\@HHbase{\HHSym}{\mathrm{min}}}
+\newcommand\Hmaxf{\@HHbase{\HHSym}{\mathrm{max}}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\Hfunc}
+%   Entropy function.  Usage: |\Hfunc(x)|, |\Hfunc`*(x)|, |\Hfunc`\big(x)|.
+%
+%   TODO: Use our generic size-specification parser! Don't duplicate code!
+%    \begin{macrocode}
+\DeclareRobustCommand\Hfunc{%
+  \begingroup\mathcode`\`="0060\relax%
+  \gdef\Hfunc at tmp@sizearg{}%
+  \@ifnextchar`\Hfunc at withsize\Hfunc at next%
+}
+\def\Hfunc at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\Hfunc at tmp@sizearg{*}%
+    \endgroup%
+    \expandafter\Hfunc at inner%
+  \else%
+    \gdef\Hfunc at tmp@sizearg{[#1]}%
+    \endgroup%
+    \expandafter\Hfunc at inner%
+  \fi%
+}
+\def\Hfunc at next{\endgroup\Hfunc at inner}
+\def\Hfunc at inner(#1){%
+  \HHSym%  ({#1})%
+  \expandafter\phfqit at inner@parens\Hfunc at tmp@sizearg{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+%
+% \subsubsection{Relative Entropies}
+% 
+% User documentation in \autoref{sec:relative-entropies}
+%
+% \begin{macro}{\DDSym}
+%   Symbol to use to denote a relative entropy.
+%    \begin{macrocode}
+\newcommand\DDSym{D}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\@DDbase at inner}
+%   Internal macro to format the inner contents of a relative entropy.
+%   \begingroup\makeatletter
+%   \par |\@DDbase at inner{\rho}{\Gamma}| \quad$\to$\quad \fbox{$\@DDbase at inner{\rho}{\Gamma}$}
+%   \endgroup
+%
+%   You can also specify the optional size specifier compatible with the
+%   |\DeclarePariedDelimiter| syntax: |\@DDbase at inner*{\rho}{\Gamma}| and
+%   |\@DDbase at inner[\big]{\rho}{\Gamma}|, for example.
+%
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\@DDbase at inner[2]{(}{)}{%
+  #1\mathclose{}\,\delimsize\Vert\,\mathopen{}#2%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@DDbase}
+%   Base macro for relative entropy macros.
+%
+%   USAGE:
+%   |\@DDbase|\marg{D-symbol}\hspace{0pt}\marg{subscript}\hspace{0pt}\relax
+%   \marg{superscript}\meta{size-spec}\marg{state}\marg{relative to state}
+%   
+%   The \meta{size-spec} may be either a backtick-style specification, or a star
+%   or an optional argument (``|[\big]|'').
+%
+%   \begingroup\makeatletter
+%   Examples:
+%   \par|\@DDbase{DSYMBOL}{subscript}{superscript}{\rho}{\Gamma}|  \quad$\to$\quad
+%   $\@DDbase{DSYMBOL}{subscript}{superscript}{\rho}{\Gamma}$, and similarly\\
+%   |\@DDbase{DSYMBOL}{subscript}{superscript}*{\rho}{\Gamma}|,
+%   |\@DDbase{DSYMBOL}{subscript}{superscript}[\big]{\rho}{\Gamma}|,
+%   |\@DDbase{D-symbol}{subscript}{superscript}`*{\rho}{\Gamma}|,
+%   |\@DDbase{D-symbol}{subscript}{superscript}`\big{\rho}{\Gamma}|.
+%   \endgroup
+%
+%  This command is robust.
+%
+%    \begin{macrocode}
+\def\@DDbase#1#2#3{%
+  #1_{#2}^{#3}%
+  \@DDbase at parsesize%
+}
+\robustify\@DDbase
+\def\@DDbase at parsesize{%
+  \@ifnextchar`\@DDbase at withsize\@DDbase at inner%
+}
+\def\@DDbase at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \def\tmp at cmd{\@DDbase at inner*}%
+    \expandafter\tmp at cmd%
+  \else%
+    \def\tmp at cmd{\@DDbase at inner[#1]}%
+    \expandafter\tmp at cmd%
+  \fi%
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\DD}
+%   (Usual) quantum relative entropy.  Actually this is more versatile, because
+%   you can also specify subscript and superscript.
+%    \begin{macrocode}
+\DeclareRobustCommand\DD{%
+  \def\DD at tmp@sub{}%
+  \def\DD at tmp@sup{}%
+  \DD@%
+}
+\def\DD@{%
+  \@ifnextchar_\DD at parsesub\DD@@%
+}
+\def\DD@@{%
+  \@ifnextchar^\DD at parsesup\DD@@@%
+}
+\def\DD@@@{% sub/super-scripts have been parsed, move on to rest of command
+  \@DDbase{\DDSym}{\DD at tmp@sub}{\DD at tmp@sup}%
+}
+\def\DD at parsesub_#1{%
+  \def\DD at tmp@sub{#1}%
+  \DD@% continue parsing maybe another sub or superscript
+}
+\def\DD at parsesup^#1{%
+  \def\DD at tmp@sup{#1}%
+  \DD@% continue parsing maybe another sub or superscript
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\Dminz}
+%   ``Old'' min-relative entropy, based on the R\'enyi-zero relative entropy.
+%    \begin{macrocode}
+\DeclareRobustCommand\Dminz[1][]{%
+  \@DDbase{\DDSym}{\mathrm{min,0}}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\Dminf}
+%   Min-relative entropy (``new'' version).
+%    \begin{macrocode}
+
+%
+% \Dminf{\rho}{\sigma}
+% \Dminf[\epsilon]{\rho}{\sigma}
+% \Dminf<states-spec>
+% \Dminf[\epsilon]<states-spec>
+%
+% Where <states-spec>  =  <size-spec>{\rho}{\sigma}
+%
+% Where optional  <size-spec>  =  "`*"  or  "`\Big"
+% 
+\DeclareRobustCommand\Dminf[1][]{%
+  \@DDbase{\DDSym}{\mathrm{min}}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Dmax}
+%   Max-relative entropy.
+%    \begin{macrocode}
+\DeclareRobustCommand\Dmax[1][]{%
+  \@DDbase{\DDSym}{\mathrm{max}}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Dr}
+%   Rob-relative entropy.
+%    \begin{macrocode}
+\DeclareRobustCommand\Dr[1][]{%
+  \@DDbase{\DDSym}{\mathrm{r}}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\DHyp}
+%   Hypothesis testing relative entropy.
+%    \begin{macrocode}
+\DeclareRobustCommand\DHyp[1][\eta]{%
+  \@DDbase{\DDSym}{\mathrm{H}}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Coherent Relative Entropy}
+% 
+% See user documentation in \autoref{sec:coh-rel-entr}.
+% 
+% \begin{macro}{\DC at inner}
+%   Format the contents of the coherent relative entropy.  This is simply a
+%   |\DeclarePariedDelimiter|-style command.  The syntax is
+%   |\DC at inner|\hspace{0pt}\marg{rho}\hspace{0pt}\marg{Gamma1}\hspace{0pt}\marg{Gamma2}, and
+%   this typesets as $\bigl(\meta{rho}\big\Vert\meta{Gamma1},\meta{Gamma2}\bigr)$.
+%    \begin{macrocode}
+\DeclarePairedDelimiterX\DC at inner[3]{(}{)}{%
+  #1\mathclose{}\,\delimsize\Vert\,\mathopen{}#2\mathclose{},\mathopen{}#3%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DCSym}
+%   Symbol to use for the coherent relative entropy
+%    \begin{macrocode}
+\newcommand\DCSym{\bar\DDSym}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\emptysystem}
+%   Designates the trivial system (uses symbol for empty set).  It is important
+%   to this, because of the automatic indexes set on the ``rho'' argument.
+%    \begin{macrocode}
+\def\emptysystem{\ensuremath{\emptyset}}
+%    \end{macrocode}
+% \end{macro}
+% 
+%
+% \begin{macro}{\DCoh}
+%   The Coherent Relative Entropy.
+%
+%   TODO: Use our generic size parser, don't duplicate code!
+%
+%   First part: read the first few arguments (epsilon superscript, optional size
+%   specification).
+%    \begin{macrocode}
+\newcommand\DCoh[1][]{%
+  \def\DC at tmp@sup{#1}%
+  %\message{*********|\detokenize{#1}|*********}%
+  \begingroup\mathcode`\`="0060\relax
+  \DC at parsesize%
+}
+\def\DC at parsesize#1{%
+  \gdef\DC at tmp@sizeargs{}%
+  \ifstrequal{#1}{`}\DC at withsize{\endgroup\DC at rest{#1}}%
+}
+\def\DC at withsize#1{%
+  %\message{*********\detokenize{#1}********}%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\DC at tmp@sizeargs{*}%
+    \endgroup%
+    \expandafter\DC at rest%
+  \else%
+    \gdef\DC at tmp@sizeargs{[#1]}%
+    \endgroup%
+    \expandafter\DC at rest%
+  \fi%
+}
+%    \end{macrocode}
+% 
+% Read the rest and typeset the output.  |#1|=rho, |#2|=system-in,
+% |#3|=system-out, |#4|=Gamma-in, |#5|=Gamma-out:
+%    \begin{macrocode}
+\def\DC at rest#1#2#3#4#5{%
+  %\message{*********\detokenize{#1}|\detokenize{#2}|\detokenize{#3}%
+  %    |\detokenize{#4}|\detokenize{#5}|********}%
+  \def\DC at tmp@rho{\DC at fmtrhosub#1\DC at ENDSTATE{#2}{#3}}%
+  \DCSym_{#2\to #3}^{\DC at tmp@sup}%
+  \expandafter\DC at inner\DC at tmp@sizeargs{\DC at tmp@rho}{#4}{#5}%
+}
+%    \end{macrocode}
+% 
+% Read the following tokens until the marker |\DC at ENDSTATE|, and format this as
+% a state with or without the automatic system subscripts (depending on if the
+% argument starts with a `|*|').
+%    \begin{macrocode}
+\def\DC at fmtrhosub{%
+  \@ifnextchar*\DC at fmtrhosub@nosub\DC at fmtrhosub@wsub%
+}
+\def\DC at fmtrhosub@nosub*#1\DC at ENDSTATE#2#3{%
+  #1%
+}
+\def\DC at fmtrhosub@wsub#1\DC at ENDSTATE#2#3{%
+  \begingroup%
+    \let\emptysystem\relax%
+    #1_{#3#2}%
+  \endgroup%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/phfqit/phfqit.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/phfqit/phfqit.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/phfqit/phfqit.ins	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,55 @@
+%%
+%% Copyright (C) 2016 by Philippe Faist <philippe.faist at bluewin.ch>
+%%
+%% This file 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:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/phfqitltx}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2016 by Philippe Faist <philippe.faist at bluewin.ch>
+
+This file 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:
+
+   http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{phfqit.sty}{\from{phfqit.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{*                                                           *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX:                    *}
+\Msg{*                                                           *}
+\Msg{*     phfqit.sty                                            *}
+\Msg{*                                                           *}
+\Msg{* To produce the documentation run the .dtx file through    *}
+\Msg{* (PdF-)LaTeX.                                              *}
+\Msg{*                                                           *}
+\Msg{* Happy TeXing!                                             *}
+\Msg{*                                                           *}
+\Msg{*************************************************************}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty	2016-08-15 20:39:09 UTC (rev 41860)
@@ -0,0 +1,348 @@
+%%
+%% This is file `phfqit.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% phfqit.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2016 by Philippe Faist <philippe.faist at bluewin.ch>
+%% 
+%% This file 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:
+%% 
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{phfqit}
+    [2016/08/15 v1.0 phfqit package]
+\RequirePackage{calc}
+\RequirePackage{etoolbox}
+\RequirePackage{amsmath}
+\RequirePackage{dsfont}
+\RequirePackage{mathrsfs}
+\RequirePackage{mathtools}
+\newcommand{\Hs}{\mathscr{H}}
+\newcommand{\Ident}{\mathds{1}}
+\def\IdentProc{%
+  \phfqit at parsesizearg\phfqit at IdentProc@maybeA%
+}
+\newcommand\phfqit at IdentProc@maybeA[1][]{%
+  \def\phfqit at IdentProc@val at A{#1}%
+  \phfqit at IdentProc@maybeB%
+}
+\newcommand\phfqit at IdentProc@maybeB[1][]{%
+  \def\phfqit at IdentProc@val at B{#1}%
+  \phfqit at IdentProc@arg%
+}
+\def\phfqit at IdentProc@arg#1{%
+  \def\phfqit at IdentProc@val at arg{#1}%
+  \edef\@tmp at args{%
+    {\expandonce{\phfqit at IdentProc@val at A}}%
+    {\expandonce{\phfqit at IdentProc@val at B}}%
+    {\expandonce{\phfqit at IdentProc@val at arg}}%
+  }%
+  \expandafter\phfqit at IdentProc@do\@tmp at args%
+}
+\def\phfqit at IdentProc@do#1#2#3{%
+  \operatorname{id}_{#1\notblank{#2}{\to #2}{}}%
+  \notblank{#3}{\expandafter\phfqit at inner@parens\phfqit at val@sizearg{#3}}{}%
+}
+\def\ee^#1{e^{#1}} % we could imagine that in inlines, we replace this by exp()...
+\DeclareMathOperator{\tr}{tr}
+\DeclareMathOperator{\supp}{supp}
+\DeclareMathOperator{\rank}{rank}
+\DeclareMathOperator{\linspan}{span}
+\DeclareMathOperator{\spec}{spec}
+\DeclareMathOperator{\diag}{diag}
+\let\phfqit at Re\Re
+\DeclareMathOperator{\phfqit at Realpart}{Re}%
+\renewcommand{\Re}{\phfqit at Realpart}
+\let\phfqit at Im\Im
+\DeclareMathOperator{\phfqit at Imagpart}{Im}%
+\renewcommand{\Im}{\phfqit at Imagpart}
+\DeclareMathOperator{\poly}{poly}
+\newcommand\bit[1]{\texttt{#1}}
+\newcommand\bitstring[1]{\phfqit at bitstring{#1}}
+\def\phfqit at bitstring#1{%
+  \begingroup%
+  \setlength{\phfqit at len@bit}{\maxof{\widthof{\bit{0}}}{\widthof{\bit{1}}}}%
+  \phfqitBitstringFormat{\phfqit at bitstring@#1\phfqit at END}%
+  \endgroup%
+}
+\def\phfqit at bitstring@#1#2\phfqit at END{%
+  \makebox[\phfqit at len@bit][c]{\phfqitBitstringFormatBit{#1}}%
+  \if\relax\detokenize\expandafter{#2}\relax%
+  \else%
+    \phfqitBitstringSep\phfqit at bitstring@#2\phfqit at END%
+  \fi%
+}
+\newlength\phfqit at len@bit
+\newcommand\phfqitBitstringSep{\hspace{0.3ex}}
+\newcommand\phfqitBitstringFormat[1]{\ensuremath{\underline{\overline{#1}}}}
+\def\phfqitBitstringFormatBit{\bit}
+\DeclareRobustCommand\gate[1]{\ifmmode\textsc{\lowercase{#1}}%
+  \else{\rmfamily\textsc{\lowercase{#1}}}\fi}
+\newcommand{\AND}{\gate{And}}
+\newcommand{\XOR}{\gate{Xor}}
+\newcommand{\CNOT}{\gate{C-Not}}
+\newcommand{\NOT}{\gate{Not}}
+\newcommand{\NOOP}{\gate{No-Op}}
+\def\uu(#1){\phfqit at fmtLieAlgebra{u}(#1)}
+\def\UU(#1){\phfqit at fmtGroup{U}(#1)}
+\def\su(#1){\phfqit at fmtLieAlgebra{su}(#1)}
+\def\SU(#1){\phfqit at fmtGroup{SU}(#1)}
+\def\so(#1){\phfqit at fmtLieAlgebra{so}(#1)}
+\def\SO(#1){\phfqit at fmtGroup{SO}(#1)}
+\def\SN(#1){\mathrm{S}_{#1}}
+\def\phfqit at fmtLieAlgebra#1{\mathrm{#1}}
+\def\phfqit at fmtGroup#1{\mathrm{#1}}
+\DeclarePairedDelimiterX\ket[1]{\lvert}{\rangle}{{#1}}
+\DeclarePairedDelimiterX\bra[1]{\langle}{\rvert}{{#1}}
+\DeclarePairedDelimiterX\braket[2]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+}
+\DeclarePairedDelimiterX\ketbra[2]{\lvert}{\rvert}{%
+  {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#2}%
+}
+\DeclarePairedDelimiterX\proj[1]{\lvert}{\rvert}{%
+  {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#1}%
+}
+\DeclarePairedDelimiterX\matrixel[3]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+  \hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#3}%
+}
+\DeclarePairedDelimiterX\dmatrixel[2]{\langle}{\rangle}{%
+  {#1}\hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#2}%
+  \hspace*{0.2ex}\delimsize\vert\hspace*{0.2ex}{#1}%
+}
+\DeclarePairedDelimiterX\innerprod[2]{\langle}{\rangle}{%
+  {#1},\hspace*{0.2ex}{#2}%
+}
+\DeclarePairedDelimiterX\abs[1]{\lvert}{\rvert}{{#1}}
+\DeclarePairedDelimiterX\avg[1]{\langle}{\rangle}{{#1}}
+\DeclarePairedDelimiterX\norm[1]{\lVert}{\rVert}{{#1}}
+\def\phfqit at insideinterval#1#2{{#1\mathclose{},\mathopen{}#2}}
+\DeclarePairedDelimiterX\intervalc[2]{[}{]}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervalo[2]{]}{[}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervalco[2]{[}{[}{\phfqit at insideinterval{#1}{#2}}
+\DeclarePairedDelimiterX\intervaloc[2]{]}{]}{\phfqit at insideinterval{#1}{#2}}
+\def\phfqit at parsesizearg#1{%
+  \begingroup%
+  \mathcode`\`="0060\relax%
+  \gdef\phfqit at val@sizearg{}%
+  \@ifnextchar`{\phfqit at parsesizearg@withsize{#1}}{\endgroup#1}%
+}
+\def\phfqit at parsesizearg@withsize#1`#2{%
+  \def\@tmp at arg{#2}%
+  \def\@tmp at star{*}%
+  \def\@tmp at endgroupandcontinue{\endgroup#1}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\phfqit at val@sizearg{*}%
+    \expandafter\@tmp at endgroupandcontinue%
+  \else%
+    \gdef\phfqit at val@sizearg{[#2]}%
+    \expandafter\@tmp at endgroupandcontinue%
+  \fi%
+}
+\DeclarePairedDelimiterX\phfqit at inner@parens[1]{(}{)}{#1}
+\newcommand\HHSym{H}
+\def\@HHbase#1#2{%
+  #1_{#2}%
+  \@HHbase at parsesize%
+}
+\robustify\@HHbase
+\def\@HHbase at parsesize{%
+  \begingroup\mathcode`\`="0060\relax%
+  \gdef\HH at tmp@sizearg{}%
+  \@ifnextchar`\@HHbase at withsize\@HHbase at endgroupandparseinner%
+}
+\def\@HHbase at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\HH at tmp@sizearg{*}%
+    \expandafter\@HHbase at endgroupandparseinner%
+  \else%
+    \gdef\HH at tmp@sizearg{[#1]}%
+    \expandafter\@HHbase at endgroupandparseinner%
+  \fi%
+}
+\def\@HHbase at endgroupandparseinner{\endgroup\@HHbase at parseinner}
+\newcommand\@HHbase at parseinner[1][]{%  arg: state
+  \def\HH at tmpstore@state{#1}%
+  \@HHbase at parseinner@%
+}
+\newcommand\@HHbase at parseinner@[2][]{% arg: epsilon and target system
+  \def\HH at tmpstore@epsilon{#1}%
+  \def\HH at tmpstore@system{#2}%
+  \@HHbase at parseinner@@%
+}
+\newcommand\@HHbase at parseinner@@[1][]{% arg: conditioning system
+  \def\HH at tmpstore@condsys{#1}%
+  \@HHbase at do@inner%
+}
+\newtoks\HH at tmp@toks
+\def\HH at addtoks#1\@HH at END@ADD at TOKS{\HH at tmp@toks=\expandafter{\the\HH at tmp@toks#1}}%
+\def\@HHbase at do@inner{%
+  ^{\HH at tmpstore@epsilon}%
+  \expandafter\notblank\expandafter{\HH at tmpstore@system}{%
+    \HH at tmp@toks={}%
+    \expandafter\HH at addtoks\HH at tmpstore@system\@HH at END@ADD at TOKS%
+    \expandafter\notblank\expandafter{\HH at tmpstore@condsys}{%
+      \HH at addtoks\mathclose{}\,\delimsize\vert\,\mathopen{}\@HH at END@ADD at TOKS%
+      \expandafter\HH at addtoks\HH at tmpstore@condsys\@HH at END@ADD at TOKS%
+    }{}%
+    \edef\tmp at args{\expandonce{\HH at tmp@sizearg}{\the\HH at tmp@toks}}%
+    \expandafter\phfqit at inner@parens\tmp at args%
+    _{\HH at tmpstore@state}%
+    %
+  }{}%
+  %
+}
+\newcommand\HH{\@HHbase{\HHSym}{}}
+\newcommand\Hzero{\@HHbase{\HHSym}{\mathrm{max},0}}
+\newcommand\Hmin{\@HHbase{\HHSym}{\mathrm{min}}}
+\newcommand\Hmaxf{\@HHbase{\HHSym}{\mathrm{max}}}
+\DeclareRobustCommand\Hfunc{%
+  \begingroup\mathcode`\`="0060\relax%
+  \gdef\Hfunc at tmp@sizearg{}%
+  \@ifnextchar`\Hfunc at withsize\Hfunc at next%
+}
+\def\Hfunc at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\Hfunc at tmp@sizearg{*}%
+    \endgroup%
+    \expandafter\Hfunc at inner%
+  \else%
+    \gdef\Hfunc at tmp@sizearg{[#1]}%
+    \endgroup%
+    \expandafter\Hfunc at inner%
+  \fi%
+}
+\def\Hfunc at next{\endgroup\Hfunc at inner}
+\def\Hfunc at inner(#1){%
+  \HHSym%  ({#1})%
+  \expandafter\phfqit at inner@parens\Hfunc at tmp@sizearg{#1}%
+}
+\newcommand\DDSym{D}
+\DeclarePairedDelimiterX\@DDbase at inner[2]{(}{)}{%
+  #1\mathclose{}\,\delimsize\Vert\,\mathopen{}#2%
+}
+\def\@DDbase#1#2#3{%
+  #1_{#2}^{#3}%
+  \@DDbase at parsesize%
+}
+\robustify\@DDbase
+\def\@DDbase at parsesize{%
+  \@ifnextchar`\@DDbase at withsize\@DDbase at inner%
+}
+\def\@DDbase at withsize`#1{%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \def\tmp at cmd{\@DDbase at inner*}%
+    \expandafter\tmp at cmd%
+  \else%
+    \def\tmp at cmd{\@DDbase at inner[#1]}%
+    \expandafter\tmp at cmd%
+  \fi%
+}
+\DeclareRobustCommand\DD{%
+  \def\DD at tmp@sub{}%
+  \def\DD at tmp@sup{}%
+  \DD@%
+}
+\def\DD@{%
+  \@ifnextchar_\DD at parsesub\DD@@%
+}
+\def\DD@@{%
+  \@ifnextchar^\DD at parsesup\DD@@@%
+}
+\def\DD@@@{% sub/super-scripts have been parsed, move on to rest of command
+  \@DDbase{\DDSym}{\DD at tmp@sub}{\DD at tmp@sup}%
+}
+\def\DD at parsesub_#1{%
+  \def\DD at tmp@sub{#1}%
+  \DD@% continue parsing maybe another sub or superscript
+}
+\def\DD at parsesup^#1{%
+  \def\DD at tmp@sup{#1}%
+  \DD@% continue parsing maybe another sub or superscript
+}
+\DeclareRobustCommand\Dminz[1][]{%
+  \@DDbase{\DDSym}{\mathrm{min,0}}{#1}%
+}
+
+\DeclareRobustCommand\Dminf[1][]{%
+  \@DDbase{\DDSym}{\mathrm{min}}{#1}%
+}
+\DeclareRobustCommand\Dmax[1][]{%
+  \@DDbase{\DDSym}{\mathrm{max}}{#1}%
+}
+\DeclareRobustCommand\Dr[1][]{%
+  \@DDbase{\DDSym}{\mathrm{r}}{#1}%
+}
+\DeclareRobustCommand\DHyp[1][\eta]{%
+  \@DDbase{\DDSym}{\mathrm{H}}{#1}%
+}
+\DeclarePairedDelimiterX\DC at inner[3]{(}{)}{%
+  #1\mathclose{}\,\delimsize\Vert\,\mathopen{}#2\mathclose{},\mathopen{}#3%
+}
+\newcommand\DCSym{\bar\DDSym}
+\def\emptysystem{\ensuremath{\emptyset}}
+\newcommand\DCoh[1][]{%
+  \def\DC at tmp@sup{#1}%
+  %\message{*********|\detokenize{#1}|*********}%
+  \begingroup\mathcode`\`="0060\relax
+  \DC at parsesize%
+}
+\def\DC at parsesize#1{%
+  \gdef\DC at tmp@sizeargs{}%
+  \ifstrequal{#1}{`}\DC at withsize{\endgroup\DC at rest{#1}}%
+}
+\def\DC at withsize#1{%
+  %\message{*********\detokenize{#1}********}%
+  \def\@tmp at arg{#1}%
+  \def\@tmp at star{*}%
+  \ifx\@tmp at arg\@tmp at star\relax%
+    \gdef\DC at tmp@sizeargs{*}%
+    \endgroup%
+    \expandafter\DC at rest%
+  \else%
+    \gdef\DC at tmp@sizeargs{[#1]}%
+    \endgroup%
+    \expandafter\DC at rest%
+  \fi%
+}
+\def\DC at rest#1#2#3#4#5{%
+  %\message{*********\detokenize{#1}|\detokenize{#2}|\detokenize{#3}%
+  %    |\detokenize{#4}|\detokenize{#5}|********}%
+  \def\DC at tmp@rho{\DC at fmtrhosub#1\DC at ENDSTATE{#2}{#3}}%
+  \DCSym_{#2\to #3}^{\DC at tmp@sup}%
+  \expandafter\DC at inner\DC at tmp@sizeargs{\DC at tmp@rho}{#4}{#5}%
+}
+\def\DC at fmtrhosub{%
+  \@ifnextchar*\DC at fmtrhosub@nosub\DC at fmtrhosub@wsub%
+}
+\def\DC at fmtrhosub@nosub*#1\DC at ENDSTATE#2#3{%
+  #1%
+}
+\def\DC at fmtrhosub@wsub#1\DC at ENDSTATE#2#3{%
+  \begingroup%
+    \let\emptysystem\relax%
+    #1_{#3#2}%
+  \endgroup%
+}
+\endinput
+%%
+%% End of file `phfqit.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-08-15 20:38:41 UTC (rev 41859)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-08-15 20:39:09 UTC (rev 41860)
@@ -450,7 +450,7 @@
     pgf pgf-blur pgf-soroban pgf-spectra pgf-umlcd pgf-umlsd
     pgfgantt pgfkeyx pgfmolbio
     pgfopts pgfornament pgfplots
-    phaistos phffullpagefigure phfnote phfparen
+    phaistos phffullpagefigure phfnote phfparen phfqit
     philex philokalia philosophersimprint
     phonetic phonrule photo physics piano picinpar pict2e
     pictex pictex2 pictexsum piechartmp piff pigpen

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2016-08-15 20:38:41 UTC (rev 41859)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2016-08-15 20:39:09 UTC (rev 41860)
@@ -771,6 +771,7 @@
 depend phffullpagefigure
 depend phfnote
 depend phfparen
+depend phfqit
 depend philex
 depend photo
 depend piff

Added: trunk/Master/tlpkg/tlpsrc/phfqit.tlpsrc
===================================================================


More information about the tex-live-commits mailing list