texlive[60734] Master/texmf-dist: phfqit (11oct21)
commits+karl at tug.org
commits+karl at tug.org
Mon Oct 11 22:24:49 CEST 2021
Revision: 60734
http://tug.org/svn/texlive?view=revision&revision=60734
Author: karl
Date: 2021-10-11 22:24:49 +0200 (Mon, 11 Oct 2021)
Log Message:
-----------
phfqit (11oct21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/phfqit/README.md
trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx
trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty
Added Paths:
-----------
trunk/Master/texmf-dist/source/latex/phfqit/Makefile
trunk/Master/texmf-dist/source/latex/phfqit/pkg.mk
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/phfqit/Makefile
trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk
Deleted: trunk/Master/texmf-dist/doc/latex/phfqit/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/Makefile 2021-10-11 20:24:29 UTC (rev 60733)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/Makefile 2021-10-11 20:24:49 UTC (rev 60734)
@@ -1,10 +0,0 @@
-
-PKG = phfqit
-
--include pkg.mk
-
-pkg.mk:
- ln -sf ../mkcommon/pkg.mk pkg.mk
-
-install: install_sty install_doc
-
Modified: trunk/Master/texmf-dist/doc/latex/phfqit/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/README.md 2021-10-11 20:24:29 UTC (rev 60733)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/README.md 2021-10-11 20:24:49 UTC (rev 60734)
@@ -14,8 +14,9 @@
# 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.
+Run `make sty` to generate the style file, `make pdf` to generate the package
+documentation, and `make install` to install the package in your local texmf
+tree. Run 'make' or 'make help' for more info.
# Author and License
Modified: trunk/Master/texmf-dist/doc/latex/phfqit/phfqit.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk
===================================================================
--- trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk 2021-10-11 20:24:29 UTC (rev 60733)
+++ trunk/Master/texmf-dist/doc/latex/phfqit/pkg.mk 2021-10-11 20:24:49 UTC (rev 60734)
@@ -1,168 +0,0 @@
-
-#
-# 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)
-
-# feedback from CTAN upload manager: prefer not to provide tds.zip in CTAN upload
-$(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) $(PKG) #$(PKGTDSZIP)
- rm -rf $(DISTTMPDIR)
-
-cleandist:
- @rm -f $(PKGZIP)
Added: trunk/Master/texmf-dist/source/latex/phfqit/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/latex/phfqit/Makefile (rev 0)
+++ trunk/Master/texmf-dist/source/latex/phfqit/Makefile 2021-10-11 20:24:49 UTC (rev 60734)
@@ -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/source/latex/phfqit/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx 2021-10-11 20:24:29 UTC (rev 60733)
+++ trunk/Master/texmf-dist/source/latex/phfqit/phfqit.dtx 2021-10-11 20:24:49 UTC (rev 60734)
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{phfqit}
%<*package>
- [2017/08/16 v2.0 phfqit package]
+ [2021/10/08 v4.1 phfqit package]
%</package>
%
%<*driver>
@@ -75,9 +75,9 @@
% \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.
+% \pkgname{phfqit}---Utilities to typeset stuff in Quantum Information Theory,
+% in particular general mathematical symbols, operators, and shorthands for
+% entropy measures.
% \end{abstract}
%
% \inlinetoc
@@ -98,6 +98,7 @@
% (\autoref{sec:Lie-groups-algebras})
% \item Bra-ket notation, and delimited expressions such as average, norm,
% \ldots (\autoref{sec:delimited})
+% \item Double bra-ket notation for operators (\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
@@ -123,6 +124,19 @@
% \item[newReIm=\metatruefalsearg] Do not override \LaTeX{}'s default
% {\makeatletter $\phfqit at Re$ and $\phfqit at Im$} symbols by $\Re$ and $\Im$.
% See \autoref{sec:description-newReIm}.
+% \item[llanglefrommnsymbolfonts=\metatruefalsearg] In order to define the
+% operator-kets and operator-bra symbols, we need to have double-angle bracket
+% symbol delimiters loaded as |\llangle| and |\rrangle|. Unlike |\langle| and
+% |\rangle|, they are not provided by default by \pkgname{latex},
+% \pkgname{amsmath} or \pkgname{amssymb}. What we do is that we load the
+% |\llangle| and |\rrangle| symbols from the MnSymbol fonts in order to define
+% |\oket| and friends. If you would like to provide your own definitions for
+% |\llangle| and |\rrangle|, or if you have problems loading the MnSymbol
+% fonts and don't need the operator-ket symbols, then you can specify
+% |llanglefrommnsymbolfonts=false| and we won't bother loading the MnSymbol
+% fonts. (Note that if you provide your own definitions for |\llangle| and
+% |\rrangle|, they have to be valid delimiters, such that for example the
+% syntax |\left\llangle| is valid.)
% \end{pkgoptions}
%
% \changed[v2.0-pkg-opt-qitobjdef]{v2.0}{2017/08/16}{Added the
@@ -178,7 +192,7 @@
%
%
%
-% \section{General Symbols (and Math Operators)}
+% \section{General Symbols and Math Operators}
% \label{sec:symbols}
%
% \DescribeMacro{\Hs}
@@ -210,7 +224,15 @@
% symbol, or even to change the notation to |\exp{<ARGUMENT>}| if needed for
% inline math.
%
+% \DescribeMacro{\phfqitExpPowerExpression}
+% To change the appearance of whatever you typed as |\ee^{XYZ}|, you can
+% redefine |\phfqitExpPowerExpression|; for instance, to use an upright
+% ``$\mathrm{e}$'' symbol, you could type:
+% \begin{verbatim}
+% \renewcommand\phfqitExpPowerExpression[1]{\mathrm{e}^{#1}}
+% \end{verbatim}
%
+%
% \subsection{Math/Linear Algebra Operators}
% \label{sec:math-operators}
% \label{sec:description-newReIm}
@@ -267,26 +289,60 @@
% \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.
+% \DescribeMacro{\slalg(N)} \DescribeMacro{\SL(N)}
+% \DescribeMacro{\GL(N)} \DescribeMacro{\SN(N)}
+% Format some common Lie groups and algebras. Note the use of |\slalg| instead
+% of |\sl| because of name conflict with \TeX's font command {\sl producing
+% slanted text}.
%
% |\SN(N)| is the symmetric group of $N$ items, and formats by default as
-% $\SN(N)$. \vspace{4\baselineskip}
-%
+% $\SN(N)$.
+%
+% \DescribeMacro{\phfqitLieGroup} \DescribeMacro{\phfqitLieAlgebra}
+% \DescribeMacro{\phfqitDiscreteGroup}
+% The macros |\phfqitLieGroup|, |\phfqitLieAlgebra|, and |\phfqitDiscreteGroup|
+% format the name for a standard Lie group, Lie algebra or discrete group along
+% with its argument. Redefine these macros with |\renewcommand| to change the
+% formatting font for Lie groups and algebras for instance. For instance, to
+% format standard Lie groups/algebras and the permutation group with simple
+% italic letters, you can use:
+% \begin{verbatim}
+% \renewcommand\phfqitLieAlgebra[2]{\mathit{#1}({#2})}
+% \renewcommand\phfqitLieGroup[2]{\mathit{#1}({#2})}
+% \renewcommand\phfqitDiscreteGroup[2]{\mathit{#1}_{#2}}
+% \end{verbatim}
+%
+% \verbdef\GLNverbatim=\GL(N)=
+% \changed[v2.0]{v2.0}{2018/02/28}{Added the macro \GLNverbatim}
+% \verbdef\SLNverbatim=\slalg(n),\SL(N)=
+% \changed[v3.0]{v3.0}{2020/07/31}{Added the macros \SLNverbatim, as well
+% as \phfverb{\phfqitLieAlgebra}, \phfverb{\phfqitLieGroup}, and
+% \phfverb{\phfqitDiscreteGroup}}
+%
+% \iffalse \vspace{3\baselineskip} <-- space for all the \SU(xx) listings in margin \fi
+%
% \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:
+% \subsection{Bras and kets}
+% \label{sec:bra-ket}
+%
+% All commands here work in math mode only. They all accept a size modifier as
+% described in \autoref{topic:size-specification-backtick}. (The size may also
+% be provided as an optional argument; the starred form of the command may also
+% be used to enclose the delimiters with |\left...\right| and have the size
+% determined automatically.) Example usage 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}$ \\
+% |\ket{\psi}| & $\ket{\psi}$ \\[1em]
+% |\ket`\big{\psi}|~,~~|\ket[\big]{\psi}| & $\ket`\big{\psi}$ \\[1em]
+% |\ket`\Big{\psi}|~,~~|\ket[\Big]{\psi}| & $\ket`\Big{\psi}$ \\[1em]
+% |\ket`\bigg{\psi}|~,~~|\ket[\bigg]{\psi}| & $\ket`\bigg{\psi}$ \\[1em]
+% |\ket`\Bigg{\psi}|~,~~|\ket[\Bigg]{\psi}| & $\ket`\Bigg{\psi}$ \\[1em]
+% \begin{minipage}{7cm}\relax
+% \noindent|\ket`*{\displaystyle\sum_k \psi_k}|,\\
+% \hspace*{2em}|\ket*{\displaystyle\sum_k \psi_k}|
+% \end{minipage}
+% & $\ket*{\displaystyle\sum_k \psi_k}$
% \end{tabular}
% \end{center}
%
@@ -315,17 +371,53 @@
% |\innerprod{\phi}{\psi}| gives $\innerprod{\phi}{\psi}$.
%
%
-% There are also some further delimited expressions defined, for convenience.
+% \DescribeMacro{\oket} \DescribeMacro{\obra} \DescribeMacro{\obraket}
+% \DescribeMacro{\oketbra} \DescribeMacro{\oproj} \DescribeMacro{\omatrixel}
+% \DescribeMacro{\odmatrixel} This package also provides associated
+% double-bra-ket commands as is occasionally used to write ``vectors'' in
+% Hilbert-Schmidt operator space, such as $\oket{A}$, $\obraket{A}{\Ident}$,
+% $\oketbra{\Ident}{E_k}$, etc. The commands are named |\oket|, |\obra|,
+% |\obraket|, |\oketbra|, |\oproj|, |\omatrixel|, and |\odmatrixel|.
%
+% The commands |\oket|, |\obra|, |\obraket|, etc.\@ offer the same syntax as
+% their corresponding |\ket|, |\bra|, etc.\@ counterparts. For instance, you can
+% type |\obra`\Big{\sum A_i}| to obtain $\obra`\Big{\sum A_i}$.
+%
+% \DescribeMacro{\llangle} \DescribeMacro{\rrangle} The \pkgname{phfqit} package
+% defines the |\llangle| and |\rrangle| delimiters, by taking the relevant
+% symbols from the \pkgname{MnSymbol} fonts. These double-angle bracket symbols
+% are used for the double-bra-ket type constructs (|\oket| and friends).
+%
+% If you'd like to provide your own definition of |\llangle| and |\rrangle|, or
+% if for any reason you would not want us to attempt to load the
+% \pkgname{MnSymbol} fonts at all, then you can set the package option
+% |llanglefrommnsymbolfonts=false|.
+%
+% If you provide your own definition of |\llangle| and |\rrangle|, then make
+% sure that they are proper \TeX\ delimiters, i.e., constructs of the form
+% |\left\llangle ... \right\rrangle| or |\bigl\llangle ... \bigr\rrangle| must
+% work.
+%
+% If your document never uses the double-bra-ket macros (i.e., none of the
+% |\oket|, |\obra|, and friends), then you may safely specifiy
+% |llanglefrommnsymbolfonts=false| to avoid loading the relevant symbols.
+%
+%
+% \subsection{Delimited expressions: norms, absolute value, etc.}
+% \label{sec:delimited}
+%
+% There are also some commonly used 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{\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$.)
+% $\norm{A_k}$. (If you'd like to define customized norms, e.g., to add
+% subscripts, then check out the |\phfqitDefineNorm| command discussed below.)
%
% \DescribeMacro{\intervalc} A closed interval. |\intervalc{x}{y}| gives
% $\intervalc{x}{y}$.
@@ -340,7 +432,27 @@
% and closed on the upper bound. |\intervaloc{x}{y}| gives $\intervaloc{x}{y}$.
%
%
+% \DescribeMacro{\phfqitDefineNorm} The handy command |\phfqitDefineNorm| can be
+% used to define custom norms (e.g. 1-norm, infinity-norm, p/q-norms, etc.).
+% The syntax is |\phfqitDefineNorm|\meta{command name}\meta{before}\meta{after},
+% for example:
+% \begin{verbatim}
+% \phfqitDefineNorm\onenorm{}{_1}
+% \phfqitDefineNorm\opnorm{}{_\infty}
+% \end{verbatim}
%
+% \DescribeMacro{\phfqitDeclarePairedDelimiterXWithAltSizing}
+% \DescribeMacro{\phfqitDeclarePairedDelimiterXPPWithAltSizing} For defining
+% more advanced custom delimited expressions, you can use the
+% |\phfqitDeclarePairedDelimiterXWithAltSizing| and
+% |\phfqitDeclarePairedDelimiterXPPWithAltSizing| helpers. These macros wrap
+% the \pkgname{mathtools} package's |\DeclarePairedDelimiterX| and
+% |\DeclarePairedDelimiterX| macros, by furthermore enabling the newly defined
+% command to accept the size argument using the backtick syntax described in
+% \autoref{topic:size-specification-backtick}. These helpers are used
+% internally to define the commands for kets, bras, norms, etc.
+%
+%
% \section{Entropy Measures and Other ``Qit Objects''}
%
% A ``Qit Object'' is any form of quantity which has several parameters and/or
@@ -456,9 +568,9 @@
% \label{sec:entropy-function}
%
% \DescribeMacro{\Hfn} The entropy, written as a mathematical function. It is
-% useful to write, e.g., $\Hfunc(p_1\rho_1 + p_2\rho_2)$ as \relax
-% |\Hfunc(p_1\rho_1 + p_2\rho_2)|. Sizing specifications also work, e.g.\@
-% |\Hfunc`\big(x)| or |\Hfunc`*(x)|.
+% useful to write, e.g., $\Hfn(p_1\rho_1 + p_2\rho_2)$ as \relax
+% |\Hfn(p_1\rho_1 + p_2\rho_2)|. Sizing specifications also work, e.g.\@
+% |\Hfn`\big(x)| or |\Hfn`*(x)|.
%
% Usage is: |\Hfn|\hspace{0pt}\meta{size-spec}\hspace{0pt}|(|\meta{argument}|)|
%
@@ -547,17 +659,22 @@
% \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{\DHyp} \DescribeMacro{\Dhyp} The hypothesis testing relative
+% entropy (two possible variants). The syntax is the same as for |\Dmax|,
+% except that by default the optional argument is |\eta|. The symbols
+% `$\mathrm{H}$' and `$\mathrm{h}$' are used as subscripts, respectively, for
+% |\DHyp| and |\Dhyp|. Examples: The code |\DHyp{\rho}{\sigma}| gives
+% $\DHyp{\rho}{\sigma}$ and |\Dhyp[\eta']{\rho}{\sigma}| gives
+% $\Dhyp[\eta']{\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.)
%
-% The commands |\DD|, |\Dmax|, |\Dminz|, |\Dminf|, |\Dr| and |\DHyp| are defined
-% only if the package option \pkgoptionfmt{qitobjdef=stdset} is set (which is
-% the default).
+% The commands |\DD|, |\Dmax|, |\Dminz|, |\Dminf|, |\Dr|, |\DHyp| and |\Dhyp|
+% are defined only if the package option \pkgoptionfmt{qitobjdef=stdset} is set
+% (which is the default).
%
+% \changedreftext{v3.1-added-Dhyp-qitobjdef-stdset}
+%
% \DescribeMacro{\DSym} The symbol to use to denote a relative entropy. You
% may redefine this command to change the symbol. (This works like |\HSym|
% above.)
@@ -847,6 +964,7 @@
\RequirePackage{calc}
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
+\RequirePackage{amssymb}
\RequirePackage{dsfont}
\RequirePackage{mathrsfs}
\RequirePackage{mathtools}
@@ -929,8 +1047,24 @@
% \begingroup\catcode`\^=12\relax
% \begin{macro}{\ee^...}
% Macro for the exponential.
+%
+% Because the character |^| might have different catcodes (e.g. with the
+% \pkgname{breqn} package), we use a hack with |\detokenize|. Basically this
+% boils down to |\def\ee^#1{\phfqitExpPowerExpression{#1}}| and
+% |\def\phfqitExpPowerExpression#1{e^{#1}}|, up to making sure that all the
+% |^| symbols are compared without catcodes.
+%
+% \changed[v4.0-fixed-ee-for-catcodes]{v4.0}{2021/10/07}{Fixed the definition
+% of \phfverb{\ee} in order to support the case where the catcode of
+% \phfverb{^} changes}
% \begin{macrocode}
-\def\ee^#1{e^{#1}} % we could imagine that in inlines, we replace this by exp()...
+\edef\phfqit at def@hat{\detokenize{^}}
+\expandafter\def\expandafter\phfqit at ee@gobblehat\phfqit at def@hat{%
+ \phfqitExpPowerExpression}
+\def\phfqitExpPowerExpression#1{e^{#1}}
+\def\ee#1{\expandafter\phfqit at ee@gobblehat\detokenize{#1}}
+\robustify\phfqitExpPowerExpression
+\robustify\ee
% \end{macrocode}
% \end{macro}
% \endgroup
@@ -1084,16 +1218,22 @@
% \begin{macro}{\SU(N)}
% \begin{macro}{\so(N)}
% \begin{macro}{\SO(N)}
+% \begin{macro}{\slalg(N)}
+% \begin{macro}{\SL(N)}
+% \begin{macro}{\GL(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}}
+\def\uu(#1){\phfqitLieAlgebra{u}{#1}}
+\def\UU(#1){\phfqitLieGroup{U}{#1}}
+\def\su(#1){\phfqitLieAlgebra{su}{#1}}
+\def\SU(#1){\phfqitLieGroup{SU}{#1}}
+\def\so(#1){\phfqitLieAlgebra{so}{#1}}
+\def\SO(#1){\phfqitLieGroup{SO}{#1}}
+\def\slalg(#1){\phfqitLieAlgebra{sl}{#1}} % \sl is "slanted font" in TeX
+\def\SL(#1){\phfqitLieGroup{SL}{#1}}
+\def\GL(#1){\phfqitLieGroup{GL}{#1}}
+\def\SN(#1){\phfqitDiscreteGroup{S}{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1102,26 +1242,131 @@
% \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{macro}{\phfqitLieAlgebra}
+% \begin{macro}{\phfqitLieGroup}
+% \begin{macro}{\phfqitDiscreteGroup}
+% Override these to change the appearance of the group names or algebra names.
+% The first argument is the name of the group or algebra (e.g. |su| or |SU|),
+% and the second argument is the parenthesized argument e.g. ``N''.
% \begin{macrocode}
-\def\phfqit at fmtLieAlgebra#1{\mathrm{#1}}
-\def\phfqit at fmtGroup#1{\mathrm{#1}}
+\newcommand\phfqitLieAlgebra[2]{\mathfrak{#1}({#2})}
+\newcommand\phfqitLieGroup[2]{\mathrm{#1}({#2})}
+\newcommand\phfqitDiscreteGroup[2]{\mathrm{#1}_{#2}}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
%
%
%
%
+% \subsection{Helper for parsing a size argument}
+%
+% \begin{macro}{\phfqit at parsesizearg}
+% 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{}%
+ \def\phfqit at tmp@contwithsize{\phfqit at parsesizearg@withsize{#1}}%
+ \@ifnextchar`{\phfqit at tmp@contwithsize}{\endgroup#1}%
+}
+\def\phfqit at parsesizearg@withsize#1`#2{%
+ \def\phfqit at tmp@x{#2}%
+ \def\phfqit at tmp@star{*}%
+ \ifx\phfqit at tmp@x\phfqit at tmp@star%
+ \gdef\phfqit at val@sizearg{*}%
+ \def\phfqit at tmp@cont{\endgroup#1}%
+ \expandafter\phfqit at tmp@cont%
+ \else%
+ \gdef\phfqit at val@sizearg{[#2]}%
+ \def\phfqit at tmp@cont{\endgroup#1}%
+ \expandafter\phfqit at tmp@cont%
+ \fi%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\phfqitDeclarePairedDelimiterXWithAltSizing}
+% \begin{macro}{\phfqitDeclarePairedDelimiterXPPWithAltSizing}
+% Macros that behave exactly like \pkgname{mathtools}'
+% |\DeclarePairedDelimiterX| and |\DeclarePairedDelimiterXPP|, except that
+% their size argument can also be specified by a backtick as for entropy
+% measures or other objects in this package (e.g., to define |\abs| such that
+% |$\abs`\Big{x - y}$| gives $\abs`\Big{x - y}$).
+% \changed[v4.0-new-phfqitDeclarePairedDelimiterxxx]{v4.0}{2021/10/07}{Added
+% \phfverb{\phfqitDeclarePairedDelimiterXWithAltSizing} and
+% \phfverb{\phfqitDeclarePairedDelimiterXPPWithAltSizing}}
+% \begin{macrocode}
+\def\phfqitDeclarePairedDelimiterXWithAltSizing{%
+ \phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing\DeclarePairedDelimiterX
+}
+\def\phfqitDeclarePairedDelimiterXPPWithAltSizing{%
+ \phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing\DeclarePairedDelimiterXPP
+}
+\def\phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing#1#2{%
+ \begingroup
+ \escapechar=-1\relax
+ \xdef\phfqit at tmp@thecmd{%
+ \expandafter\noexpand\csname phfqit at paireddelim@def@\string#2\endcsname}%
+ \endgroup
+ \edef\x{%
+ \noexpand\phfqit at paireddelim@parsesizearg{\expandonce\phfqit at tmp@thecmd}%
+ }%
+ \expandafter\DeclareRobustCommand\expandafter#2\expandafter{\x}%
+ \expandafter#1\phfqit at tmp@thecmd
+}
+\def\phfqit at paireddelim@parsesizearg#1{%
+ \phfqit at parsesizearg{\expandafter#1\phfqit at val@sizearg}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
% \subsection{Bra-Ket Notation}
%
-%
-% \needspace{8\baselineskip}
+%
+% \begin{macro}{\phfqitKetsBarSpace}
+% \begin{macro}{\phfqitKetsRLAngleSpace}
+% These macros can be redefined to fine-tune the space that is inserted in
+% some of the ket/bra constructs.
+%
+% |\phfqitKetsBarSpace| is the space around the vertical bars, e.g., in a
+% bra-ket, or in matrix elements. (Previously, this space was hard-coded to
+% |\hspace*{0.2ex}|. Now, the spacing can be specified in this macro. We
+% furthermore use ``math units'' (|mu|), which are more suitable for
+% specifying space in math mode; recall that $1\,\mathrm{mu}$ is
+% $1/18\,\mathrm{em}$ in the math font.)
+% \begin{macrocode}
+\def\phfqitKetsBarSpace{\mkern 1.5mu\relax}
+% \end{macrocode}
+% The macro |\phfqitKetsRLAngleSpace| specifies the space between the right
+% angle bracket and the left angle bracket in ket-bra type constructs
+% ($\ketbra\phi\psi$). By default, it expands to negative space to bring the
+% angle brackets closer together. (Previously, this space was hard-coded to
+% |\hspace*{-0.25ex}|.)
+% \begin{macrocode}
+\def\phfqitKetsRLAngleSpace{\mkern -1.8mu\relax}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \needspace{7\baselineskip}
% \begin{macro}{\ket}
% \begin{macro}{\bra}
% \begin{macro}{\braket}
@@ -1129,41 +1374,110 @@
% \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}%
+\phfqitDeclarePairedDelimiterXWithAltSizing\ket[1]{\lvert}{\rangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\bra[1]{\langle}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\braket[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
}
-\DeclarePairedDelimiterX\ketbra[2]{\lvert}{\rvert}{%
- {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#2}%
+\phfqitDeclarePairedDelimiterXWithAltSizing\ketbra[2]{\lvert}{\rvert}{%
+ {#1}\delimsize\rangle\phfqitKetsRLAngleSpace\delimsize\langle{#2}%
}
-\DeclarePairedDelimiterX\proj[1]{\lvert}{\rvert}{%
- {#1}\delimsize\rangle\hspace*{-0.25ex}\delimsize\langle{#1}%
+\phfqitDeclarePairedDelimiterXWithAltSizing\proj[1]{\lvert}{\rvert}{%
+ {#1}\delimsize\rangle\phfqitKetsRLAngleSpace\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}%
+\phfqitDeclarePairedDelimiterXWithAltSizing\matrixel[3]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
+ \phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#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}%
+\phfqitDeclarePairedDelimiterXWithAltSizing\dmatrixel[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
+ \phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#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}
+%
+% \begin{macro}{\phfqitKetsBeforeCommaSpace}
+% \begin{macro}{\phfqitKetsAfterCommaSpace}
+% \begin{macro}{\innerprod}
+% We also provide the |\innerprod| macro at this point. Customize the inner
+% spacing before and after the comma with |\phfqitKetsBeforeCommaSpace| and
+% |\phfqitKetsAfterCommaSpace|.
+% \begin{macrocode}
+\def\phfqitKetsBeforeCommaSpace{}
+\def\phfqitKetsAfterCommaSpace{\mkern 1.5mu\relax}
+\phfqitDeclarePairedDelimiterXWithAltSizing\innerprod[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBeforeCommaSpace,\phfqitKetsAfterCommaSpace{#2}%
}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+%
+% \begin{macro}{\phfqitOKetsBarSpace}
+% \begin{macro}{\phfqitOKetsRLAngleSpace}
+% These macros are the same as |\phfqitKetsBarSpace| and
+% |\phfqitKetsRLAngleSpace|, except that they specify the corresponding
+% spacing for the |\oket| family of bra/ket-type constructs.
+% \begin{macrocode}
+\def\phfqitOKetsBarSpace{\phfqitKetsBarSpace}
+\def\phfqitOKetsRLAngleSpace{\phfqitKetsRLAngleSpace}
+% \end{macrocode}
% \end{macro}
% \end{macro}
+%
+%
+% \needspace{8\baselineskip}
+% \begin{macro}{\oket}
+% \begin{macro}{\obra}
+% \begin{macro}{\obraket}
+% \begin{macro}{\oketbra}
+% \begin{macro}{\oproj}
+% \begin{macro}{\omatrixel}
+% \begin{macro}{\odmatrixel}
+% Again Bras, kets, but for operator space this time. User documentation in
+% \autoref{sec:bra-ket}. These definitions depend on |\llangle| and
+% |\rrangle| being available and expanding to valid delimiter symbols. See
+% also the |llanglefrommnsymbolfonts| option.
+%
+% \changed[v4.1-okets-obras]{v4.1}{2021/10/08}{Added support for
+% \phfverb{\oket} and friends}
+% \begin{macrocode}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oket[1]{\lvert}{\rrangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\obra[1]{\llangle}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\obraket[2]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oketbra[2]{\lvert}{\rvert}{%
+ {#1}\delimsize\rrangle\phfqitOKetsRLAngleSpace\delimsize\llangle{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oproj[1]{\lvert}{\rvert}{%
+ {#1}\delimsize\rrangle\phfqitOKetsRLAngleSpace\delimsize\llangle{#1}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\omatrixel[3]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+ \phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#3}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\odmatrixel[2]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+ \phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#1}%
+}
+% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
%
% \subsection{Delimited Expressions}
@@ -1174,14 +1488,30 @@
% \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}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\abs[1]{\lvert}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\avg[1]{\langle}{\rangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\norm[1]{\lVert}{\rVert}{{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\phfqitDefineNorm}
+% Use |\phfqitDefineNorm\opnorm{}{_\infty}| to define specific norms, with the
+% syntax |\phfqitDefineNorm|\meta{new command name}\meta{tokens
+% before}\meta{tokens after}. If you need arguments in the before/after
+% tokens, then your norm starts to be more complicated than what
+% |\phfqitDefineNorm| can handle, perhaps it's best you use
+% |\phfqitDeclarePairedDelimiterXPPWithAltSizing| directly.
+%
+% \changed[v4.0-new-phfqitDefineNorm]{v4.0}{2021/10/07}{Added
+% \phfverb{\phfqitDefineNorm}}
+% \begin{macrocode}
+\def\phfqitDefineNorm#1#2#3{%
+ \phfqitDeclarePairedDelimiterXPPWithAltSizing#1[1]{#2}{\lVert}{\rVert}{#3}{{##1}}%
+}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\phfqit at insideinterval}
% Format the contents of an interval. Utility for defining |\intervalc| and
@@ -1198,10 +1528,14 @@
% \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}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalc[2]{[}{]}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalo[2]{]}{[}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalco[2]{[}{[}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervaloc[2]{]}{]}{%
+ \phfqit at insideinterval{#1}{#2}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1218,43 +1552,9 @@
%
% \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{}%
- \def\phfqit at tmp@contwithsize{\phfqit at parsesizearg@withsize{#1}}%
- \@ifnextchar`{\phfqit at tmp@contwithsize}{\endgroup#1}%
-}
-\def\phfqit at parsesizearg@withsize#1`#2{%
- \def\phfqit at tmp@x{#2}%
- \def\phfqit at tmp@star{*}%
- \ifx\phfqit at tmp@x\phfqit at tmp@star%
- \gdef\phfqit at val@sizearg{*}%
- \def\phfqit at tmp@cont{\endgroup#1}%
- \expandafter\phfqit at tmp@cont%
- \else%
- \gdef\phfqit at val@sizearg{[#2]}%
- \def\phfqit at tmp@cont{\endgroup#1}%
- \expandafter\phfqit at tmp@cont%
- \fi%
-}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\phfqitParens}
% Simple parenthesis-delimited expression, with
-% |\DeclarePairedDelimiter|-compatible syntax. For example,
+% |\DeclarePairedDelimiterX|-compatible syntax. For example,
% \par |\phfqitParens|\marg{content} \quad$\to$\quad
% \fbox{\phfverb( \meta{content} \phfverb)}
% \par |\phfqitParens*|\marg{content} \quad$\to$\quad
@@ -1269,7 +1569,7 @@
%
% \begin{macro}{\phfqitSquareBrackets}
% Simple bracket-delimited expression, with
-% |\DeclarePairedDelimiter|-compatible syntax. For example,
+% |\DeclarePairedDelimiterX|-compatible syntax. For example,
% \par |\phfqitSquareBrackets|\marg{content} \quad$\to$\quad
% \fbox{\phfverb[ \meta{content} \phfverb]}
% \par |\phfqitSquareBrackets*|\marg{content} \quad$\to$\quad
@@ -1284,7 +1584,7 @@
%
% \begin{macro}{\phfqitCurlyBrackets}
% Simple bracket-delimited expression, with
-% |\DeclarePairedDelimiter|-compatible syntax. For example,
+% |\DeclarePairedDelimiterX|-compatible syntax. For example,
% \par |\phfqitSquareBrackets|\marg{content} \quad$\to$\quad
% \fbox{\phfverb\{ \meta{content} \phfverb\}}
% \par |\phfqitSquareBrackets*|\marg{content} \quad$\to$\quad
@@ -1940,10 +2240,19 @@
% \end{macrocode}
% \ldots{} add conditional system, if specified:
% \begin{macrocode}
- \notblank{#3#4}{%
+ \notblank{#3}{%
\DCohbase at addtoks\mathclose{}\,\delimsize\Vert\,\mathopen{}%
- #3\mathclose{},\mathopen{}#4\@DCohbase at END@ADD at TOKS%
- }{}%
+ #3\@DCohbase at END@ADD at TOKS%
+ \notblank{#4}{%
+ \DCohbase at addtoks\mathclose{},\mathopen{}%
+ #4\@DCohbase at END@ADD at TOKS%
+ }{}%
+ }{%
+ \notblank{#4}{%
+ \PackageWarning{phfqit}{Value `#4' ignored because previous parameter
+ was blank}%
+ }{}%
+ }
% \end{macrocode}
% The tokens are ready now. Prepare the argument to the command
% |\DCohbaseRenderContentsInnerParens| (by default just |\phfqitParens|), and go:
@@ -2041,6 +2350,12 @@
\DeclareStringOption[stdset]{qitobjdef}
% \end{macrocode}
%
+% Whether we should load the |\llangle| and |\rrangle| delimiters from the
+% MnSymbol fonts.
+% \begin{macrocode}
+\DeclareBoolOption[true]{llanglefrommnsymbolfonts}
+% \end{macrocode}
+%
% Whether to override \LaTeX{}'s default {\makeatletter $\phfqit at Re$ and
% $\phfqit at Im$} symbols by our more readable $\Re$ and $\Im$.
% \begin{macrocode}
@@ -2069,6 +2384,44 @@
% \end{macro}
% \end{macro}
%
+% \subsubsection{Load \phfverb{\llangle} and \phfverb{\rrangle} from the
+% \emph{MnSymbol} fonts}
+%
+% We need to import |\llangle| and |\rrangle| from the |MnSymbol|
+% fonts.\footnote{see e.g. \url{https://tex.stackexchange.com/a/79701/32188}}
+%
+% \begin{macrocode}
+\ifphfqit at opt@llanglefrommnsymbolfonts
+ \DeclareFontFamily{OMX}{MnSymbolE}{}
+ \DeclareSymbolFont{phfqit at MnLargeSymbols}{OMX}{MnSymbolE}{m}{n}
+ \SetSymbolFont{phfqit at MnLargeSymbols}{bold}{OMX}{MnSymbolE}{b}{n}
+ \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
+ <-6> MnSymbolE5
+ <6-7> MnSymbolE6
+ <7-8> MnSymbolE7
+ <8-9> MnSymbolE8
+ <9-10> MnSymbolE9
+ <10-12> MnSymbolE10
+ <12-> MnSymbolE12
+ }{}
+ \DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
+ <-6> MnSymbolE-Bold5
+ <6-7> MnSymbolE-Bold6
+ <7-8> MnSymbolE-Bold7
+ <8-9> MnSymbolE-Bold8
+ <9-10> MnSymbolE-Bold9
+ <10-12> MnSymbolE-Bold10
+ <12-> MnSymbolE-Bold12
+ }{}
+ \let\llangle\@undefined
+ \let\rrangle\@undefined
+ \DeclareMathDelimiter{\llangle}{\mathopen}%
+ {phfqit at MnLargeSymbols}{'164}{phfqit at MnLargeSymbols}{'164}
+ \DeclareMathDelimiter{\rrangle}{\mathclose}%
+ {phfqit at MnLargeSymbols}{'171}{phfqit at MnLargeSymbols}{'171}
+\fi
+% \end{macrocode}
+%
% \subsubsection{Standard entropy measures}
%
% Load the requested set of qit objects.
@@ -2150,6 +2503,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Dhyp}
+% Hypothesis testing relative entropy (alternative definition).
+% \changed[v3.1-added-Dhyp-qitobjdef-stdset]{v3.1}{2021/07/27}{Added the
+% \phfverb{\Dhyp} variant of the hypothesis testing relative entropy}
+% \begin{macrocode}
+\newcommand\Dhyp[1][\eta]{\Dbase{\DSym}_{\mathrm{h}}^{#1}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\DCoh}
% Coherent relative entropy (old style).
% \begin{macrocode}
Added: trunk/Master/texmf-dist/source/latex/phfqit/pkg.mk
===================================================================
--- trunk/Master/texmf-dist/source/latex/phfqit/pkg.mk (rev 0)
+++ trunk/Master/texmf-dist/source/latex/phfqit/pkg.mk 2021-10-11 20:24:49 UTC (rev 60734)
@@ -0,0 +1,188 @@
+
+#
+# Common useful definitions
+#
+LATEX = latex
+
+PDFLATEXNAME = pdflatex
+
+PDFLATEX = TEXINPUTS="$$TEXINPUTS:../phfnote" $(PDFLATEXNAME)
+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 ?=
+
+#
+# Additional files automatically generated by the .ins file, such as .def files
+# (by default empty)
+#
+ADDITIONAL_GENERATED_FILES ?=
+
+
+# By default, the generated style file is a '.sty' latex package. If it's a
+# '.cls' class file instead, the local Makefile will redefine this to 'cls'.
+PKGSTYEXT ?= sty
+
+PKGDTX = $(PKG).dtx
+PKGSTY = $(PKG).$(PKGSTYEXT)
+PKGINS = $(PKG).ins
+PKGPDF = $(PKG).pdf
+PKGTDSZIP = $(PKG).tds.zip
+PKGZIP = $(PKG).zip
+
+
+.PHONY: help sty cls pdf install install_sty install_cls install_doc tdszip dist clean cleanall cleansty cleancls cleanaux cleanpdf cleantdszip cleandist
+
+
+help:
+ @echo "Targets for $(PKG):"
+ @echo "make $(PKGSTYEXT) -- generate LaTeX package file $(PKG).$(PKGSTYEXT)"
+ @echo "make pdf -- generate pdf documentation"
+ @echo "make install -- install style and documentation files to $(DEFAULT_PREFIX)"
+ @echo "make install PREFIX=[specify texmf directory destination]"
+ @echo "make $(PKG).tds.zip -- create TDS.ZIP package for distribution"
+ @echo "make dist -- create distribution ZIP, ready for upload to CTAN"
+ @echo "make clean -- remove LaTeX auxiliary files"
+ @echo "make clean$(PKGSTYEXT) -- 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)
+
+# synonym of `sty` in case of LaTeX classes, we use same commands etc.
+cls: $(PKGSTY)
+
+$(PKGSTY): $(PKGINS) $(PKGDTX)
+ $(LATEX) $<
+
+cleansty:
+ @rm -f $(PKGSTY) $(ADDITIONAL_GENERATED_FILES)
+
+cleancls: cleansty
+
+
+# ------------------------------------------------
+# 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) $(ADDITIONAL_GENERATED_FILES) $(DESTDIR)$(PREFIX)/tex/latex/$(PKG)
+
+install_cls: install_sty
+
+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)
+
+# feedback from CTAN upload manager: prefer not to provide tds.zip in CTAN upload
+$(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) $(PKG) $(PKGTDSZIP)
+ cd $(DISTTMPDIR) && zip -r $(CURDIR)/$(PKGZIP) $(PKG)
+ rm -rf $(DISTTMPDIR)
+
+cleandist:
+ @rm -f $(PKGZIP)
Property changes on: trunk/Master/texmf-dist/source/latex/phfqit/pkg.mk
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty 2021-10-11 20:24:29 UTC (rev 60733)
+++ trunk/Master/texmf-dist/tex/latex/phfqit/phfqit.sty 2021-10-11 20:24:49 UTC (rev 60734)
@@ -22,10 +22,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{phfqit}
- [2017/08/16 v2.0 phfqit package]
+ [2021/10/08 v4.1 phfqit package]
\RequirePackage{calc}
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
+\RequirePackage{amssymb}
\RequirePackage{dsfont}
\RequirePackage{mathrsfs}
\RequirePackage{mathtools}
@@ -58,7 +59,13 @@
\operatorname{id}_{#1\notblank{#2}{\to #2}{}}%
\notblank{#3}{\expandafter\phfqitParens\phfqit at val@sizearg{#3}}{}%
}
-\def\ee^#1{e^{#1}} % we could imagine that in inlines, we replace this by exp()...
+\edef\phfqit at def@hat{\detokenize{^}}
+\expandafter\def\expandafter\phfqit at ee@gobblehat\phfqit at def@hat{%
+ \phfqitExpPowerExpression}
+\def\phfqitExpPowerExpression#1{e^{#1}}
+\def\ee#1{\expandafter\phfqit at ee@gobblehat\detokenize{#1}}
+\robustify\phfqitExpPowerExpression
+\robustify\ee
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\rank}{rank}
@@ -96,45 +103,19 @@
\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\uu(#1){\phfqitLieAlgebra{u}{#1}}
+\def\UU(#1){\phfqitLieGroup{U}{#1}}
+\def\su(#1){\phfqitLieAlgebra{su}{#1}}
+\def\SU(#1){\phfqitLieGroup{SU}{#1}}
+\def\so(#1){\phfqitLieAlgebra{so}{#1}}
+\def\SO(#1){\phfqitLieGroup{SO}{#1}}
+\def\slalg(#1){\phfqitLieAlgebra{sl}{#1}} % \sl is "slanted font" in TeX
+\def\SL(#1){\phfqitLieGroup{SL}{#1}}
+\def\GL(#1){\phfqitLieGroup{GL}{#1}}
+\def\SN(#1){\phfqitDiscreteGroup{S}{#1}}
+\newcommand\phfqitLieAlgebra[2]{\mathfrak{#1}({#2})}
+\newcommand\phfqitLieGroup[2]{\mathrm{#1}({#2})}
+\newcommand\phfqitDiscreteGroup[2]{\mathrm{#1}_{#2}}
\def\phfqit at parsesizearg#1{%
\begingroup%
\mathcode`\`="0060\relax%
@@ -155,6 +136,89 @@
\expandafter\phfqit at tmp@cont%
\fi%
}
+\def\phfqitDeclarePairedDelimiterXWithAltSizing{%
+ \phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing\DeclarePairedDelimiterX
+}
+\def\phfqitDeclarePairedDelimiterXPPWithAltSizing{%
+ \phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing\DeclarePairedDelimiterXPP
+}
+\def\phfqitDeclareMathtoolsPairedDelimiterCmdWithAltSizing#1#2{%
+ \begingroup
+ \escapechar=-1\relax
+ \xdef\phfqit at tmp@thecmd{%
+ \expandafter\noexpand\csname phfqit at paireddelim@def@\string#2\endcsname}%
+ \endgroup
+ \edef\x{%
+ \noexpand\phfqit at paireddelim@parsesizearg{\expandonce\phfqit at tmp@thecmd}%
+ }%
+ \expandafter\DeclareRobustCommand\expandafter#2\expandafter{\x}%
+ \expandafter#1\phfqit at tmp@thecmd
+}
+\def\phfqit at paireddelim@parsesizearg#1{%
+ \phfqit at parsesizearg{\expandafter#1\phfqit at val@sizearg}%
+}
+\def\phfqitKetsBarSpace{\mkern 1.5mu\relax}
+\def\phfqitKetsRLAngleSpace{\mkern -1.8mu\relax}
+\phfqitDeclarePairedDelimiterXWithAltSizing\ket[1]{\lvert}{\rangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\bra[1]{\langle}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\braket[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\ketbra[2]{\lvert}{\rvert}{%
+ {#1}\delimsize\rangle\phfqitKetsRLAngleSpace\delimsize\langle{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\proj[1]{\lvert}{\rvert}{%
+ {#1}\delimsize\rangle\phfqitKetsRLAngleSpace\delimsize\langle{#1}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\matrixel[3]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
+ \phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#3}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\dmatrixel[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#2}%
+ \phfqitKetsBarSpace\delimsize\vert\phfqitKetsBarSpace{#1}%
+}
+\def\phfqitKetsBeforeCommaSpace{}
+\def\phfqitKetsAfterCommaSpace{\mkern 1.5mu\relax}
+\phfqitDeclarePairedDelimiterXWithAltSizing\innerprod[2]{\langle}{\rangle}{%
+ {#1}\phfqitKetsBeforeCommaSpace,\phfqitKetsAfterCommaSpace{#2}%
+}
+\def\phfqitOKetsBarSpace{\phfqitKetsBarSpace}
+\def\phfqitOKetsRLAngleSpace{\phfqitKetsRLAngleSpace}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oket[1]{\lvert}{\rrangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\obra[1]{\llangle}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\obraket[2]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oketbra[2]{\lvert}{\rvert}{%
+ {#1}\delimsize\rrangle\phfqitOKetsRLAngleSpace\delimsize\llangle{#2}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\oproj[1]{\lvert}{\rvert}{%
+ {#1}\delimsize\rrangle\phfqitOKetsRLAngleSpace\delimsize\llangle{#1}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\omatrixel[3]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+ \phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#3}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\odmatrixel[2]{\llangle}{\rrangle}{%
+ {#1}\phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#2}%
+ \phfqitOKetsBarSpace\delimsize\vert\phfqitOKetsBarSpace{#1}%
+}
+\phfqitDeclarePairedDelimiterXWithAltSizing\abs[1]{\lvert}{\rvert}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\avg[1]{\langle}{\rangle}{{#1}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\norm[1]{\lVert}{\rVert}{{#1}}
+\def\phfqitDefineNorm#1#2#3{%
+ \phfqitDeclarePairedDelimiterXPPWithAltSizing#1[1]{#2}{\lVert}{\rVert}{#3}{{##1}}%
+}
+\def\phfqit at insideinterval#1#2{{#1\mathclose{},\mathopen{}#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalc[2]{[}{]}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalo[2]{]}{[}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervalco[2]{[}{[}{%
+ \phfqit at insideinterval{#1}{#2}}
+\phfqitDeclarePairedDelimiterXWithAltSizing\intervaloc[2]{]}{]}{%
+ \phfqit at insideinterval{#1}{#2}}
\DeclarePairedDelimiterX\phfqitParens[1]{(}{)}{#1}
\DeclarePairedDelimiterX\phfqitSquareBrackets[1]{[}{]}{#1}
\DeclarePairedDelimiterX\phfqitCurlyBrackets[1]{\{}{\}}{#1}
@@ -366,10 +430,19 @@
\DCohbase at tmp@toks=\expandafter{\the\DCohbase at tmp@toks#1}}%
\def\DCohbaseRenderContents#1#2#3#4{%
\DCohbase at tmp@toks={#2}%
- \notblank{#3#4}{%
+ \notblank{#3}{%
\DCohbase at addtoks\mathclose{}\,\delimsize\Vert\,\mathopen{}%
- #3\mathclose{},\mathopen{}#4\@DCohbase at END@ADD at TOKS%
- }{}%
+ #3\@DCohbase at END@ADD at TOKS%
+ \notblank{#4}{%
+ \DCohbase at addtoks\mathclose{},\mathopen{}%
+ #4\@DCohbase at END@ADD at TOKS%
+ }{}%
+ }{%
+ \notblank{#4}{%
+ \PackageWarning{phfqit}{Value `#4' ignored because previous parameter
+ was blank}%
+ }{}%
+ }
\edef\tmp at args{\unexpanded{#1}{\the\DCohbase at tmp@toks}}%
\expandafter\DCohbaseRenderContentsInnerParens\tmp at args%
}
@@ -390,6 +463,7 @@
prefix=phfqit at opt@
}
\DeclareStringOption[stdset]{qitobjdef}
+\DeclareBoolOption[true]{llanglefrommnsymbolfonts}
\DeclareBoolOption[true]{newReIm}
\ProcessKeyvalOptions*
\ifphfqit at opt@newReIm
@@ -396,6 +470,35 @@
\renewcommand{\Re}{\phfqit at Realpart}
\renewcommand{\Im}{\phfqit at Imagpart}
\fi
+\ifphfqit at opt@llanglefrommnsymbolfonts
+ \DeclareFontFamily{OMX}{MnSymbolE}{}
+ \DeclareSymbolFont{phfqit at MnLargeSymbols}{OMX}{MnSymbolE}{m}{n}
+ \SetSymbolFont{phfqit at MnLargeSymbols}{bold}{OMX}{MnSymbolE}{b}{n}
+ \DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
+ <-6> MnSymbolE5
+ <6-7> MnSymbolE6
+ <7-8> MnSymbolE7
+ <8-9> MnSymbolE8
+ <9-10> MnSymbolE9
+ <10-12> MnSymbolE10
+ <12-> MnSymbolE12
+ }{}
+ \DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
+ <-6> MnSymbolE-Bold5
+ <6-7> MnSymbolE-Bold6
+ <7-8> MnSymbolE-Bold7
+ <8-9> MnSymbolE-Bold8
+ <9-10> MnSymbolE-Bold9
+ <10-12> MnSymbolE-Bold10
+ <12-> MnSymbolE-Bold12
+ }{}
+ \let\llangle\@undefined
+ \let\rrangle\@undefined
+ \DeclareMathDelimiter{\llangle}{\mathopen}%
+ {phfqit at MnLargeSymbols}{'164}{phfqit at MnLargeSymbols}{'164}
+ \DeclareMathDelimiter{\rrangle}{\mathclose}%
+ {phfqit at MnLargeSymbols}{'171}{phfqit at MnLargeSymbols}{'171}
+\fi
\def\phfqit at tmp@str at none{none}
\def\phfqit at tmp@str at stdset{stdset}
\ifx\phfqit at opt@qitobjdef\phfqit at tmp@str at none%
@@ -412,6 +515,7 @@
\newcommand\Dmax[1][]{\Dbase{\DSym}_{\mathrm{max}}^{#1}}
\newcommand\Dr[1][]{\Dbase{\DSym}_{\mathrm{r}}^{#1}}
\newcommand\DHyp[1][\eta]{\Dbase{\DSym}_{\mathrm{H}}^{#1}}
+\newcommand\Dhyp[1][\eta]{\Dbase{\DSym}_{\mathrm{h}}^{#1}}
\DefineTunedQitObject{DCoh}{\DCohbaseParse}{\DCohbaseRender}{{\DCSym}}{}
\DefineTunedQitObject{DCohx}{\DCohbaseParse}{\DCohbaseRender}%
{{\DCSym}}{%
More information about the tex-live-commits
mailing list.