From 99a672a8703b248c022f3413c848e5506258a704 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 2 Oct 2008 00:05:56 +0000 Subject: isomath update (1oct08) git-svn-id: svn://tug.org/texlive/trunk@10818 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/isomath/README | 78 --- Master/texmf-dist/doc/latex/isomath/README.html | 382 +++++++++++++ Master/texmf-dist/doc/latex/isomath/README.txt | 83 +++ .../texmf-dist/doc/latex/isomath/isomath-test.pdf | Bin 262731 -> 137429 bytes .../texmf-dist/doc/latex/isomath/isomath-test.tex | 215 ++++--- .../texmf-dist/doc/latex/isomath/isomath.sty.html | 426 +++++++------- .../texmf-dist/doc/latex/isomath/isomath.sty.pdf | Bin 0 -> 192005 bytes .../texmf-dist/doc/latex/isomath/isomath.sty.txt | 636 +++++++++++++++++++++ Master/texmf-dist/tex/latex/isomath/isomath.sty | 366 ++++++------ 9 files changed, 1638 insertions(+), 548 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/isomath/README create mode 100644 Master/texmf-dist/doc/latex/isomath/README.html create mode 100644 Master/texmf-dist/doc/latex/isomath/README.txt create mode 100644 Master/texmf-dist/doc/latex/isomath/isomath.sty.pdf create mode 100644 Master/texmf-dist/doc/latex/isomath/isomath.sty.txt diff --git a/Master/texmf-dist/doc/latex/isomath/README b/Master/texmf-dist/doc/latex/isomath/README deleted file mode 100644 index 06c65512985..00000000000 --- a/Master/texmf-dist/doc/latex/isomath/README +++ /dev/null @@ -1,78 +0,0 @@ -isomath.sty: Math layout for scientists -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Copyright © 2008 Günter Milde -Released under the terms of the GNU General Public License -(v. 2 or later) - -Abstract -======== - -The isomath package enables formatting Greek and Latin letters as symbols -for vectors, matrices, and tensors in the typefaces recommended for -scientific papers by the International Standard ISO 31. - - -Features -======== - -* Re-define Greek letters as \mathalpha, taking them from the "letters" - symbol fonts. - -* The macros \vectorsym, \matrixsym, and \tensorsym select an - ISO-conforming typeface. - -* For this, new math alphabets are defined: - - \mathbold: for *boldface italic* (vector and matrix symbols), - \mathsans: for *sans-serif italic* , - \mathboldsans: for *sans-serif bold italic* (tensor symbols). - - -Requirements -============ - -This package builds on and extends fixmath.sty by Walter Schmidt. -It also requires ifthen.sty and kvoptions.sty. - -The cmbright package is recommended for \mathsans and \mathboldsans -matching with Computer Modern and derivatives. - - -Installation -============ - -Copy isomath.sty to a suitable place in your TDS and make sure LaTeX can -find it. - -Optionally, copy the documentation to a place where texdoc can find it. - -Usage -===== - -* \usepackage{isomath} - - In many cases (when \sfdefault expands to "cmss"), the \mathboldsans - alphabet is neither bold nor sans, as "cmss" has no OML encoded - variants and maps to "cmmi". - -* Use cmbright for the sans-serif math alphabets:: - - \usepackage[sfdefault=cmbr]{isomath} - -* Redefine the standard \vec macro to typeset its argument in `bold - italic`:: - - \usepackage[sfdefault=cmbr]{isomath} - \renewcommand{\vec}{\vectorsym} - -* The mathdesign package comes with an OML encoded bold roman font but does - not use it for \mathbf in the default setting. With :: - - \usepackage[charter]{mathdesign} - \usepackage[OMLmathbf,sfdefault=cmbr]{isomath} - - \mathbf{\pi} works as expected. - - -2008-09-25 diff --git a/Master/texmf-dist/doc/latex/isomath/README.html b/Master/texmf-dist/doc/latex/isomath/README.html new file mode 100644 index 00000000000..a965f58f931 --- /dev/null +++ b/Master/texmf-dist/doc/latex/isomath/README.html @@ -0,0 +1,382 @@ + + + + + + +isomath: Math for scientists + + + + + +
+

isomath: Math for scientists

+ +++ + + + + + + + +
Date:2008-09-26
Copyright:© 2008 Günter Milde <milde@users.berlios.de>
Licence:Released under the terms of the GNU General Public License +(v. 2 or later)
+
+

Abstract

+

The isomath package enables formatting Greek and Latin +letters as symbols for vectors, matrices, and tensors +in the typefaces recommended for scientific papers +by the International Standard ISO 31. +For this, a bold italic and a sans-serif bold italic +math alphabet are defined.

+
+
+

Files

+ +++ + + + + + + + + + + + + + + + + + +
README.txt:Requirements, Installation, Usage
README.html:browser friendly README
isomath.sty:isomath LaTeX package
isomath.sty.txt:Documentation (source)
isomath.sty.html:Documentation (HTML)
isomath.sty.pdf:Documentation (PDF)
isomath-test.tex:Test example (source)
isomath-test.pdf:Test example (PDF output)
+

The bidirectional text <-> code converter PyLit can convert between +isomath.sty and isomath.sty.txt.

+

The Python docutils and pdflatex were used to generate the HTML and PDF +documentation.

+
+
+

Requirements

+

This package builds on and extends fixmath by Walter Schmidt. +It also requires kvoptions.

+

The cmbright package is recommended for sans-serif italic and sans-serif +bold italic fonts matching with Computer Modern and derivatives.

+

All required packages are part of TeXLive and MikTeX.

+
+
+

Installation

+
    +
  • Unpack isomath.zip (preferabely in a TDS documentation folder).
  • +
  • Make sure LaTeX can find isomath.sty:
      +
    • Copy/Move it to a suitable place in the TDS and run texhash,
    • +
    • or place it in the current working directory (e.g. for testing).
    • +
    +
  • +
+
+
+

Usage Example

+

Use cmbright for the sans-serif math alphabets and redefine the +\vec macro to typeset its argument in bold italic:

+
+\usepackage[sfdefault=cmbr]{isomath}
+\renewcommand{\vec}{\vectorsym}
+
+

More examples and usage hints are in the literate source and documentation +files.

