From 89df75aae9d25e94c83fbf99d633236815f26b0f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 2 Nov 2012 23:33:35 +0000 Subject: physics (2nov12) git-svn-id: svn://tug.org/texlive/trunk@28153 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/physics/README | 7 +- Master/texmf-dist/doc/latex/physics/physics.pdf | Bin 206120 -> 220722 bytes Master/texmf-dist/doc/latex/physics/physics.tex | 92 ++++++++++++++---------- 3 files changed, 58 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/doc/latex/physics') diff --git a/Master/texmf-dist/doc/latex/physics/README b/Master/texmf-dist/doc/latex/physics/README index a6eb7ea1521..8e4725a840e 100644 --- a/Master/texmf-dist/doc/latex/physics/README +++ b/Master/texmf-dist/doc/latex/physics/README @@ -1,8 +1,11 @@ README for physics.sty -physics 1.10 +physics 1.20 Created by Sergio C. de la Barrera -Updated October 11, 2012 +Updated October 31, 2012 + +E-mail comments and suggestions to: +physics.tex@gmail.com This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. diff --git a/Master/texmf-dist/doc/latex/physics/physics.pdf b/Master/texmf-dist/doc/latex/physics/physics.pdf index e8942cb454b..8e8061b9e0a 100644 Binary files a/Master/texmf-dist/doc/latex/physics/physics.pdf and b/Master/texmf-dist/doc/latex/physics/physics.pdf differ diff --git a/Master/texmf-dist/doc/latex/physics/physics.tex b/Master/texmf-dist/doc/latex/physics/physics.tex index 6a273fbac0f..5a634b1ee95 100644 --- a/Master/texmf-dist/doc/latex/physics/physics.tex +++ b/Master/texmf-dist/doc/latex/physics/physics.tex @@ -5,15 +5,18 @@ \usepackage[colorlinks,urlcolor=blue]{hyperref} \usepackage{array} \usepackage{longtable} +\usepackage{multirow} \newcommand\Vtextvisiblespace[1][.3em]{% \mbox{\kern.06em\vrule height.3ex}% \vbox{\hrule width#1}% \hbox{\vrule height.3ex}} -\begin{document} +% physics 1.20 \title{The \texttt{physics} package} \author{Sergio C. de la Barrera} + +\begin{document} \maketitle \tableofcontents @@ -43,18 +46,22 @@ To use the \texttt{physics} package, simply insert \verb|\usepackage{physics}| i & \verb|\qty[a+b]| $\rightarrow \qty[a+b]$ & automatic $\qty[\;]$ braces \\ & \verb|\qty| \!\!\texttt{|}\!\! \verb|a+b| \!\!\texttt{|} $\rightarrow \qty|a+b|$ & automatic $\qty|\;|$ braces \\ & \verb|\qty{a+b}| $\rightarrow \qty{a+b}$ & automatic $\qty{\;}$ braces \\ -& \verb|\qty\big{}| $\rightarrow \qty\big{}$ & manual sizing (works with any of the above bracket types) \\ +& \verb|\qty\big{}| $\rightarrow \qty\big{}$ & \multirow{2}{*}{\parbox{6cm}{manual sizing (works with any of the above bracket types)}} \\ & \verb|\qty\Big{}| $\rightarrow \qty\Big{}$ & \\ & \verb|\qty\bigg{}| $\rightarrow \qty\bigg{}$ & \\ & \verb|\qty\Bigg{}| $\rightarrow \qty\Bigg{}$ & \\ \verb|\absolutevalue| & \verb|\abs{a}| $\rightarrow \abs{a}$ & automatic sizing; equivalent to \verb|\qty| \!\!\texttt{|a|} \\ & \verb|\abs\Big{a}| $\rightarrow \abs\Big{a}$ & inherits manual sizing syntax from \verb|\qty| \\ \verb|\norm| & \verb|\norm{a}| $\rightarrow \norm{a}$ & automatic sizing \\ +& \verb|\norm\Big{a}| $\rightarrow \norm\Big{a}$ & manual sizing \\ +\verb|\evaluated| & \verb|\eval{x}_0^\infty| $\displaystyle\rightarrow \eval{x}_0^\infty$ & automatic right vertical bar for evaluation limits \\ +& \verb|\eval(x)_y| $\displaystyle\rightarrow \eval(x)_y$ & parenthetical form for holding values constant \\ \verb|\order| & \verb|\order{x^2}| $\rightarrow \order{x^2}$ & order symbol; automatic sizing and space handling \\ -\verb|\poissonbracket| & \verb|\pb{A}{B}| $\rightarrow \pb{A}{B}$ & same as \verb|\anticommutator| \\ +& \verb|\order\Big{x^2}| $\rightarrow \order\Big{x^2}$ & manual sizing \\ \verb|\commutator| & \verb|\comm{A}{B}| $\rightarrow \comm{A}{B}$ & automatic sizing \\ \verb|\anticommutator| & \verb|\acomm{A}{B}| $\rightarrow \acomm{A}{B}$ & same as \verb|\poissonbracket| \\ -& \verb|\acommutator{A}{B}| $\rightarrow \acommutator{A}{B}$ & +& \verb|\acommutator{A}{B}| $\rightarrow \acommutator{A}{B}$ & alternate name \\ +\verb|\poissonbracket| & \verb|\pb{A}{B}| $\rightarrow \pb{A}{B}$ & same as \verb|\anticommutator| \end{longtable} \subsection{Vector notation} @@ -70,18 +77,33 @@ To use the \texttt{physics} package, simply insert \verb|\usepackage{physics}| i & \verb|\cp| $\rightarrow \cp$ as in $\vb{a} \cp \vb{b}$ & alternate name \\ \verb|\vnabla| & \verb|\vnabla| $\rightarrow \vnabla$ versus $\nabla$ & low-level macro for bold version \\ \verb|\gradient| & \verb|\grad| $\rightarrow \grad$ & \\ -& \verb|\grad{\Psi}| $\rightarrow \grad{\Psi}$ & handles spacing \\ -& \verb|\grad*{\Psi+\Phi}| $\rightarrow \grad*{\Psi+\Phi}$ & long-form (handles spacing and brackets) \\ +& \verb|\grad{\Psi}| $\rightarrow \grad{\Psi}$ & default mode \\ +& \verb|\grad(\Psi+\Phi)| $\rightarrow \grad(\Psi+\Phi)$ & long-form (like \verb|\qty| but also handles spacing) \\ +& \verb|\grad[\Psi+\Phi]| $\rightarrow \grad[\Psi+\Phi]$ & \\ \verb|\divergence| & \verb|\div| $\rightarrow \div$ & note \texttt{amsmath} symbol $\divisionsymbol$ renamed \verb|\divisionsymbol| \\ -& \verb|\div{\vb{a}}| $\rightarrow \div{\vb{a}}$ & handles spacing \\ -& \verb|\div*{\vb{a}+\vb{b}}| $\rightarrow \div*{\vb{a}+\vb{b}}$ & long-form \\ +& \verb|\div{\vb{a}}| $\rightarrow \div{\vb{a}}$ & default mode \\ +& \verb|\div(\vb{a}+\vb{b})| $\rightarrow \div(\vb{a}+\vb{b})$ & long-form \\ +& \verb|\div[\vb{a}+\vb{b}]| $\rightarrow \div[\vb{a}+\vb{b}]$ & \\ \verb|\curl| & \verb|\curl| $\rightarrow \curl$ & \\ -& \verb|\curl{\vb{a}}| $\rightarrow \curl{\vb{a}}$ & handles spacing \\ -& \verb|\curl*{\vb{a}+\vb{b}}| $\rightarrow \curl*{\vb{a}+\vb{b}}$ & long-form +& \verb|\curl{\vb{a}}| $\rightarrow \curl{\vb{a}}$ & default mode \\ +& \verb|\curl(\vb{a}+\vb{b}})| $\rightarrow \curl(\vb{a}+\vb{b})$ & long-form \\ +& \verb|\curl[\vb{a}+\vb{b}]| $\rightarrow \curl[\vb{a}+\vb{b}]$ & \\ +\verb|\laplacian| & \verb|\laplacian| $\rightarrow \laplacian$ & \\ +& \verb|\laplacian{\Psi}| $\rightarrow \laplacian{\Psi}$ & default mode \\ +& \verb|\laplacian(\Psi+\Phi)| $\rightarrow \laplacian(\Psi+\Phi)$ & long-form \\ +& \verb|\laplacian[\Psi+\Phi]| $\rightarrow \laplacian[\Psi+\Phi]$ & \end{longtable} \subsection{Operators} -\begin{longtable}[l]{ l l p{6cm} } +The standard set of trig functions is redefined in \texttt{physics} to provide automatic braces that behave like \verb|\qty()|. In addition, an optional power argument is provided. The old definition of each trig function is stored in a long form version as in \verb|\sin| $\rightarrow$ \verb|\sine|, \verb|\cos| $\rightarrow$ \verb|\cosine|, and so on. +\begin{longtable}[l]{ l l p{8cm} } +\multicolumn{3}{l}{Trig redefinitions:} \\ +\verb|\sin| & \verb|\sin(x)| $\rightarrow \sin(x)$ & automatic braces; old \verb|\sin| renamed \verb|\sine| \\ +& \verb|\sin[2](x)| $\rightarrow \sin[2](x)$ & optional power \\ +\verb|\cos| & \verb|\cos(x)| $\rightarrow \cos(x)$ & works with all trig functions \\ +\verb|\tan| & \verb|\tan x| $\rightarrow \tan x$ & can still use without an argument \\ +$\quad\vdots$ & & $\qquad\vdots$ \\ +\multicolumn{3}{l}{New operators:} \\ \verb|\tr| & \verb|\tr\rho| $\rightarrow \tr\rho$ & trace \\ \verb|\rank| & \verb|\rank M| $\rightarrow \rank M$ & matrix rank \\ \verb|\erf| & \verb|\erf(x)|$\rightarrow \erf(x)$ & Gauss error function @@ -98,44 +120,37 @@ General text: & & \\ \begin{longtable}[l]{ l l } Special macros: & \\ \verb|\qcomma| or \verb|\qc| $\rightarrow ,$\Vtextvisiblespace[1em] & right \verb|\quad| only \\ +\verb|\qcc| $\rightarrow$\Vtextvisiblespace[1em]$\text{c.c.}$\Vtextvisiblespace[1em] & complex conjugate; left and right \verb|\quad| unless starred \verb|\qcc*| $\rightarrow \text{c.c.}$\Vtextvisiblespace[1em] \\ \verb|\qif| $\rightarrow$\Vtextvisiblespace[1em]$\text{if}$\Vtextvisiblespace[1em] & left and right \verb|\quad| unless starred \verb|\qif*| $\rightarrow \text{if}$\Vtextvisiblespace[1em] \\ -\verb|\qthen| & similar to \verb|\qif| \\ -\verb|\qelse| & $\quad\quad\cdot$ \\ -\verb|\qotherwise| & $\quad\quad\cdot$ \\ -\verb|\qunless| & $\quad\quad\cdot$ \\ -\verb|\qgiven| & \\ -\verb|\qusing| & \\ -\verb|\qfor| & \\ -\verb|\qall| & \\ -\verb|\qeven| & \\ -\verb|\qodd| & \\ -\verb|\qinteger| & \\ -\verb|\qand| & \\ -\verb|\qor| & \\ -\verb|\qas| & \\ -\verb|\qin| & \\ -\verb|\qcc| $\rightarrow \qcc$ & complex conjugate \\ +\end{longtable} +\begin{longtable}[l]{ l } +Similar to \verb|\qif|: \\ +\verb|\qthen|, \verb|\qelse|, \verb|\qotherwise|, \verb|\qunless|, \verb|\qgiven|, \verb|\qusing|, \verb|\qassume|, \verb|\qsince|, \\ +\verb|\qlet|, \verb|\qfor|, \verb|\qall|, \verb|\qeven|, \verb|\qodd|, \verb|\qinteger|, \verb|\qand|, \verb|\qor|, \verb|\qas|, \verb|\qin| \end{longtable} \subsection{Derivatives} \begin{longtable}[l]{ l l p{6cm} } \verb|\differential| & \verb|\dd| $\rightarrow \dd$ & \\ -& \verb|\dd x| $\rightarrow \dd x$ & no extra spacing for braces, fractions \\ +& \verb|\dd x| $\rightarrow \dd x$ & no spacing; use in braces, fractions \\ & \verb|\dd{x}| $\rightarrow \dd{x}$\!\textvisiblespace & proper spacing for typical equations \\ & \verb|\dd[3]{x}| $\rightarrow \dd[3]{x}$\!\textvisiblespace & optional power \\ -& \verb|\dd*{\cos\theta}| $\rightarrow \dd*{\cos\theta}$ & long-argument; automatic braces \\ -\verb|\derivative| & \verb|\dv{}{x}| $\displaystyle\rightarrow \dv{}{x}$ & \\ -& \verb|\dv{f}{x}| $\displaystyle\rightarrow \dv{f}{x}$ & \\ +& \verb|\dd(\cos\theta)| $\rightarrow \dd(\cos\theta)$ & long-form; automatic braces \\ +\verb|\derivative| & \verb|\dv{x}| $\displaystyle\rightarrow \dv{x}$ & one argument \\ +& \verb|\dv{f}{x}| $\displaystyle\rightarrow \dv{f}{x}$ & two arguments \\ & \verb|\dv[n]{f}{x}| $\displaystyle\rightarrow \dv[n]{f}{x}$ & optional power \\ -& \verb|\dv[n]{f}{x}[x=0]| $\displaystyle\rightarrow \dv[n]{f}{x}[x=0]$ & optional evaluation point \\ -\verb|\partialderivative| & \verb|\pderivative{}{x}| $\displaystyle\rightarrow \pderivative{}{x}$ & alternate name \\ -& \verb|\pdv{}{x}| $\displaystyle\rightarrow \pdv{}{x}$ & shorthand name \\ -& \verb|\pdv{f}{x}| $\displaystyle\rightarrow \pdv{f}{x}$ & \\ +& \verb|\dv{x}(x^2+x)| $\displaystyle\rightarrow \dv{x}(x^2+x)$ & long-form; automatic braces, spacing \\ +\verb|\partialderivative| & \verb|\pderivative{x}| $\displaystyle\rightarrow \pderivative{x}$ & alternate name \\ +& \verb|\pdv{x}| $\displaystyle\rightarrow \pdv{x}$ & shorthand name \\ +& \verb|\pdv{f}{x}| $\displaystyle\rightarrow \pdv{f}{x}$ & two arguments \\ & \verb|\pdv[n]{f}{x}| $\displaystyle\rightarrow \pdv[n]{f}{x}$ & optional power \\ -& \verb|\pdv[n]{f}{x}[x=0]| $\displaystyle\rightarrow \pdv[n]{f}{x}[x=0]$ & optional evaluation point \\ +& \verb|\pdv{x}(x+y)| $\displaystyle\rightarrow \pdv{x}(x+y)$ & long-form \\ & \verb|\pdv{f}{x}{y}| $\displaystyle\rightarrow \pdv{f}{x}{y}$ & mixed partial \\ -& \verb|\pdv*{f}{x}| $\rightarrow \pdv*{f}{x}$ & shorthand form \\ -& \verb|\pdv*{f}{x}{y}| $\rightarrow \pdv*{f}{x}{y}$ & mixed partial shorthand +\verb|\variation| & \verb|\var{F[g(x)]}| $\rightarrow \var{F[g(x)]}$ & functional variation (works like \verb|\dd|) \\ +& \verb|\var(E-TS)| $\rightarrow \var(E-TS)$ & long-form \\ +\verb|\functionalderivative| & \verb|\fdv{g}| $\displaystyle\rightarrow \fdv{g}$ & functional derivative (works like \verb|\dv|) \\ +& \verb|\fdv{F}{g}| $\displaystyle\rightarrow \fdv{F}{g}$ & \\ +& \verb|\fdv{V}(E-TS)| $\displaystyle\rightarrow \fdv{V}(E-TS)$ & long-form \end{longtable} \subsection{Dirac bra-ket notation} @@ -173,5 +188,4 @@ allowing the user to type out complicated quantum mechanical expressions without \verb|\matrixelement| & \verb|\matrixel{n}{A}{m}| $\rightarrow \matrixel{n}{A}{m}$ & requires all three arguments \\ & \verb|\mel{n}{A}{m}| $\rightarrow \mel{n}{A}{m}$ & shorthand name \\ \end{longtable} - \end{document} \ No newline at end of file -- cgit v1.2.3