+ + + + + + +
[typefaces]Typefaces for Symbols in Scientific Manuscripts: +http://physics.nist.gov/Document/typefaces.pdf
+
+
+ + diff --git a/Master/texmf-dist/doc/latex/isomath/README.txt b/Master/texmf-dist/doc/latex/isomath/README.txt new file mode 100644 index 00000000000..0c83147af4f --- /dev/null +++ b/Master/texmf-dist/doc/latex/isomath/README.txt @@ -0,0 +1,83 @@ +isomath: Math for scientists +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:Date: 2008-09-26 +:Copyright: © 2008 Günter Milde +:Licence: Released under the terms of the GNU General Public License + (v. 2 or later) +:Abstract: The isomath package enables formatting Greek and Latin + letters as symbols for vectors, matrices, and tensors + in the typefaces recommended for scientific papers + by the International Standard ISO 31. + For this, a *bold italic* and a *sans-serif bold italic* + math alphabet are defined. + +Files +===== + +:README.txt: Requirements, Installation, Usage +:README.html: browser friendly README + +:isomath.sty: isomath LaTeX package +:isomath.sty.txt: Documentation (source) +:isomath.sty.html: Documentation (HTML) +:isomath.sty.pdf: Documentation (PDF) + +:isomath-test.tex: Test example (source) +:isomath-test.pdf: Test example (PDF output) + +The bidirectional text <-> code converter PyLit_ can convert between +``isomath.sty`` and ``isomath.sty.txt``. + +The Python docutils_ and pdflatex were used to generate the HTML and PDF +documentation. + + +Requirements +============ + +This package builds on and extends fixmath_ by Walter Schmidt. +It also requires kvoptions_. + +The cmbright_ package is recommended for *sans-serif italic* and *sans-serif +bold italic* fonts matching with Computer Modern and derivatives. + +All required packages are part of TeXLive and MikTeX. + +Installation +============ + +* Unpack isomath.zip (preferabely in a TDS documentation folder). + +* Make sure LaTeX can find isomath.sty: + + + Copy/Move it to a suitable place in the TDS and run texhash, + + or place it in the current working directory (e.g. for testing). + + +Usage Example +============= + +Use cmbright for the sans-serif math alphabets and redefine the +``\vec`` macro to typeset its argument in *bold italic*:: + + \usepackage[sfdefault=cmbr]{isomath} + \renewcommand{\vec}{\vectorsym} + +More examples and usage hints are in the literate source and documentation +files. + + +.. References + ========== + +.. [typefaces] `Typefaces for Symbols in Scientific Manuscripts`: + http://physics.nist.gov/Document/typefaces.pdf + +.. _pylit: http://pylit.berlios.de +.. _reStructured Text: http://docutils.sourceforge.net/rst.html +.. _docutils: http://docutils.sourceforge.net/rst.html + +.. _cmbright: http://dante.ctan.org/CTAN/help/Catalogue/entries/cmbright.html +.. _fixmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/fixmath.html +.. _kvoptions: http://dante.ctan.org/CTAN/help/Catalogue/entries/kvoptions.html diff --git a/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf b/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf index 5cdbfc2f5d4..02656102374 100644 Binary files a/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf and b/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf differ diff --git a/Master/texmf-dist/doc/latex/isomath/isomath-test.tex b/Master/texmf-dist/doc/latex/isomath/isomath-test.tex index a9b18932979..a4ce766ae2d 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath-test.tex +++ b/Master/texmf-dist/doc/latex/isomath/isomath-test.tex @@ -1,92 +1,147 @@ -%% LyX 1.5.5 created this file. For more info, see http://www.lyx.org/. -%% Do not edit unless you really know what you are doing. -\documentclass[a4paper,british]{scrartcl} +% isomath-test.tex: test and template for isomath.sty +% =================================================== +% +% Copyright © 2008 Günter Milde +% Released under the terms of the GNU General Public License (v. 2 or later) +% +% General settings +% ---------------- +% :: + +\documentclass[a4paper,english]{article} +\usepackage[LGR,T1]{fontenc} % \usepackage[T1]{fontenc} -% \usepackage[latin1]{inputenc} +% \usepackage[utf8]{inputenc} \pagestyle{empty} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. - -% Load a font package: - -% \usepackage{ae} -% \usepackage{anttor} -% \usepackage{arev} % normal and sans identic -% \usepackage{beton} % bitmap fonts -% \usepackage{concmath} -% \usepackage{cmbright} % keeps \mathrm and \mathbf as CM (roman) -\usepackage{fourier} -% \usepackage[LGR,T1]{fontenc}\usepackage[default]{gfsneohellenic} % no bold -% \usepackage{hfoldsty} % bitmap fonts -% \usepackage{iwona} % uses cmss --- cmbr is bad match -% \usepackage{kpfonts} % too many math alphabets used in version normal -% \usepackage{kerkis} % no bold math, no sans serif (choose iwona or arev?) -% \usepackage{lmodern} -% \usepackage{lucidabr} % commercial, subset free as bitmap -% \usepackage{lxfonts} % normal and sans identic, no \mathbold -%% mathdesign: % cmbr too light (bold ok) -%% % too many math alphabets without keepMathAlphabets -% \usepackage[charter]{mathdesign} % bitmap? -% \usepackage[garamond]{mathdesign} % bitmap? -% \usepackage[utopia]{mathdesign} % bitmap? -% \usepackage{mbtimes} -% \usepackage{gfsneohellenic} -% \usepackage{mathpazo} % -% \usepackage{pxfonts} % too many math alphabets used in version normal -% \usepackage{tgpagella}\usepackage{qpxmath} % cmbr too light (bold ok) -% \usepackage{tgtermes}\usepackage{qtxmath} % cmbr too light (bold ok) -% \usepackage{txfonts} % too many math alphabets used in version normal -% \usepackage{zefonts} % CM based - - -% load the isomath package with (or without) options -% -------------------------------------------------- - -\newcommand{\options}{} -% \renewcommand{\options}{omlMathalphabets} -% \renewcommand{\options}{reuseMathalphabets} -% \renewcommand{\options}{sfdefault=iwona} % with Iwona sans -% \renewcommand{\options}{sfdefault=zavm} % with Arew sans (larger than normal) -% \renewcommand{\options}{sfdefault=llcmm} % with LX sans (doesn't work) - -\usepackage[\options]{isomath} - - -% re-define \vec to comply with ISO 31:: -\renewcommand{\vec}{\vectorsym} - -\usepackage{babel} +% Customisation +% ------------------- +% +% Font packages: Uncomment the package you want to test +% (cmss maps to roman for italic and bold-italic OML version) :: + +\newcommand*{\fontpackage}{} +\renewcommand*{\fontpackage}{% +% ae% \sfdefault is cmss (use cmbr) +% anttor% \sfdefault is cmss (use iwona) +% arev% normal and sans identic (also in math) +% beton% bitmap fonts +% concmath% +% cmbright% keeps \mathrm and \mathbf as CM (roman) +% fourier% incompatible (uses private font encoding) +% gfsneohellenic% (use option [default]) no bold +% hfoldsty% bitmap fonts +% iwona% sets cmss as sans font (use iwona) +% kpfonts% no sans serif italic, needs reuseMathalphabets +% kerkis% no bold math, no sans serif (use iwona or arev?) +% cmlgc% \sfdefault is cmss (use cmbr) +% lmodern% \sfdefault is cmss (use cmbr) +% lucidabr% commercial, subset (no math) free as bitmap +% lxfonts% normal and sans identic, +mathdesign% \sfdefault is cmss (use cmbr?) provides roman and roman bold in OML :-) +% mbtimes% \sfdefault is cmss (use cmbr?) +% mathpazo% \sfdefault is cmss (use cmbr?) +% pxfonts% needs reuseMathalphabets, no sans-serif +% tgpagella,qpxmath% \sfdefault is cmss (use cmbr?) +% tgtermes,qtxmath% \sfdefault is cmss (use cmbr?) +% txfonts% no sans-serif +% zefonts% use with sfdefault=cmbr +} + +% Options +% ------- +% :: + +% Options for the font package call: +\newcommand*{\fontpackageoptions}{} +\renewcommand*{\fontpackageoptions}{% +% default% {gfsneohellenic} +% charter% {mathdesign} % +% garamond% {mathdesign} % no (free) bold, \sfdefault is cmss (use cmbr?) +utopia% {mathdesign} % \sfdefault is cmss (use cmbr?) +} + +% Options for +\newcommand*{\isomathoptions}{} +\renewcommand*{\isomathoptions}{% +% reuseMathalphabets% +% OMLmathsans% +OMLmathsans,OMLmathbf,sfdefault=cmbr% +% OMLmathsans,sfdefault=cmbr% CM-Bright +% OMLmathsans,sfdefault=iwona% Iwona sans +% sfdefault=zavm% Arew sans (larger than normal) +% sfdefault=llcmm% LX sans (larger than normal) +} + +% Load customisable packages +% -------------------------- +% :: + +\usepackage[\fontpackageoptions]{\fontpackage} + +\usepackage[\isomathoptions]{isomath} + +% Re-define \vec to comply with ISO 31:: + +\renewcommand*{\vec}{\vectorsym} + +% Fall-back definition for \mathsans:: +\providecommand*{\mathsans}[1]% +{mathsans\ not\ defined,\ use\ \mathtt{OMLmathsans}\ option} + + +% Now print a test sheet:: + \begin{document} \section{Test the isomath Package} -\makeatletter +Fontpackage: [\fontpackageoptions]\{\fontpackage\}\\ +Isomath called with options: [\isomathoptions]\\ Default font families: - serif \texttt{\rmdefault}, - sans-serif \texttt{\sfdefault}, - isomath-serif \texttt{\isomath@rmdefault}, - isomath-sf \texttt{\isomath@sfdefault}. -\makeatother +\begin{tabular}[t]{rlrl} + serif & \texttt{\rmdefault} & sans-serif & \texttt{\sfdefault} \\ + isomath-serif & \makeatletter \texttt{\isomath@rmdefault} \makeatother + & + isomath-sf &\makeatletter \texttt{\isomath@sfdefault} \makeatother + \\ +\end{tabular} + \subsection{Math alphabets} -The math alphabets should work with greek letters too (thus access -to upright greek is possible for both, small and capital letters). -If there are ligatures (ff, fi, ...) instead of small Greek letters -in a math alphabet, it uses T1 or OT1 encoding instead of OML. \begin{eqnarray*} -\mbox{mathnormal} & & a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega\\ -\mbox{mathit} & & \mathit{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}\\ -\mbox{mathrm} & & \mathrm{\mathrm{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}}\\ -\mbox{mathbf} & & \mathbf{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}\\ -\mbox{mathsf} & & \mathsf{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}\\ -\mbox{mathtt} & & \mathtt{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega} +If there are ligatures (ff, fi, ...) instead of small Greek letters in a +math alphabet, T1 or OT1 encoding is used instead of OML. + +% Define a teststring with Latin and Greek letters +\newcommand{\teststring}{% +% capital Latin letters +A,B,C, +% capital Greek letters +\Gamma,\Delta,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega, +% small Greek letters +\alpha,\beta,\nu,\omega, +% small Latin letters: +% compare \nu, \omega, v, and w +v,w, +% is there a true italic form of a and g? +a,g, +} + +\begin{eqnarray*} +\mbox{mathnormal} & & \teststring \\ +\mbox{mathit} & & \mathit{\teststring}\\ +\mbox{mathrm} & & \mathrm{\teststring}\\ +\mbox{mathbf} & & \mathbf{\teststring}\\ +\mbox{mathsf} & & \mathsf{\teststring}\\ +\mbox{mathtt} & & \mathtt{\teststring} \end{eqnarray*} - New alphabets are defined for italic-bold, italic-sans, and italic-sans-bold. + New alphabets bold-italic, sans-serif-italic, and sans-serif-bold-italic. \begin{eqnarray*} -\mbox{mathbold} & & \mathbold{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}\\ -\mbox{mathsans} & & \mathsans{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega}\\ -\mbox{mathboldsans} & & \mathboldsans{a,g,v,w,z,A,B,\Gamma,\Delta,E,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega,\alpha,\beta,\nu,\omega} +\mbox{mathbold} & & \mathbold{\teststring}\\ +\mbox{mathsans} & & \mathsans{\teststring}\\ +\mbox{mathboldsans} & & \mathboldsans{\teststring} \end{eqnarray*} @@ -107,9 +162,13 @@ vector $\vec{F}$ or the electrical field $\vec{E}$.% \subsection{Tensor symbols} -Symbols for tensors are sans-serif bold italic, \begin{eqnarray*} -\tensorsym{\alpha} & = & \tensorsym{e}\cdot\tensorsym{a}.\\ -\alpha_{ijl} & = & e_{ijk}\cdot a_{kl}\end{eqnarray*} +Symbols for tensors are sans-serif bold italic, + +\[ + \tensorsym{\alpha} = \tensorsym{e}\cdot\tensorsym{a} + \quad \Longleftrightarrow \quad + \alpha_{ijl} = e_{ijk}\cdot a_{kl}. +\] The permittivity tensor describes the coupling of electric field and diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.html b/Master/texmf-dist/doc/latex/isomath/isomath.sty.html index 9dbe56f1413..87bbd7ff324 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.sty.html +++ b/Master/texmf-dist/doc/latex/isomath/isomath.sty.html @@ -4,8 +4,8 @@ -isomath.sty: Math for scientists - +isomath: Math for scientists + -
-

isomath.sty: Math for scientists

+
+

isomath: Math for scientists

- + + +
Copyright:© 2008 Günter Milde, -Released under the terms of the GNU General Public License -(v. 2 or later)
© 2008 Günter Milde
Licence:Released under the terms of the GNU General Public License +(version 2 or later).

Abstract

-

The isomath package enables formatting Greek and Latin letters -as symbols for vectors, matrices, and tensors in the typefaces -recommended for scientific papers by the International -Standard ISO 31.

+

The isomath package enables formatting Greek and Latin +letters as symbols for vectors, matrices, and tensors +in the typefaces recommended for scientific papers +by the International Standard ISO 31. For this, a bold italic +and a sans-serif bold italic math alphabet are defined.

Introduction

Motivation

+

Scientific organisations like IUPAP, IUPAC, NIST, BIPM, and others -recommend typesetting math according to International Standard ISO 31 -Quantities and units (ISO 31-0:1992 to ISO 31-14:1992).[1]

- - - - - -
[1]A summary of these rules is free available [typefaces]. See also -[symbol-fonts] and [SI-brochure].
+recommend typesetting math according to International Standard ISO 31 +Quantities and units (ISO 31-0:1992 to ISO 31-14:1992).1

The traditional LaTeX-style deviates in some points from this rules:

  • The \vec command produces an array accent, while ISO 31 recommends -a bold italic typeface for vector symbols.
  • +a bold italic typeface for vector symbols.
  • Greek letters are excluded from font changes with the math alphabets, while the ISO 31 rules apply equally to letters from both the Greek and the Latin alphabet.
  • -
  • There is no provision for typesetting of Greek letters in bold italic +
  • There is no provision for typesetting of Greek letters in bold italic style recommended for vectors (even though the required fonts are available).
  • -
  • There is no provision for typesetting letters in sans-serif bold italic +
  • There is no provision for typesetting letters in sans-serif bold italic recommended for typesetting tensor symbols.
+

Also, the Unicode Standard defines the block mathematical alphanumeric +symbolsTo be used for mathematical variables where style variations +are important semantically — which contains Latin and Greek letters in +bold, italic, bold italic, sans-serif bold, and sans-serif bold italic +typeface.2

Some of these points are already adressed by related packages, however there is currently no package (known to the author) that defines the sans-serif bold italic math alphabet needed for tensor symbols.

+ + + + + +
[1]A summary of these rules is free available [typefaces]. See also +[fonts-for-symbols] and [SI-brochure].
+ + + + + +
[2]Plus Number variants and Latin letters in script, bold script, +fraktur, bold fraktur, double-struck, sans-serif and monospace; +alltogether 1023 codepoints.

Features

@@ -399,21 +417,28 @@ math alphabet is used.
  • Upright Greek letters are available through the \mathrm and \mathbf alphabets, if the corresponding fonts are OML encoded.
  • +
    +
    Caution: small Greek letters in a math alphabet command can lead to garbage.
    +

    Use the options for OML math alphabets (if the used font supports the +OML font encoding) or place Greek letters outside the math alphabet +command. Some packages (including fixmath) provide \up* or +\var* macros for upright Greek letters, e.g. \mathrm{k}\upOmega.

    +
    +
  • The command aliases \vectorsym, \matrixsym, and \tensorsym -select an ISO-conforming typeface.

    +allow semantic markup selecting an ISO-conforming typeface.

  • -
  • For this, new math alphabets are defined:

    +
  • For this, new math alphabets are defined:

    - + - + - +
    \mathbold:for boldface italic (vector and matrix -symbols),
    \mathbold:boldface italic (vector and matrix symbols),
    \mathsans:for sans-serif italic ,
    \mathsans:sans-serif italic (optional),
    \mathboldsans:for sans-serif bold italic (tensor symbols).
    \mathboldsans:sans-serif bold italic (tensor symbols).
    @@ -421,33 +446,19 @@ symbols), \rmdefault and \sfdefault values. The rmdefault=<family> and sfdefault=<family> options can be used to override the defaults.

  • -
  • Font mappings are defined for families which have an OML encoded -counterpart but miss the substitution definition.

    +
  • Missing font mappings are defined for font families which have an OML +encoded counterpart but miss the substitution definition in their *.fd +files.

  • - -
    -

    Caution!

    -

    Using small Greek letters in a math alphabet command (e.g. -\mathrm{\pi}) can lead to garbage.

    -

    You can use the OML math* options (if the used font supports the -OML font encoding) or place the Greek letter outside the math -alphabet command. Some packages (including fixmath) provide \up* -or \var* macros for upright Greek letters, e.g. -\mathrm{k}\upOmega.

    -

    Examples

      -
    • \usepackage{isomath}

      -

      In many cases (when \sfdefault expands to "cmss"), the +

    • In many cases (e.g. when \sfdefault expands to "cmss"), the \mathboldsans alphabet is neither bold nor sans, as "cmss" has no OML encoded variants and maps to "cmmi".

      -
    • -
    • Use cmbright for the sans-serif math alphabets:

      +

      Use cmbright for sans-serif math alphabets:

       \usepackage[sfdefault=cmbr]{isomath}
       
      @@ -459,13 +470,13 @@ italic:

      \renewcommand{\vec}{\vectorsym}
    • -
    • The mathdesign package comes with an OML encoded bold roman font but does -not use it for \mathbf in the default setting. With

      +
    • The mathdesign package provides an OML encoded bold roman font but does +not set it up for \mathbf:

       \usepackage[charter]{mathdesign}
       \usepackage[OMLmathbf,sfdefault=cmbr]{isomath}
       
      -

      \mathbf{\pi} works as expected.

      +

      Now, \mathbf{\pi} works as expected.

    @@ -499,14 +510,7 @@ math alphabets and can only be combined with

    OML font encoding

    -

    If a math alphabet shall support both, Greek and Latin letters, it must use -the OML font encoding — no other established encoding provides Latin and -Greek letters in one font:

    -
      -
    • LGR is Greek-only,
    • -
    • T7 is just a "reserved name" for a standard Greek encoding.
    • -
    -

    The LaTeX font encodings guide [encguide] defines:

    +

    The LaTeX font encodings guide [encguide] defines:

    The OML encoding contains italic Latin and Greek letters for use in mathematical formulas (typically used for variables) together with some @@ -523,13 +527,19 @@ alphabets in roman {n} as well as italic {it} shape without conflicts.
  • A more suitable public name would be TeX math letters or Original/Old Math Letters. The latter would also explain the acronym OML.
  • +

    The OML font encoding is the only established encoding providing +Latin and Greek letters in one font:

    +
      +
    • LGR is Greek-only,
    • +
    • T7 is just a "reserved name" for a standard Greek encoding.
    • +

    Unfortunately, support for the OML encoding is missing for many font families even if the base font contains all Greek letters. Supported font families can be found searching for oml*.fd files and by grepping for "DeclareFont.*OML", "SymbolFont.*OML" and "MathAlphabet.*OML" in *.sty files.

    - - +
    Table 1: Fonts supporting the OML font encoding
    +@@ -799,7 +809,7 @@ supporting {m}{n} or {bx}{n} here.

    The following fonts define cmm as OML substitution. A better matching substitution can be set with the rmdefault option.

    Fonts supporting the OML font encoding
    - +@@ -913,16 +923,8 @@ the font family below.)

    \RequirePackage{fixmath} -
    -

    ifthen

    -

    The standard LaTeX package ifthen provides the commands \ifthenelse, -and \whiledo.

    -
    -\RequirePackage{ifthen}
    -
    -
    -

    kvoptions

    +

    kvoptions

    The kvoptions package in the oberdiek bundle facilitates the setup of package options and provides a key=value interface (based on keyval):

    @@ -931,10 +933,10 @@ package options and provides a key=value interface (based on 
    -

    Options

    +

    Options

    -

    rmdefault

    -

    Alternative math font family name for roman. The default is to use the +

    rmdefault

    +

    Alternative family for roman math fonts. The default is to use the corresponding text font family (\rmdefault) in OMS encoding. Table 2 lists some fonts where a different setting is advised.

    @@ -942,59 +944,62 @@ corresponding text font family (\
     
    -

    sfdefault

    -

    Alternative math font family name for sans-serif. The default is to use the +

    sfdefault

    +

    Alternative family for sans-serif math fonts. The default is to use the corresponding text font family (\sfdefault) in OMS encoding.

    -

    Computer Modern Sans Serif (cmss) has no italic and bold variants in OMS -encoding. Nor have many derivatives (lmss, aess, ...). -Actually, there are only a few OML-encoded sans-serif fonts (all -slanted/italic):

    +

    Computer Modern Sans Serif (cmss) has no OMS encoded variant. Nor have many +derivatives (lmss, aess, ...). Actually, there are only a few OML-encoded +sans-serif fonts (all slanted/italic):

    Table 2: Non-CM fonts with cmm as OML substitutionNon-CM fonts with cmm as OML substitution
    - + - + - +
    zavm:arev (Vera Sans with math extension)
    zavm:arev (Vera Sans with math extension, large x-hight)
    cmbr:cmbright (Computer Modern Bright, slightly lighter than cmss)
    iwona:iwona (Humanistic Sans Serif)
    iwona:iwona (Humanistic Sans Serif, some shapes very similar to roman)
    hvm:hvmath (Helvetica Math, commercial, free bitmap version)
    llcmm:lxfonts (LX Fonts, very wide and quite eccentric, new in 2008)
    llcmm:lxfonts (LX Fonts, very wide, excentric, large x-hight, new in 2008)
    -

    For many fonts (especially CM and related), [sfdefault=cmbr] is the +

    For most fonts (especially CM and related), [sfdefault=cmbr] is the recommended setting.

     \DeclareStringOption[\sfdefault]{sfdefault}
     
    +
    +
    TODO
    +
    Allow scaling?
    +
    -

    reuseMathalphabets

    -

    The definition of new math alphabets can lead to a "too many math +

    reuseMathalphabets

    +

    The definition of new math alphabets can lead to a "too many math alphabets used in version normal" error.

    As a workaround, this option tells isomath to re-use the existing -\mathbf and \mathsf alphabets for italic bold and sans-serif.

    +\mathbf and \mathsf alphabets for italic bold and sans-serif bold.

    To access the upright shapes, the corresponding \textbf and \textsf -command can be used (remember that this toggles the math-mode off and might -use a different font).

    -

    Both standard and new math alphabets are in upright shape, if this option -is combined with the corresponding OML math* option.

    +commands might be used (however, that this toggles the math-mode off and +might use a different font).

     \DeclareBoolOption{reuseMathalphabets}
     
    +

    Caution: Do not use reuseMathalphabets together with OMLmathbf or +OMLmathsf.

    -
    -

    OML math*

    -

    These options cause isomath to redefine standard alphabets in OML +

    +

    OML math alphabets

    +

    The following options cause isomath to (re)define math alphabets in OML encoding.

    With Greek letters defined as \mathalpha, the math alphabets are -expected to be in OML font encoding. OT1 encoded fonts have ligatures and -non-alpha symbols in place of the small Greek letters.

    +expected to be in OML font encoding as OT1 encoded fonts have ligatures +and non-alpha symbols in place of the small Greek letters.

    Setting these options enables access to small Greek letters in different -shapes with e.g. \mathrm{\pi}. +shapes with e.g. \mathrm{\pi} if an OML encoded font is available. Currently, support for the OML font encoding is rather limited:

    • only the mathdesign fonts support bold roman in OML encoding, while
    • @@ -1007,6 +1012,7 @@ used in version normal" error.

      \DeclareBoolOption{OMLmathrm} \DeclareBoolOption{OMLmathbf} \DeclareBoolOption{OMLmathsf} +\DeclareBoolOption{OMLmathsans} \DeclareBoolOption{OMLmathtt}
      @@ -1017,66 +1023,82 @@ used in version normal" error.

    -

    Declarations

    -
    -

    New math alphabets

    -

    The italic bold math alphabet is named \mathbold in related -packages. For letters, this is the same as the bold version of -\mathnormal. With the reuseMathalphabets option, \mathfb is -redefined and \mathbold made an alias (overwriting existing -definitions).

    +

    Declarations

    +
    +

    Math alphabets

    +

    In math, LaTeX uses "absolute" fontnames instead of a selection by family, +shape, and weight (see the [fntguide] for the rationale).

    +

    We define a math alphabet for every required font variant and optionally +re-define the standard math alphabets in OML font encoding. +Unfortunately, the number of math alphabets in one math version is limited +to 16, so we have to be carefull not to exceed this.

    +
    +

    mathbold

    +

    For the `italic bold math alphabet we use the name \mathbold +established in related packages. With the reuseMathalphabets option, +\mathfb is redefined and \mathbold made an alias (overwriting +existing definitions).

    -\ifthenelse{\boolean{isomath@reuseMathalphabets}}
    -{
    +\ifisomath@reuseMathalphabets
       \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it}
       \def\mathbold{\mathbf}
    -}
    -{
    +\else
       \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it}
    -}
    +\fi
     
    -

    For italic sans-serif, we either redefine \mathsf (with -reuseMathalphabets) or, in analogy to \mathbold, we define the new -alphabet \mathsans:

    +
    +
    +

    mathsans

    +

    For italic sans-serif, we define a new alphabet named \mathsans (in +analogy to \mathbold). As this typeface is not required by ISO 31, it is +only defined if the OMLmathsans option is set:

    -\ifthenelse{\boolean{isomath@reuseMathalphabets}}
    -{
    -  \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{m}{it}
    -  \def\mathsans{\mathsf}
    -}
    -{
    +\ifisomath@OMLmathsans
       \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it}
    -}
    +\fi
     
    -

    A sans serif slanted bold alphabet is needed for the tensor -symbols. As there is no standard math alphabet to re-use, we define the new -alphabet \mathboldsans:

    +
    +
    +

    mathboldsans

    +

    A sans serif slanted bold alphabet is needed for tensor symbols. With the +reuseMathalphabets option, \mathsf is redefined and \mathboldsans +made an alias:

    -\DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it}
    +\ifisomath@reuseMathalphabets
    +  \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it}
    +  \def\mathboldsans{\mathsf}
    +\else
    +  \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it}
    +\fi
     
    -

    Redefine standard alphabets

    +

    Redefine standard alphabets

    Redefine standard alphabets in OML font encoding -(if the corresponding OML math* option is true).

    +(if the corresponding OML math alphabets option is true).

    -\ifthenelse{\boolean{isomath@OMLmathrm}}
    -{\SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n}}{}
    -\ifthenelse{\boolean{isomath@OMLmathbf}}
    -{\SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n}}{}
    -\ifthenelse{\boolean{isomath@OMLmathbf}}
    -{\SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n}}{}
    -\ifthenelse{\boolean{isomath@OMLmathtt}}
    -{\SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n}}{}
    +\ifisomath@OMLmathrm
    +  \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n}
    +\fi
    +\ifisomath@OMLmathbf
    +  \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n}
    +\fi
    +\ifisomath@OMLmathsf
    +  \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n}
    +\fi
    +\ifisomath@OMLmathtt
    +  \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n}
    +\fi
     
    +
    -

    Command aliases

    -

    Define commands to typeset some symbol categories complying to -the ISO standard.

    -
    -

    Vector symbols

    -

    Symbols for vectors are boldface italic:

    +

    Command aliases

    +

    The following macros allow semantic markup of mathematical symbols. +The symbols argument is typeset as proposed by ISO 31 and [typefaces].

    +
    +

    \vectorsym

    +

    Symbols for vectors are typeset boldface italic:

     \newcommand{\vectorsym}{\mathbold}
     
    @@ -1084,24 +1106,16 @@ the ISO standard.

    you might want to re-define the standard \vec command after loading this package (cf. the Examples section).

    -
    -

    Matrix symbols

    -

    Symbols for matrices are boldface italic, i. e. typeset in the same face as -vectors (see [typefaces]). [2]

    +
    +

    \matrixsym

    +

    Symbols for matrices are typeset boldface italic, i. e. in the same face +as vectors.

     \newcommand{\matrixsym}{\mathbold}
     
    - - - - - -
    [2]However, matrix symbols are usually capital letters whereas vectors -are small ones. Exceptions are physical Quantities like the force -vector F or the electrical field E.
    -
    -

    Tensor symbols

    +
    +

    \tensorsym

    Symbols for tensors are sans-serif bold italic:

     \newcommand{\tensorsym}{\mathboldsans}
    @@ -1109,12 +1123,12 @@ vector F or the electrical field E.
     
    -

    Font mappings

    +

    Font mappings

    Some font packages provide a matching math font but do not define a substitution in their *.fd files.

    We define the substitutions needed for the math alphabet definitions in this package. Ideally, these should become part of a more complete set of -definitions in the package's fd file(s):

    +definitions in the package's *.fd files:

    Mathpazo (Palatino) ppl -> zplm

     \DeclareFontFamily{OML}{ppl}{\skewchar\font127}
    @@ -1129,77 +1143,69 @@ definitions in the package's fd file(s):

    LX Fonts (lxfonts): llcmss -> llcmm

    +% repeat font declarations from lxfonts.sty
    +\DeclareFontFamily{OML}{llcmm}{\skewchar\font'177}
    +\DeclareFontShape{OML}{llcmm}{m}{it}{<-> lcmmi8}{}
    +\DeclareFontShape{OML}{llcmm}{bx}{it}{<-> lcmmib8}{}
    +
     \DeclareFontFamily{OML}{llcmss}{}
     \DeclareFontShape{OML}{llcmss}{m}{it}{<-> ssub * llcmm/m/it}{}
     \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> ssub * llcmm/bx/it}{}
     
    -
    -
    -
    -

    The end

    +

    No declarations below this point:

     \endinput
     
    -
    -

    TODO

    -

    The \mathsans definition "increases symmetry". However, it adds a math -alphabet that is rarely (or not at all) used. Giving the limit of 16 math -alphabets, it might be better not to define it. Make it an option?

    -
    -

    About this file

    -

    The package documentation is included in the source file.

    -

    The bidirectional text <-> code converter PyLit can be used to transform -the LaTeX package isomath.sty to a reStructured Text document -isomath.sty.txt (and back again). To translate isomath.sty.txt to -LaTeX or HTML, the Python docutils are required.

    -

    References

    - +

    References

    +
    - +
    [encguide]LaTeX font encodings: -http://dante.ctan.org/CTAN/macros/latex/doc/encguide.pdf
    [typefaces](1, 2) Typefaces for Symbols in Scientific Manuscripts: +http://physics.nist.gov/Document/typefaces.pdf
    - +
    -
    [symbol-fonts]On the use of italic and roman fonts for symbols in -scientific text, I.M. Mills and W.V. Metanomski (Revised December 1999): +
    [fonts-for-symbols]On the use of italic and roman fonts for symbols in +scientific text, (Revised December 1999): http://old.iupac.org/standing/idcns/fonts_for_symbols.html
    - +
    - +
    [Green-Book]Quantities, Units and Symbols in Physical Chemistry, -3rd edition, RSC Publishing, Cambridge 2007: -[ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7]
    [SI-brochure]The International System of Units (SI): +http://www.bipm.org/en/si/si_brochure/
    - +
    - +
    [typefaces](1, 2) Typefaces for Symbols in Scientific Manuscripts: -http://physics.nist.gov/Document/typefaces.pdf
    [encguide]LaTeX font encodings: +http://dante.ctan.org/CTAN/macros/latex/doc/encguide.pdf
    - +
    - +
    [SI-brochure]The International System of Units (SI): -http://www.bipm.org/en/si/si_brochure/
    [fntguide]LaTeX 2e font selection: +http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf
    +[koma-mail] Custom font substitution: http://www.komascript.de/node/823 + +[Green-Book] `Quantities, Units and Symbols in Physical Chemistry`, +3rd edition, RSC Publishing, Cambridge 2007: +[ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7] -->
    -
    diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.pdf b/Master/texmf-dist/doc/latex/isomath/isomath.sty.pdf new file mode 100644 index 00000000000..a7bd54414f2 Binary files /dev/null and b/Master/texmf-dist/doc/latex/isomath/isomath.sty.pdf differ diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt new file mode 100644 index 00000000000..eb407f37486 --- /dev/null +++ b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt @@ -0,0 +1,636 @@ +isomath: Math for scientists +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:Copyright: © 2008 Günter Milde +:Licence: Released under the terms of the GNU General Public License + (version 2 or later). + +:Abstract: The isomath package enables formatting Greek and Latin + letters as symbols for vectors, matrices, and tensors + in the typefaces recommended for scientific papers + by the International Standard ISO 31. For this, a *bold italic* + and a *sans-serif bold italic* math alphabet are defined. + +.. contents:: + +Introduction +************ + +Motivation +========== + +.. Did you ever manage to write the stress tensor ``$\sigma$`` in a + *sans-serif bold italic* typeface, as recommended by [typefaces]_? + +Scientific organisations like IUPAP_, IUPAC_, NIST_, BIPM_, and others +recommend typesetting math according to International Standard `ISO 31`_ +`Quantities and units` (ISO 31-0:1992 to ISO 31-14:1992).\ [#]_ + +The traditional `LaTeX-style` deviates in some points from this rules: + +* The ``\vec`` command produces an array accent, while ISO 31 recommends + a *bold italic* typeface for vector symbols. + +* Greek letters are excluded from font changes with the math alphabets, + while the ISO 31 rules apply equally to letters from both the Greek + and the Latin alphabet. + +* There is no provision for typesetting of Greek letters in *bold italic* + style recommended for vectors (even though the required fonts are + available). + +* There is no provision for typesetting letters in *sans-serif bold italic* + recommended for typesetting tensor symbols. + +Also, the Unicode Standard defines the block `mathematical alphanumeric +symbols`_ — *To be used for mathematical variables where style variations +are important semantically* — which contains Latin and Greek letters in +bold, italic, bold italic, sans-serif bold, and sans-serif bold italic +typeface.\ [#]_ + +Some of these points are already adressed by `related packages`_, however +there is currently no package (known to the author) that defines the +*sans-serif bold italic* math alphabet needed for tensor symbols. + +.. [#] A summary of these rules is free available [typefaces]_. See also + [fonts-for-symbols]_ and [SI-brochure]_. + +.. [#] Plus Number variants and Latin letters in script, bold script, + fraktur, bold fraktur, double-struck, sans-serif and monospace; + alltogether 1023 codepoints. + + +Features +======== + +The ``isomath.sty`` package facilitates the task to abide with ISO 31 when +typesetting math with LaTeX: + +* It utilises fixmath_ to re-define Greek letters as ``\mathalpha``, taking + them from the "letters" symbol fonts (as opposed to "operators" in + ``fontmath.ltx``). This ensures that + + + Greek letters change shape together with Latin letters if a different + math alphabet is used. + + + Uppercase Greek letters are typeset in italic style by default. + + + Upright Greek letters are available through the ``\mathrm`` and + ``\mathbf`` alphabets, if the corresponding fonts are OML encoded. + + Caution: small Greek letters in a math alphabet command can lead to garbage. + Use the options for `OML math alphabets`_ (if the used font supports the + `OML font encoding`_) or place Greek letters outside the math alphabet + command. Some packages (including fixmath_) provide ``\up*`` or + ``\var*`` macros for upright Greek letters, e.g. ``\mathrm{k}\upOmega``. + +* The `command aliases`_ ``\vectorsym``, ``\matrixsym``, and ``\tensorsym`` + allow semantic markup selecting an ISO-conforming typeface. + +* For this, new `math alphabets`_ are defined: + + :``\mathbold``: *boldface italic* (vector and matrix symbols), + :``\mathsans``: *sans-serif italic* (optional), + :``\mathboldsans``: *sans-serif bold italic* (tensor symbols). + + The family for these fonts is by default taken from the document's + ``\rmdefault`` and ``\sfdefault`` values. The ``rmdefault=`` and + ``sfdefault=`` options_ can be used to override the defaults. + +* Missing `font mappings`_ are defined for font families which have an OML + encoded counterpart but miss the substitution definition in their ``*.fd`` + files. + + +Examples +======== + + +* In many cases (e.g. when ``\sfdefault`` expands to "cmss"), the + ``\mathboldsans`` alphabet is neither bold nor sans, as "cmss" has no OML + encoded variants and maps to "cmmi". + + Use cmbright_ for sans-serif math alphabets:: + + \usepackage[sfdefault=cmbr]{isomath} + +* Redefine the standard ``\vec`` macro to typeset its argument in `bold + italic`:: + + \usepackage[sfdefault=cmbr]{isomath} + \renewcommand{\vec}{\vectorsym} + +* The mathdesign_ package provides an OML encoded *bold roman* font but does + not set it up for ``\mathbf``:: + + \usepackage[charter]{mathdesign} + \usepackage[OMLmathbf,sfdefault=cmbr]{isomath} + + Now, ``\mathbf{\pi}`` works as expected. + +Related packages +================ + +Some packages already define Greek letters as ``\mathalpha`` and provide the +``\mathbold`` alphabet (in OML): + +* arev_ (Arev/Vera Sans) +* cmbright_ (CM Bright) +* eulervm_ (Euler Math) +* fixmath_ (Computer Modern) +* hvmath_ (HV-Math/Helvetica) +* mathpazo_ (Palatino) +* tmmath_ (TM-Math/Times) + +This package builds on and extends fixmath_ by Walter Schmidt +(see Requirements_). + +The cmbright_ package provides fonts for ``\mathsans`` and +``\mathboldsans`` matching with Computer Modern and derivatives. + +Conflicts +--------- + +The `fourier`_ package for math typesetting with Utopia defines its own, +incompatible math font encodings. It cannot be used with ``isomath`` but +provides other means to typeset upright or italic Greek (see its +documentation). + +The `kpfonts`_, `pxfonts`_, and `txfonts`_ packages define many additional +math alphabets and can only be combined with ``isomath``, if the +reuseMathalphabets_ option is used. + +OML font encoding +================= + +The `LaTeX font encodings` guide [encguide]_ defines: + + The OML encoding contains italic Latin and Greek letters for use in + mathematical formulas (typically used for variables) together with some + symbols. + +and names it `TeX math italic`. However, the reference to *italic* seems to +be a description of the *state of the art* rather than a necessary +restriction: + +* The only OML encoded CM font is "Computer Modern Math Italic" (cmmi), + +* but generally, font encodings (T1, OT1) are not specific to the font shape. + +* Both, ``\DeclareSymbolFont`` and ``\DeclareMathAlphabet`` require a + {} argument. Thus it is possible to define OML encoded math + alphabets in roman {n} as well as italic {it} shape without conflicts. + +* A more suitable public name would be `TeX math letters` or `Original/Old + Math Letters`. The latter would also explain the acronym OML. + +The OML font encoding is the only established encoding providing +Latin and Greek letters in one font: + +* LGR is Greek-only, +* T7 is just a "reserved name" for a standard Greek encoding. + +Unfortunately, support for the OML encoding is missing for many font +families even if the base font contains all Greek letters. +Supported font families can be found searching for ``oml*.fd`` files and by +grepping for "DeclareFont.*OML", "SymbolFont.*OML" and "MathAlphabet.*OML" +in ``*.sty`` files. + +.. _table 1: + +.. table:: Fonts supporting the OML font encoding + :class: booktab + + ============= =========================== ======= ======== ====== ======= + Name Family {m}{it} {bx}{it} {m}{n} {bx}{n} + ============= =========================== ======= ======== ====== ======= + aer AE (Almost European) x x + antt Antykwa Torunska x x + cmr Computer Modern Roman x x + ccr Concrete x x + cmbr Computer Modern Bright x x + hlh Lucida x x + hfor CM with old-style digits x x + iwona Iwona (sans serif) x x + jkp Kepler Serif x x + jkpl Kepler Serif x x + jkpvos Kepler Serif x x + jkplvos Kepler Serif x x + llcmm LXfonts (sans serif) x x + lmr Latin Modern Roman x x + mak Kerkis x + mdbch Math Design Charter x x ? x + mdput Math Design Utopia x x ? x + mdugm Math Design Garamond x x ? x + neohellenic GFS Neohellenic x + plcm CM (PLaTeX) x + ptmom Times (Omega or MB-Times) x x + ptmomu Times (Omega or MB-Times) x x + ptmcm Times (psfont) x + pxr Palatino (pxfonts) x x + qpl Palatino/Pagella (qpxmath) x x + qtm Times/Termes (qtxmath) x x + txr Times (txfonts) x x + ywclm (greektex) x x + zavm Arev (Vera Sans-Serif) x x + zesfcm (efont) x + zplm Palatino (mathpazo) x x + zpple x x + ztmcm Times (mathptmx) x + zer Computer Modern (zefonts) x x + ============= =========================== ======= ======== ====== ======= + +Explanations: + +* If there is an alias (substitution) from the text font to a math-variant, + only the text font is listed. + +* Many text fonts define substitutions also for {n}, however mapping to + an italic variant of the OML encoded font. These are not listed as + supporting {m}{n} or {bx}{n} here. + +The following fonts define ``cmm`` as OML substitution. A better matching +substitution can be set with the rmdefault_ option. + +.. _table 2: + +.. table:: Non-CM fonts with ``cmm`` as OML substitution + :class: booktab + + ============= =============================== + Family Name + ============= =============================== + bch Charter (psnfss) + pag Avant Garde (psnfss) + pbk Bookman (psnfss) + pcr Courier (psnfss) + phv Helvetica (psnfss) + pnc New Century Schoolbook (psnfss) + ppl Palatino (psnfss) + ptm Times Roman (psnfss) + put Utopia (psnfss) + pzc Zapf Chancery (psnfss) + uag Avant Garde (avantgar) + ubk Bookman (bookman) + ucr Courier (courier) + ucrs Courier + unc New Courier (nctrsbk) + uni Universal (universa) + uhv Helvetica (helvetic) + upl Palatino (palatino) + utm Times (times) + uzc Zapf Chancery (zapfchan) + ============= =============================== + +Conclusions and outlook +======================= + +It is hoped, that in the future more fonts families will support the OML +encoding in normal and bold weight as well as upright and italic shape. +This would be a major step towards the full support of the `Mathematical +Alphanumeric Symbols`_ Unicode block. + +This is (relatively) easy to achieve via virtual fonts when the glyphs for +the Greek letters already exist (this is the case for many fonts where the +primary version is Unicode encoded). Examples are Latin Modern, Kerkis, +GFS-Neohellenic, LX-Fonts and KP-Serif. + +Alternatively, T7 could be used for math alphabets (if it ever happens to +materialise). + +Upright small Greek letters in ``\mathrm`` would enable the specification of +Myons, Pions, alpha-particles, photons, and neutrinos without special +packages. (With mathdesign_, this is already possible today.) + +Implementation +************** + +Identification +============== +:: + + \NeedsTeXFormat{LaTeX2e} + \ProvidesPackage{isomath} + [2008/06/23 v0.1 typeset math according to International Standard ISO 31] + +Requirements +============ + +fixmath +------- + +fixmath_ by Walter Schmidt defines Greek letters as symbols of type +``\mathalpha`` and takes them from the "letters" SymbolFont in +``\mathnormal``. (It also defines the ``\mathbold`` alphabet, setting it to +``cmm``. This definition will be overwritten with a configurable value for +the font family below.) +:: + + \RequirePackage{fixmath} + +kvoptions +--------- + +The kvoptions_ package in the oberdiek_ bundle facilitates the setup of +package options and provides a key=value interface (based on keyval_):: + + \RequirePackage{kvoptions} + +Options +======= + +rmdefault +--------- + +Alternative family for roman math fonts. The default is to use the +corresponding text font family (``\rmdefault``) in OMS encoding. +`Table 2`_ lists some fonts where a different setting is advised. +:: + + \DeclareStringOption[\rmdefault]{rmdefault} + +sfdefault +--------- + +Alternative family for sans-serif math fonts. The default is to use the +corresponding text font family (``\sfdefault``) in OMS encoding. + +Computer Modern Sans Serif (cmss) has no OMS encoded variant. Nor have many +derivatives (lmss, aess, ...). Actually, there are only a few OML-encoded +sans-serif fonts (all slanted/italic): + +:zavm: arev_ (Vera Sans with math extension, large x-hight) +:cmbr: cmbright_ (Computer Modern Bright, slightly lighter than cmss) +:iwona: iwona_ (Humanistic Sans Serif, some shapes very similar to roman) +:hvm: hvmath_ (Helvetica Math, commercial, free bitmap version) +:llcmm: lxfonts_ (LX Fonts, very wide, excentric, large x-hight, new in 2008) + +For most fonts (especially CM and related), ``[sfdefault=cmbr]`` is the +recommended setting. + +:: + + \DeclareStringOption[\sfdefault]{sfdefault} + + +TODO + Allow scaling? + + +reuseMathalphabets +------------------ + +The definition of new `math alphabets`_ can lead to a "too many math +alphabets used in version normal" error. + +As a workaround, this option tells ``isomath`` to re-use the existing +``\mathbf`` and ``\mathsf`` alphabets for italic bold and sans-serif bold. + +To access the upright shapes, the corresponding ``\textbf`` and ``\textsf`` +commands might be used (however, that this toggles the math-mode off and +might use a different font). + +:: + + \DeclareBoolOption{reuseMathalphabets} + +Caution: Do not use ``reuseMathalphabets`` together with ``OMLmathbf`` or +``OMLmathsf``. + + +OML math alphabets +------------------ + +The following options cause isomath to (re)define `math alphabets`_ in OML +encoding. + +With Greek letters defined as ``\mathalpha``, the math alphabets are +expected to be in `OML font encoding`_ as OT1 encoded fonts have ligatures +and non-alpha symbols in place of the small Greek letters. + +Setting these options enables access to small Greek letters in different +shapes with e.g. ``\mathrm{\pi}`` **if an OML encoded font is available**. +Currently, support for the `OML font encoding`_ is rather limited: + +* only the mathdesign_ fonts support *bold roman* in OML encoding, while +* many font packages define an italic font as OML replacement for a roman + font. + +With some packages, these options can result in a "too many math alphabets +used in version normal" error. +:: + + \DeclareBoolOption{OMLmathrm} + \DeclareBoolOption{OMLmathbf} + \DeclareBoolOption{OMLmathsf} + \DeclareBoolOption{OMLmathsans} + \DeclareBoolOption{OMLmathtt} + +--------------------------------------------------- + +Process the options with ``kvoptions`` extensions:: + + \ProcessKeyvalOptions* + +Declarations +============ + +Math alphabets +-------------- + +In math, LaTeX uses "absolute" fontnames instead of a selection by family, +shape, and weight (see the [fntguide]_ for the rationale). + +We define a math alphabet for every required font variant and optionally +re-define the standard math alphabets in `OML font encoding`_. +Unfortunately, the number of math alphabets in one math version is limited +to 16, so we have to be carefull not to exceed this. + +mathbold +"""""""" + +For the *`italic bold* math alphabet we use the name ``\mathbold`` +established in `related packages`_. With the reuseMathalphabets_ option, +``\mathfb`` is redefined and ``\mathbold`` made an alias (overwriting +existing definitions). :: + + \ifisomath@reuseMathalphabets + \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it} + \def\mathbold{\mathbf} + \else + \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it} + \fi + +mathsans +"""""""" + +For *italic sans-serif*, we define a new alphabet named ``\mathsans`` (in +analogy to ``\mathbold``). As this typeface is not required by ISO 31, it is +only defined if the ``OMLmathsans`` option is set:: + + \ifisomath@OMLmathsans + \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} + \fi + +mathboldsans +"""""""""""" + +A *sans serif slanted bold* alphabet is needed for tensor symbols. With the +reuseMathalphabets_ option, ``\mathsf`` is redefined and ``\mathboldsans`` +made an alias:: + + \ifisomath@reuseMathalphabets + \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it} + \def\mathboldsans{\mathsf} + \else + \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} + \fi + +Redefine standard alphabets +""""""""""""""""""""""""""" + +Redefine standard alphabets in `OML font encoding`_ +(if the corresponding `OML math alphabets`_ option is true). :: + + \ifisomath@OMLmathrm + \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n} + \fi + \ifisomath@OMLmathbf + \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n} + \fi + \ifisomath@OMLmathsf + \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n} + \fi + \ifisomath@OMLmathtt + \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n} + \fi + +Command aliases +--------------- + +The following macros allow semantic markup of mathematical symbols. +The symbols argument is typeset as proposed by ISO 31 and [typefaces]_. + +\\vectorsym +""""""""""" + +Symbols for vectors are typeset *boldface italic*:: + + \newcommand{\vectorsym}{\mathbold} + +For easier writing or to make existing documents conform to the standard, +you might want to re-define the standard ``\vec`` command after loading this +package (cf. the Examples_ section). + +\\matrixsym +""""""""""" + +Symbols for matrices are typeset *boldface italic*, i. e. in the same face +as vectors. :: + + \newcommand{\matrixsym}{\mathbold} + + +\\tensorsym +""""""""""" + +Symbols for tensors are *sans-serif bold italic*:: + + \newcommand{\tensorsym}{\mathboldsans} + +Font mappings +------------- + +Some font packages provide a matching math font but do not define a +substitution in their ``*.fd`` files. + +We define the substitutions needed for the math alphabet definitions in this +package. Ideally, these should become part of a more complete set of +definitions in the package's ``*.fd`` files: + +Mathpazo (Palatino) ppl -> zplm :: + + \DeclareFontFamily{OML}{ppl}{\skewchar\font127} + \DeclareFontShape{OML}{ppl}{m}{it}{<-> ssub * zplm/m/it}{} + \DeclareFontShape{OML}{ppl}{bx}{it}{<-> ssub * zplm/b/it}{} + +Arev (arev): fav -> zavm :: + + \DeclareFontFamily{OML}{fav}{} + \DeclareFontShape{OML}{fav}{m}{it}{<->ssub * zavm/m/it}{} + \DeclareFontShape{OML}{fav}{bx}{it}{<->ssub * zavm/b/it}{} + +LX Fonts (lxfonts): llcmss -> llcmm :: + + % repeat font declarations from lxfonts.sty + \DeclareFontFamily{OML}{llcmm}{\skewchar\font'177} + \DeclareFontShape{OML}{llcmm}{m}{it}{<-> lcmmi8}{} + \DeclareFontShape{OML}{llcmm}{bx}{it}{<-> lcmmib8}{} + + \DeclareFontFamily{OML}{llcmss}{} + \DeclareFontShape{OML}{llcmss}{m}{it}{<-> ssub * llcmm/m/it}{} + \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> ssub * llcmm/bx/it}{} + + +No declarations below this point:: + + \endinput + + +References +********** + +.. [typefaces] `Typefaces for Symbols in Scientific Manuscripts`: + http://physics.nist.gov/Document/typefaces.pdf + +.. [fonts-for-symbols] `On the use of italic and roman fonts for symbols in + scientific text`, (Revised December 1999): + http://old.iupac.org/standing/idcns/fonts_for_symbols.html + +.. [SI-brochure] `The International System of Units (SI)`: + http://www.bipm.org/en/si/si_brochure/ + +.. [encguide] `LaTeX font encodings`: + http://dante.ctan.org/CTAN/macros/latex/doc/encguide.pdf + +.. [fntguide] `LaTeX 2e font selection`: + http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf + +.. see also + [koma-mail] Custom font substitution: http://www.komascript.de/node/823 + + [Green-Book] `Quantities, Units and Symbols in Physical Chemistry`, + 3rd edition, RSC Publishing, Cambridge 2007: + [ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7] + +.. Links +.. ***** + +.. _BIPM: http://www.bipm.org/ +.. _IUPAC: http://iupac.org/ +.. _IUPAP: http://www.iupap.org/ +.. _NIST: http://physics.nist.gov/ +.. _ISO 31: + http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=46202 +.. _mathematical alphanumeric symbols: + http://www.unicode.org/charts/PDF/U1D400.pdf +.. _arev: http://dante.ctan.org/CTAN/help/Catalogue/entries/arev.html +.. _cmbright: http://dante.ctan.org/CTAN/help/Catalogue/entries/cmbright.html +.. _eulervm: http://dante.ctan.org/CTAN/help/Catalogue/entries/eulervm.html +.. _fixmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/fixmath.html +.. _fix-cm: http://dante.ctan.org/CTAN/help/Catalogue/entries/fix-cm.html +.. _fourier: http://dante.ctan.org/CTAN/help/Catalogue/entries/fourier.html +.. _hvmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/hvmath.html +.. _ifthen: http://dante.ctan.org/CTAN/help/Catalogue/entries/ifthen.html +.. _iwona: http://dante.ctan.org/CTAN/help/Catalogue/entries/iwona.html +.. _kpfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/kpfonts.html +.. _kvoptions: http://dante.ctan.org/CTAN/help/Catalogue/entries/kvoptions.html +.. _keyval: http://dante.ctan.org/CTAN/help/Catalogue/entries/keyval.html +.. _lxfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/lxfonts.html +.. _mathdesign: http://dante.ctan.org/CTAN/help/Catalogue/entries/mathdesign.html +.. _mathpazo: http://dante.ctan.org/CTAN/help/Catalogue/entries/mathpazo.html +.. _oberdiek: http://dante.ctan.org/CTAN/help/Catalogue/entries/oberdiek.html +.. _sfmath: http://dtrx.de/od/tex/sfmath.html +.. _pxfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/pxfonts.html +.. _tmmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/tmmath.html +.. _txfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/txfonts.html diff --git a/Master/texmf-dist/tex/latex/isomath/isomath.sty b/Master/texmf-dist/tex/latex/isomath/isomath.sty index d2496183dda..7dc97ec2e45 100644 --- a/Master/texmf-dist/tex/latex/isomath/isomath.sty +++ b/Master/texmf-dist/tex/latex/isomath/isomath.sty @@ -1,14 +1,15 @@ -% isomath.sty: Math for scientists +% isomath: Math for scientists % ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ % -% :Copyright: © 2008 Günter Milde, -% Released under the terms of the GNU General Public License -% (v. 2 or later) +% :Copyright: © 2008 Günter Milde +% :Licence: Released under the terms of the GNU General Public License +% (version 2 or later). % -% :Abstract: The isomath package enables formatting Greek and Latin letters -% as symbols for vectors, matrices, and tensors in the typefaces -% recommended for scientific papers by the International -% Standard ISO 31. +% :Abstract: The isomath package enables formatting Greek and Latin +% letters as symbols for vectors, matrices, and tensors +% in the typefaces recommended for scientific papers +% by the International Standard ISO 31. For this, a *bold italic* +% and a *sans-serif bold italic* math alphabet are defined. % % .. contents:: % @@ -18,33 +19,46 @@ % Motivation % ========== % -% Scientific organisations like IUPAP_, IUPAC_, NIST_, BIPM_, and others -% recommend typesetting math according to International Standard ISO 31 -% `Quantities and units`_ (ISO 31-0:1992 to ISO 31-14:1992).\ [#]_ +% .. Did you ever manage to write the stress tensor ``$\sigma$`` in a +% *sans-serif bold italic* typeface, as recommended by [typefaces]_? % -% .. [#] A summary of these rules is free available [typefaces]_. See also -% [symbol-fonts]_ and [SI-brochure]_. +% Scientific organisations like IUPAP_, IUPAC_, NIST_, BIPM_, and others +% recommend typesetting math according to International Standard `ISO 31`_ +% `Quantities and units` (ISO 31-0:1992 to ISO 31-14:1992).\ [#]_ % % The traditional `LaTeX-style` deviates in some points from this rules: % % * The ``\vec`` command produces an array accent, while ISO 31 recommends -% a `bold italic` typeface for vector symbols. +% a *bold italic* typeface for vector symbols. % % * Greek letters are excluded from font changes with the math alphabets, % while the ISO 31 rules apply equally to letters from both the Greek % and the Latin alphabet. % -% * There is no provision for typesetting of Greek letters in `bold italic` +% * There is no provision for typesetting of Greek letters in *bold italic* % style recommended for vectors (even though the required fonts are % available). % -% * There is no provision for typesetting letters in `sans-serif bold italic` +% * There is no provision for typesetting letters in *sans-serif bold italic* % recommended for typesetting tensor symbols. % +% Also, the Unicode Standard defines the block `mathematical alphanumeric +% symbols`_ — *To be used for mathematical variables where style variations +% are important semantically* — which contains Latin and Greek letters in +% bold, italic, bold italic, sans-serif bold, and sans-serif bold italic +% typeface.\ [#]_ +% % Some of these points are already adressed by `related packages`_, however % there is currently no package (known to the author) that defines the % *sans-serif bold italic* math alphabet needed for tensor symbols. % +% .. [#] A summary of these rules is free available [typefaces]_. See also +% [fonts-for-symbols]_ and [SI-brochure]_. +% +% .. [#] Plus Number variants and Latin letters in script, bold script, +% fraktur, bold fraktur, double-struck, sans-serif and monospace; +% alltogether 1023 codepoints. +% % % Features % ======== @@ -64,65 +78,55 @@ % + Upright Greek letters are available through the ``\mathrm`` and % ``\mathbf`` alphabets, if the corresponding fonts are OML encoded. % +% Caution: small Greek letters in a math alphabet command can lead to garbage. +% Use the options for `OML math alphabets`_ (if the used font supports the +% `OML font encoding`_) or place Greek letters outside the math alphabet +% command. Some packages (including fixmath_) provide ``\up*`` or +% ``\var*`` macros for upright Greek letters, e.g. ``\mathrm{k}\upOmega``. +% % * The `command aliases`_ ``\vectorsym``, ``\matrixsym``, and ``\tensorsym`` -% select an ISO-conforming typeface. +% allow semantic markup selecting an ISO-conforming typeface. % -% * For this, `new math alphabets`_ are defined: -% -% :``\mathbold``: for *boldface italic* (vector and matrix -% symbols), -% -% :``\mathsans``: for *sans-serif italic* , +% * For this, new `math alphabets`_ are defined: % -% :``\mathboldsans``: for *sans-serif bold italic* (tensor symbols). +% :``\mathbold``: *boldface italic* (vector and matrix symbols), +% :``\mathsans``: *sans-serif italic* (optional), +% :``\mathboldsans``: *sans-serif bold italic* (tensor symbols). % % The family for these fonts is by default taken from the document's % ``\rmdefault`` and ``\sfdefault`` values. The ``rmdefault=`` and % ``sfdefault=`` options_ can be used to override the defaults. % -% * `Font mappings`_ are defined for families which have an OML encoded -% counterpart but miss the substitution definition. -% -% .. Now, it should be possible to typeset, e.g., the symbol for the tensor of -% dielectric permittivity ε according to the rules (i.e. sans-serif bold -% italic). -% -% .. caution:: Using small Greek letters in a math alphabet command (e.g. -% ``\mathrm{\pi}``) can lead to garbage. -% -% You can use the `OML math*`_ options (if the used font supports the -% `OML font encoding`_) or place the Greek letter outside the math -% alphabet command. Some packages (including fixmath_) provide ``\up*`` -% or ``\var*`` macros for upright Greek letters, e.g. -% ``\mathrm{k}\upOmega``. +% * Missing `font mappings`_ are defined for font families which have an OML +% encoded counterpart but miss the substitution definition in their ``*.fd`` +% files. % % % Examples % ======== % -% * ``\usepackage{isomath}`` % -% In many cases (when ``\sfdefault`` expands to "cmss"), the +% * In many cases (e.g. when ``\sfdefault`` expands to "cmss"), the % ``\mathboldsans`` alphabet is neither bold nor sans, as "cmss" has no OML % encoded variants and maps to "cmmi". % -% * Use cmbright_ for the sans-serif math alphabets:: +% Use cmbright_ for sans-serif math alphabets:: -\usepackage[sfdefault=cmbr]{isomath} - +% \usepackage[sfdefault=cmbr]{isomath} +% % * Redefine the standard ``\vec`` macro to typeset its argument in `bold % italic`:: % \usepackage[sfdefault=cmbr]{isomath} % \renewcommand{\vec}{\vectorsym} % -% * The mathdesign_ package comes with an OML encoded bold roman font but does -% not use it for ``\mathbf`` in the default setting. With :: +% * The mathdesign_ package provides an OML encoded *bold roman* font but does +% not set it up for ``\mathbf``:: % \usepackage[charter]{mathdesign} % \usepackage[OMLmathbf,sfdefault=cmbr]{isomath} % -% ``\mathbf{\pi}`` works as expected. +% Now, ``\mathbf{\pi}`` works as expected. % % Related packages % ================ @@ -159,13 +163,6 @@ % OML font encoding % ================= % -% If a math alphabet shall support both, Greek and Latin letters, it must use -% the OML font encoding — no other established encoding provides Latin and -% Greek letters in one font: -% -% * LGR is Greek-only, -% * T7 is just a "reserved name" for a standard Greek encoding. -% % The `LaTeX font encodings` guide [encguide]_ defines: % % The OML encoding contains italic Latin and Greek letters for use in @@ -187,13 +184,21 @@ % * A more suitable public name would be `TeX math letters` or `Original/Old % Math Letters`. The latter would also explain the acronym OML. % +% The OML font encoding is the only established encoding providing +% Latin and Greek letters in one font: +% +% * LGR is Greek-only, +% * T7 is just a "reserved name" for a standard Greek encoding. +% % Unfortunately, support for the OML encoding is missing for many font % families even if the base font contains all Greek letters. % Supported font families can be found searching for ``oml*.fd`` files and by % grepping for "DeclareFont.*OML", "SymbolFont.*OML" and "MathAlphabet.*OML" % in ``*.sty`` files. % -% .. table:: Table 1: Fonts supporting the OML font encoding +% .. _table 1: +% +% .. table:: Fonts supporting the OML font encoding % :class: booktab % % ============= =========================== ======= ======== ====== ======= @@ -249,7 +254,7 @@ % % .. _table 2: % -% .. table:: Table 2: Non-CM fonts with ``cmm`` as OML substitution +% .. table:: Non-CM fonts with ``cmm`` as OML substitution % :class: booktab % % ============= =============================== @@ -323,14 +328,6 @@ \RequirePackage{fixmath} -% ifthen -% ------ -% -% The standard LaTeX package `ifthen`_ provides the commands ``\ifthenelse``, -% and ``\whiledo``. :: - -\RequirePackage{ifthen} - % kvoptions % --------- % @@ -345,7 +342,7 @@ % rmdefault % --------- % -% Alternative math font family name for roman. The default is to use the +% Alternative family for roman math fonts. The default is to use the % corresponding text font family (``\rmdefault``) in OMS encoding. % `Table 2`_ lists some fonts where a different setting is advised. % :: @@ -355,21 +352,20 @@ % sfdefault % --------- % -% Alternative math font family name for sans-serif. The default is to use the +% Alternative family for sans-serif math fonts. The default is to use the % corresponding text font family (``\sfdefault``) in OMS encoding. % -% Computer Modern Sans Serif (cmss) has no italic and bold variants in OMS -% encoding. Nor have many derivatives (lmss, aess, ...). -% Actually, there are only a few OML-encoded sans-serif fonts (all -% slanted/italic): +% Computer Modern Sans Serif (cmss) has no OMS encoded variant. Nor have many +% derivatives (lmss, aess, ...). Actually, there are only a few OML-encoded +% sans-serif fonts (all slanted/italic): % -% :zavm: arev_ (Vera Sans with math extension) +% :zavm: arev_ (Vera Sans with math extension, large x-hight) % :cmbr: cmbright_ (Computer Modern Bright, slightly lighter than cmss) -% :iwona: iwona_ (Humanistic Sans Serif) +% :iwona: iwona_ (Humanistic Sans Serif, some shapes very similar to roman) % :hvm: hvmath_ (Helvetica Math, commercial, free bitmap version) -% :llcmm: lxfonts_ (LX Fonts, very wide and quite eccentric, new in 2008) +% :llcmm: lxfonts_ (LX Fonts, very wide, excentric, large x-hight, new in 2008) % -% For many fonts (especially CM and related), ``[sfdefault=cmbr]`` is the +% For most fonts (especially CM and related), ``[sfdefault=cmbr]`` is the % recommended setting. % % :: @@ -377,37 +373,43 @@ \DeclareStringOption[\sfdefault]{sfdefault} +% TODO +% Allow scaling? +% +% % reuseMathalphabets % ------------------ % -% The definition of `new math alphabets`_ can lead to a "too many math +% The definition of new `math alphabets`_ can lead to a "too many math % alphabets used in version normal" error. % % As a workaround, this option tells ``isomath`` to re-use the existing -% ``\mathbf`` and ``\mathsf`` alphabets for italic bold and sans-serif. +% ``\mathbf`` and ``\mathsf`` alphabets for italic bold and sans-serif bold. % % To access the upright shapes, the corresponding ``\textbf`` and ``\textsf`` -% command can be used (remember that this toggles the math-mode off and might -% use a different font). +% commands might be used (however, that this toggles the math-mode off and +% might use a different font). % -% Both standard and `new math alphabets`_ are in upright shape, if this option -% is combined with the corresponding `OML math*`_ option. % :: \DeclareBoolOption{reuseMathalphabets} -% OML math* -% --------- +% Caution: Do not use ``reuseMathalphabets`` together with ``OMLmathbf`` or +% ``OMLmathsf``. % -% These options cause isomath to `redefine standard alphabets`_ in OML +% +% OML math alphabets +% ------------------ +% +% The following options cause isomath to (re)define `math alphabets`_ in OML % encoding. % % With Greek letters defined as ``\mathalpha``, the math alphabets are -% expected to be in `OML font encoding`_. OT1 encoded fonts have ligatures and -% non-alpha symbols in place of the small Greek letters. +% expected to be in `OML font encoding`_ as OT1 encoded fonts have ligatures +% and non-alpha symbols in place of the small Greek letters. % % Setting these options enables access to small Greek letters in different -% shapes with e.g. ``\mathrm{\pi}``. +% shapes with e.g. ``\mathrm{\pi}`` **if an OML encoded font is available**. % Currently, support for the `OML font encoding`_ is rather limited: % % * only the mathdesign_ fonts support *bold roman* in OML encoding, while @@ -421,10 +423,10 @@ \DeclareBoolOption{OMLmathrm} \DeclareBoolOption{OMLmathbf} \DeclareBoolOption{OMLmathsf} +\DeclareBoolOption{OMLmathsans} \DeclareBoolOption{OMLmathtt} - -% ============ +% --------------------------------------------------- % % Process the options with ``kvoptions`` extensions:: @@ -433,69 +435,86 @@ % Declarations % ============ % -% New math alphabets -% ------------------ +% Math alphabets +% -------------- +% +% In math, LaTeX uses "absolute" fontnames instead of a selection by family, +% shape, and weight (see the [fntguide]_ for the rationale). +% +% We define a math alphabet for every required font variant and optionally +% re-define the standard math alphabets in `OML font encoding`_. +% Unfortunately, the number of math alphabets in one math version is limited +% to 16, so we have to be carefull not to exceed this. % -% The `italic bold` math alphabet is named ``\mathbold`` in `related -% packages`_. For letters, this is the same as the bold version of -% ``\mathnormal``. With the reuseMathalphabets_ option, ``\mathfb`` is -% redefined and ``\mathbold`` made an alias (overwriting existing -% definitions). :: +% mathbold +% """""""" +% +% For the *`italic bold* math alphabet we use the name ``\mathbold`` +% established in `related packages`_. With the reuseMathalphabets_ option, +% ``\mathfb`` is redefined and ``\mathbold`` made an alias (overwriting +% existing definitions). :: -\ifthenelse{\boolean{isomath@reuseMathalphabets}} -{ +\ifisomath@reuseMathalphabets \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it} \def\mathbold{\mathbf} -} -{ +\else \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it} -} - -% For `italic sans-serif`, we either redefine ``\mathsf`` (with -% reuseMathalphabets_) or, in analogy to ``\mathbold``, we define the new -% alphabet ``\mathsans``:: - -\ifthenelse{\boolean{isomath@reuseMathalphabets}} -{ - \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{m}{it} - \def\mathsans{\mathsf} -} -{ - \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} -} +\fi -% A `sans serif slanted bold` alphabet is needed for the tensor -% symbols. As there is no standard math alphabet to re-use, we define the new -% alphabet ``\mathboldsans``:: +% mathsans +% """""""" +% +% For *italic sans-serif*, we define a new alphabet named ``\mathsans`` (in +% analogy to ``\mathbold``). As this typeface is not required by ISO 31, it is +% only defined if the ``OMLmathsans`` option is set:: + +\ifisomath@OMLmathsans + \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} +\fi -\DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} +% mathboldsans +% """""""""""" +% +% A *sans serif slanted bold* alphabet is needed for tensor symbols. With the +% reuseMathalphabets_ option, ``\mathsf`` is redefined and ``\mathboldsans`` +% made an alias:: +\ifisomath@reuseMathalphabets + \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it} + \def\mathboldsans{\mathsf} +\else + \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} +\fi % Redefine standard alphabets -% --------------------------- +% """"""""""""""""""""""""""" % % Redefine standard alphabets in `OML font encoding`_ -% (if the corresponding `OML math*`_ option is true). :: - -\ifthenelse{\boolean{isomath@OMLmathrm}} -{\SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n}}{} -\ifthenelse{\boolean{isomath@OMLmathbf}} -{\SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n}}{} -\ifthenelse{\boolean{isomath@OMLmathbf}} -{\SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n}}{} -\ifthenelse{\boolean{isomath@OMLmathtt}} -{\SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n}}{} +% (if the corresponding `OML math alphabets`_ option is true). :: + +\ifisomath@OMLmathrm + \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n} +\fi +\ifisomath@OMLmathbf + \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n} +\fi +\ifisomath@OMLmathsf + \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n} +\fi +\ifisomath@OMLmathtt + \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n} +\fi % Command aliases % --------------- % -% Define commands to typeset some symbol categories complying to -% the ISO standard. +% The following macros allow semantic markup of mathematical symbols. +% The symbols argument is typeset as proposed by ISO 31 and [typefaces]_. % -% Vector symbols -% """""""""""""" +% \\vectorsym +% """"""""""" % -% Symbols for vectors are *boldface italic*:: +% Symbols for vectors are typeset *boldface italic*:: \newcommand{\vectorsym}{\mathbold} @@ -503,20 +522,17 @@ % you might want to re-define the standard ``\vec`` command after loading this % package (cf. the Examples_ section). % -% Matrix symbols -% """""""""""""" +% \\matrixsym +% """"""""""" % -% Symbols for matrices are *boldface italic*, i. e. typeset in the same face as -% vectors (see [typefaces]_). [#]_ :: +% Symbols for matrices are typeset *boldface italic*, i. e. in the same face +% as vectors. :: \newcommand{\matrixsym}{\mathbold} -% .. [#] However, matrix symbols are usually capital letters whereas vectors -% are small ones. Exceptions are physical Quantities like the force -% vector F or the electrical field E. -% -% Tensor symbols -% """""""""""""" + +% \\tensorsym +% """"""""""" % % Symbols for tensors are *sans-serif bold italic*:: @@ -530,7 +546,7 @@ % % We define the substitutions needed for the math alphabet definitions in this % package. Ideally, these should become part of a more complete set of -% definitions in the package's fd file(s): +% definitions in the package's ``*.fd`` files: % % Mathpazo (Palatino) ppl -> zplm :: @@ -545,58 +561,48 @@ \DeclareFontShape{OML}{fav}{bx}{it}{<->ssub * zavm/b/it}{} % LX Fonts (lxfonts): llcmss -> llcmm :: + +% repeat font declarations from lxfonts.sty +\DeclareFontFamily{OML}{llcmm}{\skewchar\font'177} +\DeclareFontShape{OML}{llcmm}{m}{it}{<-> lcmmi8}{} +\DeclareFontShape{OML}{llcmm}{bx}{it}{<-> lcmmib8}{} \DeclareFontFamily{OML}{llcmss}{} \DeclareFontShape{OML}{llcmss}{m}{it}{<-> ssub * llcmm/m/it}{} \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> ssub * llcmm/bx/it}{} -% The end -% ======= -% :: + +% No declarations below this point:: \endinput -% TODO -% ==== -% -% The ``\mathsans`` definition "increases symmetry". However, it adds a math -% alphabet that is rarely (or not at all) used. Giving the limit of 16 math -% alphabets, it might be better not to define it. Make it an option? -% -% About this file -% =============== -% -% The package documentation is included in the source file. -% -% The bidirectional text <-> code converter PyLit_ can be used to transform -% the LaTeX package ``isomath.sty`` to a `reStructured Text`_ document -% ``isomath.sty.txt`` (and back again). To translate ``isomath.sty.txt`` to -% LaTeX or HTML, the Python docutils_ are required. -% -% + % References -% ========== -% -% .. [encguide] `LaTeX font encodings`: -% http://dante.ctan.org/CTAN/macros/latex/doc/encguide.pdf -% -% .. [symbol-fonts] `On the use of italic and roman fonts for symbols in -% scientific text`, I.M. Mills and W.V. Metanomski (Revised December 1999): -% http://old.iupac.org/standing/idcns/fonts_for_symbols.html -% -% .. [Green-Book] `Quantities, Units and Symbols in Physical Chemistry`, -% 3rd edition, RSC Publishing, Cambridge 2007: -% [ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7] +% ********** % % .. [typefaces] `Typefaces for Symbols in Scientific Manuscripts`: % http://physics.nist.gov/Document/typefaces.pdf % +% .. [fonts-for-symbols] `On the use of italic and roman fonts for symbols in +% scientific text`, (Revised December 1999): +% http://old.iupac.org/standing/idcns/fonts_for_symbols.html +% % .. [SI-brochure] `The International System of Units (SI)`: % http://www.bipm.org/en/si/si_brochure/ % +% .. [encguide] `LaTeX font encodings`: +% http://dante.ctan.org/CTAN/macros/latex/doc/encguide.pdf +% +% .. [fntguide] `LaTeX 2e font selection`: +% http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf +% % .. see also % [koma-mail] Custom font substitution: http://www.komascript.de/node/823 % +% [Green-Book] `Quantities, Units and Symbols in Physical Chemistry`, +% 3rd edition, RSC Publishing, Cambridge 2007: +% [ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7] +% % .. Links % .. ***** % @@ -604,7 +610,7 @@ % .. _IUPAC: http://iupac.org/ % .. _IUPAP: http://www.iupap.org/ % .. _NIST: http://physics.nist.gov/ -% .. _Quantities and units: +% .. _ISO 31: % http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=46202 % .. _mathematical alphanumeric symbols: % http://www.unicode.org/charts/PDF/U1D400.pdf @@ -628,7 +634,3 @@ % .. _pxfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/pxfonts.html % .. _tmmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/tmmath.html % .. _txfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/txfonts.html -% -% .. _pylit: http://pylit.berlios.de -% .. _reStructured Text: http://docutils.sourceforge.net/rst.html -% .. _docutils: http://docutils.sourceforge.net/rst.html -- cgit v1.2.3