From 1a813fddccf1088251a3bf66876370618b724a8a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 5 Feb 2011 00:20:35 +0000 Subject: isomath 0.5 (2feb11) git-svn-id: svn://tug.org/texlive/trunk@21296 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/isomath/README.html | 322 +-- Master/texmf-dist/doc/latex/isomath/README.txt | 26 +- .../texmf-dist/doc/latex/isomath/isomath-test.pdf | Bin 141853 -> 351869 bytes .../texmf-dist/doc/latex/isomath/isomath-test.tex | 190 +- Master/texmf-dist/doc/latex/isomath/isomath.html | 2478 ++++++++++++++++++++ Master/texmf-dist/doc/latex/isomath/isomath.pdf | Bin 154436 -> 512685 bytes .../texmf-dist/doc/latex/isomath/isomath.sty.html | 670 +++--- .../texmf-dist/doc/latex/isomath/isomath.sty.txt | 212 +- Master/texmf-dist/doc/latex/isomath/isomath.txt | 1110 ++++++--- Master/texmf-dist/tex/latex/isomath/isomath.sty | 212 +- 10 files changed, 4162 insertions(+), 1058 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/isomath/isomath.html (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/isomath/README.html b/Master/texmf-dist/doc/latex/isomath/README.html index 1fc2b4360b2..35e0cf95488 100644 --- a/Master/texmf-dist/doc/latex/isomath/README.html +++ b/Master/texmf-dist/doc/latex/isomath/README.html @@ -1,17 +1,17 @@ - - + + isomath README - - + + @@ -713,89 +756,88 @@ dl.field-list > dd {
Date
-
2010-08-23
+
2011-02-01
-
© 2008, 2010 Günter Milde <milde@users.berlios.de>
+
Licence
-
This work may be distributed and/or modified under the +

This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either -version 1.3 of this license or (at your option) any later version.

+version 1.3 of this license or (at your option) any later version.

+

Abstract

-

The isomath package enables formatting Greek and Latin +

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.

+by the International Standard ISO 80000-2.

Files

--++ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
README.txtRequirements, Installation, Usage

README.txt

Requirements, Installation, Usage

README.htmlbrowser friendly README

README.html

browser friendly README

isomath.styliterate source (LaTeX package)

isomath.sty

literate source (the actual LaTeX package)

isomath.sty.txtliterate source (text version)

isomath.sty.txt

literate source (text version)

isomath.sty.htmlliterate source (HTML)

isomath.sty.html

literate source (HTML)

isomath-doc.txtuser documentation (source)

isomath.txt

user documentation (source)

isomath-doc.htmluser documentation (HTML)

isomath.html

user documentation (HTML)

isomath-doc.pdfuser documentation (PDF)

isomath.pdf

user documentation (PDF)

isomath-test.texTest example (source)

isomath-test.tex

Test example (source)

isomath-test.pdfTest example (PDF output)

isomath-test.pdf

Test example (PDF output)

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

+isomath.sty and isomath.sty.txt.

The Python Docutils and pdflatex were used to generate the HTML and PDF documentation from the reStructuredText sources.

Requirements

-

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

-

The cmbright package is recommended for sans-serif italic and sans-serif +

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/Link it to a suitable place in the TDS and run texhash +

  • Unpack isomath.zip (preferably in a TDS documentation folder).

  • +
  • Make sure LaTeX can find isomath.sty:

    +

    Copy/Move/Link it to a suitable place in the TDS and run texhash or place it in the current working directory (e.g. for testing).

Usage

-
-\usepackage{isomath}
+
\usepackage{isomath}
 

Option description, more examples and usage hints are in the user documentation.

diff --git a/Master/texmf-dist/doc/latex/isomath/README.txt b/Master/texmf-dist/doc/latex/isomath/README.txt index fd1231b6d9d..613161aac1d 100644 --- a/Master/texmf-dist/doc/latex/isomath/README.txt +++ b/Master/texmf-dist/doc/latex/isomath/README.txt @@ -1,17 +1,17 @@ isomath README ~~~~~~~~~~~~~~ -:Date: 2010-08-23 -:Copyright: © 2008, 2010 Günter Milde +:Date: 2011-02-01 +:Copyright: © 2008, 2011 Günter Milde :Licence: This work may be distributed and/or modified under the conditions of the `LaTeX Project Public License`_, either version 1.3 of this license or (at your option) any later version. -:Abstract: The isomath package enables formatting Greek and Latin +: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. + by the International Standard ISO 80000-2. Files ===== @@ -24,9 +24,9 @@ isomath.sty literate source (the actual LaTeX package) isomath.sty.txt literate source (text version) isomath.sty.html literate source (HTML) -isomathtxt user documentation (source) -isomathhtml user documentation (HTML) -isomathpdf user documentation (PDF) +isomath.txt user documentation (source) +isomath.html user documentation (HTML) +isomath.pdf user documentation (PDF) isomath-test.tex Test example (source) isomath-test.pdf Test example (PDF output) @@ -53,7 +53,7 @@ All required packages are part of TeXLive and MikTeX. Installation ============ -* Unpack isomath.zip (preferabely in a TDS_ documentation folder). +* Unpack isomath.zip (preferably in a TDS_ documentation folder). * Make sure LaTeX can find isomath.sty: @@ -75,12 +75,12 @@ documentation. ========== .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt -.. _pylit: http://pylit.berlios.de +.. _PyLit: http://pylit.berlios.de .. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _docutils: 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 +.. _cmbright: http://mirror.ctan.org/help/Catalogue/entries/cmbright.html +.. _fixmath: http://mirror.ctan.org/help/Catalogue/entries/fixmath.html +.. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html .. _TDS: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tds diff --git a/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf b/Master/texmf-dist/doc/latex/isomath/isomath-test.pdf index 014321c05d9..07bc2bcc2c0 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 fd9c4267333..b640a4ff66b 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath-test.tex +++ b/Master/texmf-dist/doc/latex/isomath/isomath-test.tex @@ -1,4 +1,4 @@ -% isomath-test.tex: test and template for isomath.sty +%isomath-test.tex: test and template for isomath.sty % =================================================== % % Copyright © 2008 Günter Milde @@ -9,9 +9,9 @@ % :: \documentclass[a4paper]{article} -\usepackage[LGR,T1]{fontenc} -% \usepackage[T1]{fontenc} +\usepackage[T1]{fontenc} % \usepackage[utf8]{inputenc} +\usepackage{amsmath} \pagestyle{empty} @@ -29,35 +29,37 @@ \newcommand*{\fontpackageoptions}{% % default% with gfsneohellenic % charter% with mathdesign -garamond% with mathdesign +% garamond% with mathdesign % utopia% with mathdesign } \newcommand*{\fontpackage}{% -% ae% \sfdefault is cmss -% 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?) -% lmodern% \sfdefault is cmss -% lucidabr% commercial, subset (no math) free as bitmap -% lxfonts% normal and sans identic, -mathdesign% \sfdefault is cmss, provides roman and roman-bold in OML -% mathptmx% in mathnormal, Greek is larger than Latin! -% mbtimes% \sfdefault is cmss -% mathpazo% \sfdefault is cmss -% pxfonts% needs reuseMathAlphabets, no sans-serif -% tgpagella,qpxmath% \sfdefault is cmss -% tgtermes,qtxmath% \sfdefault is cmss -% txfonts% no sans-serif -% zefonts% +% ae,% \sfdefault is cmss +% anttor,% \sfdefault is cmss (use iwona) +% arev,% normal and sans identic (also in math) +% beton,% bitmap fonts +% concmath,% +% cmbright,% +% 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 +% kerkis,% no bold math, +% lmodern,% \sfdefault is cmss +% lucidabr,% commercial, subset (no math) free as bitmap +% lxfonts,% normal and sans identic, +% mathdesign,% \sfdefault is cmss, provides roman and roman-bold in OML +% mathptmx,% in mathnormal, Greek is larger than Latin! +% mbtimes,% \sfdefault is cmss +% mathpazo,% \sfdefault is cmss +% pxfonts,% needs reuseMathAlphabets, no sans-serif +tgcursor,% avoid bitmap tt +tgheros,% avoid bitmap sf +% tgpagella,% \sfdefault is cmss +tgtermes,% \sfdefault is cmss +% txfonts,% no sans-serif +% zefonts% } % Isomath options @@ -67,11 +69,12 @@ mathdesign% \sfdefault is cmss, provides roman and roman-bold in OML \newcommand*{\isomathoptions}{% % reuseMathAlphabets,% -OMLmathrm,% -OMLmathbf,% +% OMLmathrm,% +% OMLmathbf,% % OMLmathsf,% +OMLmathsfit,% % OMLmathtt,% -% OMLmathsans,% +% OMLmathsans,% backwards compatibility option alias % rmdefault=qtxmia,% TeX Gyre Termes math with alternative glyphs % sfdefault=cmbr,% default % sfdefault=iwona,% Iwona sans (Greek glyphs too close to roman) @@ -85,7 +88,6 @@ OMLmathbf,% % :: \usepackage[\fontpackageoptions]{\fontpackage} - \usepackage[\isomathoptions]{isomath} @@ -96,10 +98,16 @@ OMLmathbf,% \renewcommand*{\vec}{\vectorsym} -% Fall-back definition for \mathsans:: -\providecommand*{\mathsans}[1]% -{\textsf{mathsans not defined, use \texttt{OMLmathsans} option}} +% Fall-back definition for \mathsfit:: + +\providecommand*{\mathsfit}[1]% +{\textsf{mathsfit not defined, use \texttt{OMLmathsfit} option}} + +% use Arev as "heavy" sans serif font:: + +\DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{} +\SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it} % Test sheet @@ -113,22 +121,17 @@ OMLmathbf,% % Print font package, isomath options, and resulting font families:: Fontpackage: [\fontpackageoptions]\{\fontpackage\}\\ -Isomath called with options: [\isomathoptions]\\ +Isomath: [\isomathoptions]\{isomath\}\\ Default font families: \makeatletter -\begin{tabular}[t]{rlrl} - serif & \texttt{\rmdefault} & - sans-serif & \texttt{\sfdefault}\\ - isomath-serif & \texttt{\isomath@rmdefault} & - isomath-sf & \texttt{\isomath@sfdefault}\\ +\begin{tabular}[t]{lrlrl} + Text & serif & \textsf{\rmdefault} & + sans-serif & \textsf{\sfdefault}\\ + Math & serif & \textsf{\isomath@rmdefault} & + sans-serif & \textsf{\isomath@sfdefault}\\ \end{tabular} \makeatother -\subsection*{Math alphabets} - -If there are other symbols in place of Greek letters in a math -alphabet, it uses T1 or OT1 font encoding instead of OML. - % A teststring with Latin and Greek letters:: \newcommand{\teststring}{% @@ -143,8 +146,15 @@ A,B,C, v,w, % is there a true italic form of a and g? a,g, +% digits +0,1,9 } +\subsection*{Math alphabets} + +If there are other symbols in place of Greek letters in a math +alphabet, it uses T1 or OT1 font encoding instead of OML. + \begin{eqnarray*} \mbox{mathnormal} & & \teststring \\ \mbox{mathit} & & \mathit{\teststring}\\ @@ -155,28 +165,29 @@ a,g, \end{eqnarray*} New alphabets bold-italic, sans-serif-italic, and sans-serif-bold-italic. \begin{eqnarray*} -\mbox{mathbold} & & \mathbold{\teststring}\\ -\mbox{mathsans} & & \mathsans{\teststring}\\ -\mbox{mathboldsans} & & \mathboldsans{\teststring} +\mbox{mathbfit} & & \mathbfit{\teststring}\\ +\mbox{mathsfit} & & \mathsfit{\teststring}\\ +\mbox{mathsfbfit} & & \mathsfbfit{\teststring} \end{eqnarray*} % Do the math alphabets match? $ \mathnormal {a x \alpha \omega} -\mathbold {a x \alpha \omega} -\mathboldsans{a x \alpha \omega} +\mathbfit {a x \alpha \omega} +\mathsfbfit{a x \alpha \omega} \quad -\mathboldsans{T C \Theta \Gamma} -\mathbold {T C \Theta \Gamma} +\mathsfbfit{T C \Theta \Gamma} +\mathbfit {T C \Theta \Gamma} \mathnormal {T C \Theta \Gamma} $ \subsection*{Vector symbols} -Symbols for vectors are boldface italic: -$\vec{\lambda}=\vec{e}_{1}\cdot\vec{a}$. - +Alphabetic symbols for vectors are boldface italic, +$\vec{\lambda}=\vec{e}_{1}\cdot\vec{a}$, +while numeric ones (e.g. the zero vector) are bold upright, +$\vec{a} + \vec{0} = \vec{a}$. \subsection*{Matrix symbols} @@ -199,6 +210,73 @@ Symbols for tensors are sans-serif bold italic, \] +The permittivity tensor describes the coupling of electric field and +displacement: \[ +\vec{D}=\epsilon_{0}\tensorsym{\epsilon}_{\mathrm{r}}\vec{E}\] + + +\subsection*{Bold math version} + +The ``bold'' math version is selected with the commands +\verb+\boldmath+ or \verb+\mathversion{bold}+ +\boldmath + + +\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 bold-italic, sans-serif-italic, and sans-serif-bold-italic. +\begin{eqnarray*} +\mbox{mathbfit} & & \mathbfit{\teststring}\\ +\mbox{mathsfit} & & \mathsfit{\teststring}\\ +\mbox{mathsfbfit} & & \mathsfbfit{\teststring} +\end{eqnarray*} +% +Do the math alphabets match? + +$ +\mathnormal {a x \alpha \omega} +\mathbfit {a x \alpha \omega} +\mathsfbfit{a x \alpha \omega} +\quad +\mathsfbfit{T C \Theta \Gamma} +\mathbfit {T C \Theta \Gamma} +\mathnormal {T C \Theta \Gamma} +$ + +\subsection*{Vector symbols} + +Alphabetic symbols for vectors are boldface italic, +$\vec{\lambda}=\vec{e}_{1}\cdot\vec{a}$, +while numeric ones (e.g. the zero vector) are bold upright, +$\vec{a} + \vec{0} = \vec{a}$. + + +\subsection*{Matrix symbols} + +Symbols for matrices are boldface italic, too:% +\footnote{However, matrix symbols are usually capital letters whereas vectors +are small ones. Exceptions are physical Quantities like the force +vector $\vec{F}$ or the electrical field $\vec{E}$.% +} +$\matrixsym{\Lambda}=\matrixsym{E}\cdot\matrixsym{A}.$ + + +\subsection*{Tensor symbols} + +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 displacement: \[ \vec{D}=\epsilon_{0}\tensorsym{\epsilon}_{\mathrm{r}}\vec{E}\] diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.html b/Master/texmf-dist/doc/latex/isomath/isomath.html new file mode 100644 index 00000000000..3ed67206bc3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/isomath/isomath.html @@ -0,0 +1,2478 @@ + + + + + + +isomath: Math for scientists + + + + + + + + +
+

isomath: Math for scientists

+ +
+
Author
+
Günter Milde
+
Date
+
2011-01-14
+ + +
Licence
+

This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3 of this license or (at your option) any later version.

+
+
+
+

Abstract

+

The isomath package sets up an “ISO math style” allowing the +use of Greek and Latin letters as symbols for scalars, +vectors, matrices, and tensors in the typefaces recommended +for scientific papers by the International Standard +ISO 80000-2.

+
+ + +
+

1 Features

+ +

Leading international scientific organisations recommend math layout +rules in line with the International Standard [ISO-80000-2] in their +style guides, e. g., [typefaces], [checklist], [SI], [fonts_for_symbols], +[Red-Book], [Green-Book]:

+
    +
  • The overall rule is that symbols representing physical quantities +(or variables) are italic, but symbols representing units, or +labels, are roman.

  • +
  • Symbols for vectors are boldface italic, symbols for tensors are +sans-serif bold italic, and symbols for matrices are boldface +italic.

  • +
  • The above rules apply equally to letter symbols from both the Greek +and the Latin alphabet.

  • +
+

The traditional TeX math style deviates from this rules in some +points:

+
    +
  • capital Greek letters default to upright shape,

  • +
  • small Greek letters are excluded from font changes with the math +alphabets.

  • +
  • The \vec command produces an arrow accent.

  • +
+

The isomath package implements an ISO math style and provides +new math alphabets with bold italic and sans-serif bold italic +typeshape that can be used for vector and tensor symbols.

+
+

1.1 ISO math style

+

The required package fixmath changes the default math layout to the +“ISO” math style:

+
    +
  • Uppercase Greek letters are typeset italic by default.

  • +
  • Both, Greek and Latin letters change shape if a different +math alphabet is used.

  • +
+

However, fixmath works only for the Computer Modern font family. +With isomath,

+
    +
  • the used math fonts are configurable (using the rmdefault and +sfdefault options), and

  • +
  • upright Greek letters can be made available through the common +\math* alphabets via the OMLmath* options if the +corresponding fonts support the OML font encoding.

  • +
+
+

Caution!

+

Using Greek letters in standard math alphabets, e. g., +\mathrm{\pi}, can lead to garbage, as the standard math +alphabets are usually taken from text fonts that have ligatures and +non-alpha symbols in place of the small Greek letters. +Do not use small Greek letters in the standard math alphabet commands +mathit, mathrm, mathbf, mathsf, and mathtt +unless you use the OMLmath* options.

+

Some packages provide alternative macros or options for upright +Greek letters (cf. Table 6).

+
+
+
+

1.2 New math alphabets

+

Isomath defines three new math alphabets:

+
+ +++++ + + + + + + + + + + + + + + +

\mathbfit

boldface italic

vector and matrix symbols

\mathsfit

sans-serif italic

optional (see OMLmath*_ options)

\mathsfbfit

sans-serif bold italic

tensor symbols

+
+

The rmdefault and sfdefault options set the font family used for +these alphabets.

+
+

Caution!

+

Using the new math alphabets for numbers can result in upright +old-style numbers instead of italic ones, because some italic math +fonts (e. g., cmr, cmbr) have old-style numbers in place of italic +digits.

+
+

For compatibility with earlier versions and related packages, the +new math alphabets are also available under the aliases +\mathbold, \mathsans, and \mathboldsans.

+
+
+

1.3 Semantic markup

+

The following commands set the argument in an ISO-conforming math alphabet:

+
+ ++++ + + + + + + + + +

\vectorsym, \matrixsym

bold italic for Greek and Latin letters, +bold upright for numbers

\tensorsym

sans-serif bold italic

+
+
+
+
+

2 Usage

+

Make sure that LaTeX can find isomath.sty and load it with +\usepackage (see also Options and Examples).

+
+

2.1 Options

+
+

2.1.1 rmdefault

+

Family for serif math fonts (\mathrm, \mathbf, \mathit, +\mathbfit). The default is to use the corresponding text font +family (the value of \rmdefault). The font must be available in +OML font encoding (cf. Table 3).

+
+
+

2.1.2 sfdefault

+

Family for sans-serif math fonts. The default is cmbr because many +sans-serif fonts define the Computer Roman font cmm as OML substitution +(see Table 4).

+

There are only few sans serif fonts in OML font encoding:

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Package

Comment

cmbr

cmbright

Computer Modern Bright, bitmap, slightly lighter +than cmss (Type 1 fonts with hfbright)

fav

arev

Arev (Vera Sans) with math extension, +large x-height

iwona

iwona

Humanistic Sans Serif, +some shapes very similar to roman

hvm

hvmath

Helvetica Math, commercial, free bitmap version

llcmss

lxfonts

LX Fonts, very wide, eccentric, large x-height, +new in 2008

+
+
+

2.1.3 scaled

+

To improve the chances of configuring a matching sans serif math font, +the fonts, fav, llcmss, and iwona can be scaled with the +scaled option (cf. Examples).

+
+
+

2.1.4 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.1

+
1
+
+

To access the upright shapes, the corresponding \textbf and +\textsf commands might be used. However, this toggles the +math-mode off and might use a different font, so watch for +side-effects.

+
+
+
+
+

2.1.5 OMLmathrm, OMLmathbf, OMLmathsf, OMLmathsfit, OMLmathtt

+

With Greek letters defined as \mathalpha, the letter fonts are +expected to be in OML font encoding. The predefined +math alphabets, however, use OT1 encoded text fonts. These fonts +have ligatures and accents in place of the small Greek letters. +The \mathsfit alphabet is not required for ISO conforming math.

+

The OMLmath* options bind the corresponding \math* command to an +OML-encoded font. +This enables use of small Greek letters in math alphabet commands, +e. g., \mathrm{\pi} if an OML encoded font is available. +Table 3 lists font families supporting the OML encoding.

+
+

Caution!

+

If no matching OML encoded font is found, LaTeX's substitute +mechanism kicks in and selects a font with different font attributes +(for all letters, not only Greek). Currently, only the mathdesign +package provides upright fonts in OML encoding. Many font packages +define an italic font as OML substitute for roman fonts.

+

With some packages, these options can result in a “too many math +alphabets used in version normal” error.

+
+
+
+
+

2.2 Examples

+
    +
  • Redefine the standard \vec command to set its argument in an +ISO-conforming math alphabet.:

    +
    \usepackage{isomath}
    +\renewcommand{\vec}{\vectorsym}
    +
    +
  • +
  • Use scaled arev fonts for the sans serif alphabets +(adapt the scaling factor to your needs):

    +
    \usepackage[sfdefault=fav,scaled=0.875]{isomath}
    +
    +
  • +
  • Define the \mathsfit sans-serif italic math alphabet:

    +
    \usepackage[OMLmathsfit]{isomath}
    +
    +
  • +
  • The \mathbfit and \mathsfbfit alphabets do not have a different +weight in the bold math version because the number of LaTeX math +fonts providing extrabold or ultrabold series is negligible.

    +

    As a workaround, use the heavier arev font, scaled to 0,875, in the +bold version of \mathsfbfit:

    +
    \usepackage{isomath}
    +\DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{}
    +\SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it}
    +
    +
  • +
+

See also the isomath-test.tex test document.

+
+

2.2.1 How to get upright small Greek letters

+

Of the following methods, only the first requires isomath:

+
    +
  1. Use isomath and the mathdesign package:

    +
    \usepackage[utopia]{mathdesign}
    +\usepackage[OMLmathrm,OMLmathbf]{isomath}
    +
    +

    Now, e. g., \mathrm{\pi} and \mathbf{\pi} work as +expected.

    +
  2. +
  3. To get upright small Greek letters without affecting other fonts, +set the math alphabet manually to one of the three mathdesign +fonts, e. g.:

    +
    \SetMathAlphabet{\mathbf}{normal}{OML}{mdput}{b}{n}
    +
    +

    (check if the letter shapes match with the rest of the document).

    +
  4. +
  5. Use a package that provides macros for upright Greek letters +in math:

    +
    + ++++ + + + + + + + + + + + + + + +

    fourier

    \otheralpha ... \otherOmega

    kpfonts

    \alphaup ... \Omegaup

    mathdesign

    \alphaup ... \Omegaup

    upgreek

    \upalpha ... \upOmega

    +
    +
  6. +
  7. Use an upright text character (requires a matching LGR-encoded +Greek text font). The following lines redefine \pi to set +the mathematical constant pi upright:

    +
    \usepackage[LGR,T1]{fontenc}
    +\usepackage[greek,british]{babel}
    +\usepackage{amsmath}
    +\let\mathpi\pi
    +\renewcommand{\pi}{\text{\textrm{\greektext p }}}
    +
    +
  8. +
+
+
+
+ +
+

4 Background

+

This section discusses LaTeX math font selection, suitable +math letter fonts for the ISO math style, and the relation of LaTeX and +Unicode mathematical typesetting.

+
+

4.1 Math font selection

+

There are three complementary methods to set font attributes in LaTeX +math mode: LaTeX 2e font selection [fntguide] describes math +alphabets and math versions, several extension packages +provide alternative math styles (cf. Table 2).

+
+

4.1.1 Math alphabets

+

Math alphabets are a counterpart to the mathematical alphanumeric +symbols block in Unicode. Both are “to be used for mathematical +variables where style variations are important semantically”. +The font guide [fntguide] defines in +section 3:

+
+

Some math fonts are selected explicitly by one-argument commands +such as \mathsf{max} or \mathbf{vec}; such fonts are called +math alphabets.

+

Math fonts [...] have the same five attributes as text fonts: +encoding, family, series, shape and size. However, there are no +commands that allow the attributes to be individually changed. +Instead, the conversion from math fonts to these five attributes is +controlled by the math version.

+

The predefined math alphabets are:

+
+ ++++ + + + + + + + + + + + + + + + + + + + + + + + +

\mathnormal

default2

\mathrm

roman3

\mathbf

bold roman

\mathsf

sans serif

\mathit

text italic

\mathtt

typewriter

\mathcal

calligraphic

+
+
+
2
+
+

\mathnormal is used by default for alphanumeric +characters in math mode. It sets the letter shape according to +character class and math style. (Table 1 shows the default +letter shapes for common math styles).

+
+
3
+
+

The specifier “roman” is ambiguous: roman shape +stands for upright, while roman type stands for serif (as +opposed to sans serif).

+
+
+

Many packages define additional math alphabets (cf. Table 6).

+

In contrast to the similar named text commands, math alphabets are +not orthogonal, e. g., the code $\mathit{\mathbf{a}}$ sets the +letter a in upright bold type.

+
+
+

4.1.2 Math versions

+

The number of mathematical symbols exceeds the maximal number of +characters in a TeX font file by an order of magnitude.4 +Grouping math fonts with common characteristics in math versions +simplifies the setting of font attributes for mathematical expressions.

+

Math versions set up “math symbol fonts” for non-alphanumeric +symbols and bind the math alphabet commands to fonts using default +values for non-specified font attributes. TeX limits the number of +(symbol + alphanumeric) fonts per math version to 16.

+

The predefined math versions are normal and bold with the +defaults:

+
+ +++++ + + + + + + + + + + + + + + + + + + +
+

normal

bold

type

serif

serif

weight

medium

bold

shape

upright

upright

+
+

Packages can define additional math versions, e. g., the wrisym package +defines a mono math version. A sans math version example is +available from a comp.text.tex post

+

Math versions are intended for mathematical content in a special +context, e. g., a bold section heading. +Setting a math version resembles the individual selection of text +font attributes (bold, sans-serif, monospaced).

+

Math versions can only be changed outside of math mode. The commands +\boldsymbol (amsmath) and \bm (bm) behave like “in-line +math versions”: they typeset their argument using the fonts of the +bold math version but can be used inside math mode.

+

Example: four ways to set the letter a in a bold +sans-serif font:

+
% Text                 Math:
+\textbf{\textsf{a}}    $\bm{\mathsf{a}}$
+\bfseries \textsf{a}   \mathversion{bold} $\mathsf{a}$
+
+
4
+
+

Unicode provides about 2500 math characters. Font files used +by 8-bit TeX engines can hold up to 256 characters. The standard +math fonts adhere to the original limit of 128 characters.

+
+
+
+
+

4.1.3 Math styles

+

A math style is a document-level feature that determines the default +letter shape in math mode (i. e. the shape attribute of letters in the +\mathnormal math alphabet).

+ + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Default letter shapes for common math styles

math style

latin

Latin

greek

Greek

TeX

it

it

it

up

ISO

it

it

it

it

French

it

up

up

up

upright

up

up

up

up

+

LaTeX defaults to the “TeX” math style (without naming it such). +Alternative math styles are introduced by extension packages +(Table 2).

+ + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Packages providing math styles

math style

Package

Option(s)

ISO

fixmath

 
+

isomath

 
+

kpfonts

slantedGreeks

+

lucimatx

math-style=iso

+

mathdesign

greekuppercase=italicized

+

mathpazo

slantedGreek

+

mathptmx

slantedGreek

+

unicode-math

math-style=ISO

French

fourier

upright

+

kpfonts

frenchstyle (or upright)

+

lucimatx

math-style=french

+

mathdesign

uppercase=upright, greeklowercase=upright

+

unicode-math

math-style=french

upright

eulervm

 
+

lucimatx

math-style=upright

+

unicode-math

math-style=upright

+
+
+
+

4.2 Math letter fonts

+

The equal treatment of Latin and Greek letters in the ISO math +style is simplest achieved with a font that contains all required +letters in one file.

+

There is only one established LaTeX font encoding that contains Latin and +Greek letters, the OML font encoding. The standard Greek font +encoding T7 is just a “reserved name” and the de-facto standard +Greek text font encoding LGR has no Latin letters. Unfortunately, +OML support is limited to a few (mostly italic) fonts.

+
+

4.2.1 OML font encoding

+

The LaTeX font encodings guide [encguide] names the OML encoding +TeX math italic and defines:

+
+

The OML encoding contains italic Latin and Greek letters for use in +mathematical formulas (typically used for variables) together with some +symbols.

+
+

The reference to italic shape is odd:

+
    +
  • No other font encoding is specific to the font shape.

  • +
  • The different font selection and the semantic of font features in +math do not interfere with the font encoding: Both, +\DeclareSymbolFont and \DeclareMathAlphabet require a +shape argument. Thus it is possible to set up OML encoded math +alphabets in roman {n} as well as italic {it} shape without +conflicts.

  • +
+

This seems to be more a remnant of pre-NFSS times than a necessary +restriction – there is only one OML encoded font in Knuth's Computer +Modern fonts: Computer Modern Math Italic (cmmi).

+

Proposals:

+
    +
  • Drop the italic from the definition. Optionally add an explanation:

    +
    +

    The OML encoding contains Latin and Greek letters for use in +mathematical formulas (typically used for variables) together with +some symbols. It first appeared in the Computer Modern Math +Italic (cmmi) font.

    +
    +
  • +
  • The name TeX math italic can be interpreted as “the encoding +of Computer Modern Math Italic” rather than “an encoding +for math italic” fonts.

    +

    A less confusing name would be TeX math letters or Original/Old +Math Letters. The latter would also explain the acronym OML.

    +
  • +
+
+
+

4.2.2 OML Support

+

Unfortunately, support for the OML encoding is missing for many font +families even if the text font defines Greek letters. +Supported font families can be found searching for oml*.fd files +and grepping for DeclareFont.*OML in *.sty files.

+

Table 3 lists the findings for a selection of TeXLive 2009 + some +additionally installed font packages.

+
    +
  • 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 upright shape, +however mapping to an italic variant of the OML encoded font. These +are not listed as supporting m/n or bx/n here.

  • +
+ + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Font families supporting the OML encoding

Name

Family

m/it

bx/it

m/n

bx/n

aer

AE (Almost European)

  

antt

Antykwa Torunska

  

cmr

Computer Modern Roman

  

ccr

Concrete

  

cmbr

Computer Modern Bright

  

hlh

Lucida

  

hfor

CM with old-style digits

  

iwona

Iwona (sans serif)

  

jkp

Kepler Serif

  

jkpl

Kepler Serif

  

jkpvos

Kepler Serif

  

jkplvos

Kepler Serif

  

llcmm

LX Fonts (sans serif)

  

lmr

Latin Modern Roman

  

mak

Kerkis

   

kurier

Kurier

  

mdbch

Math Design Charter

mdput

Math Design Utopia

mdugm

Math Design Garamond

neohellenic

GFS Neohellenic

   

plcm

CM (PLaTeX)

   

ptmom

Times (Omega or MB-Times)

  

ptmomu

Times (Omega or MB-Times)

  

ptmcm

Times (psfont)

   

pxr

Palatino (pxfonts)

  

qpl

Palatino/Pagella (qpxmath)

  

qtm

Times/Termes (qtxmath)

  

txr

Times (txfonts)

  

udidot

Didot (gfsdidot)

   

ywclm

(greektex)

  

zavm

Arev (Vera Sans-Serif)

  

zesfcm

(efont)

   

zplm

Palatino (mathpazo)

  

zpple

Palatino

  

ztmcm

Times (mathptmv)

   

zer

Computer Modern (zefonts)

  
+

Table 4 lists some fonts that define cmm as OML substitution. +With isomath, a better matching substitution can be set using the +rmdefault or sfdefault options.

+ + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Non-CM fonts with cmm as OML substitution

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)

+
+
+
+

4.3 Unicode mathematical typesetting

+

The technical report [tr25] presents an in-depth discussion of the +mathematics character repertoire of the Unicode Standard as well as +mathematical notation in general.

+

This section compares math font selection in LaTeX and Unicode. +It suggests a set of 14 math alphabets that covers all Unicode +mathematical alphanumeric symbols and discusses compatibility +issues between math typesetting with traditional (8-bit) TeX engines +versus the unicode-math package for Unicode-enabled TeX engines +(XeTeX, LuaTeX).

+
+

4.3.1 Unicode math alphabets

+

Chapter 2 Mathematical Character Repertoire of [tr25] lists 14 +Mathematical Alphabets in Table 2.1. These mathematical alphabets are a +superset of the predefined math alphabets in the LaTeX core.

+

Unicode assignes code points to most letters of the mathematical +alphabets in the mathematical alphanumeric symbols Unicode block. +The plain (upright, serifed) letters have been unified with the +existing characters in the Basic Latin and Greek blocks.

+

Table 5 maps the 14 Unicode mathematical alphabets to LaTeX commands +according to the naming scheme below. Table 6 lists the status of +LaTeX support for the mathematical alphanumeric symbols. Full support is +provided by the unicode-math package.

+ + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mapping Unicode mathematical alphanumeric symbols to LaTeX +math alphabets.

serifs

weight

shape

symbols

math alphabet

serif

medium

upright

Latin/Greek/digits5

\mathrm

+

bold

 

Latin/Greek/digits

\mathbf

+ 

italic

Latin/Greek

\mathit

+

bold

italic

Latin/Greek

\mathbfit

+ 

script

Latin

\mathcal

+

bold

script

Latin

\mathbfcal

+ 

fraktur

Latin

\mathfrak

+ 

double-struck

Latin/digits

\mathbb

+

bold

fraktur

Latin

\mathbffrak

sans serif

  

Latin/digits

\mathsf

sans serif

bold

 

Latin/Greek/digits

\mathsfbf

sans serif

 

italic

Latin

\mathsfit

sans serif

bold

italic

Latin/Greek

\mathsfbfit

+ 

monospace

Latin/digits

\mathtt

+
5
+
+(1, 2)

plain standard characters outside the +mathematical alphanumeric symbols Unicode block.

+
+
+
+

4.3.1.1 Naming scheme

+

The naming scheme is an extension of the predefined math alphabet +commands with the short-cuts

+
+ ++++ + + + + + + + + + + + + + + + + + + + + +

bf

bold,

it

italic,

cal

script (calligraphic),

frak

fraktur,

bb

double-struck (blackboard bold),

sf

sans serif

+
+

combined to commands in the form \math<type><weight><shape>.

+

The <type>, <weight>, and <shape> specifiers are optional +(defaults depend on the math version). Their order matches the +names of Unicode Mathematical Alphanumeric Symbols.

+

Examples:

+
\mathbf{d}     % MATHEMATICAL BOLD SMALL D
+\mathsfbfit{d} % MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D.
+
+ + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LaTeX support for mathematical alphanumeric symbols.

style

math alphabet

package, comment

plain5

\mathrm

predefined6

+

\mathup

unicode-math

bf

\mathbf

predefined6

it

\mathit

predefined6

bf it

\mathbfit

isomath7

+

\mathbold

fixmath, mathpazo, +mathptmx, tmmath7

+

\boldsymbol

amsmath

+

\bm

bm

cal

\mathcal

predefined8

+

\mathscr

mathrsfs, euscript, +mathdesign

bf cal

\mathbfscr

unicode-math

frak

\mathfrak

amssymb, amsfonts, eufrak

bf frak

\mathbffrak

unicode-math

bb

\mathbb

amssymb, bbold, +mathbbol, mbboard, +mathpazo

+

\mathbbm

bbm

+

\mathds

dsfont (doublestoke)

sf

\mathsf

predefined6

sf bf

\mathbfsfup

unicode-math

sf it

\mathsfit

isomath7

sf bf it

\mathsfbfit

isomath7

+

\mathbold

cmbright, hvmath

+

\mathbfsfit

unicode-math

tt

\mathtt

predefined6

+
6
+
+(1, 2, 3, 4, 5)

no small Greek, full Greek with OMLmath* options.

+
+
7
+
+(1, 2, 3, 4)

Some italic math fonts (e. g., cmr, cmbr) have old-style +numbers in place of italic digits.

+
+
8
+
+

no small Latin, formal script with calrsfs, eucal, fourier

+
+
+
+
+
+

4.3.2 The unicode-math package

+

Users of UTF-8 enabled TeX engines (XeTeX, LuaTeX) can typeset +mathematics with the experimental unicode-math package by Will +Robertson. It provides a LaTeX interface to OpenType fonts with math +support, e. g., Asana Math, Cambria Math, New Euler or XITS, with +commands to access the complete mathematics character repertoire of the +Unicode Standard

+

LaTeX math font selection methods with unicode-math:

+
+
math alphabets
+

map to a range of the mathematical alphanumeric symbols block in the +current font (or a substitution defined with the range math font +option).

+

Some command names differ from the predefined math alphabets or the +above naming scheme:

+ ++++ + + + + + + + + + + + + + + + + + + + +

LaTeX

unicode-math

\mathbf

\mathbfup

\mathsf

\mathsfup

\mathsfbf

\mathbfsfup

\mathsfbfit

\mathbfsfit

+

With unicode-math, \mathbf, \mathsf, and \mathsfbf +behave similar to “in-line math versions”: they consider the +math style for upright vs. italic shape. Compatibility can be +achieved via the options bold-style=upright and +sans-style=upright.

+

\mathbfsfit reverses the order of the sf and bf selectors, +so that, e. g., the Unicode character MATHEMATICAL SANS-SERIF BOLD +ITALIC CAPITAL A is selected by the non-mnemonic \mathbfsfit{A}.

+
+
math versions
+

are not directly supported but easy to emulate.

+

As Unicode fonts can hold all math symbols in a single font file, a +single \setmathfont[<font features>]{<font name>} can replace +the \mathversion{<mathversion>} command if a complete OpenType +math font in the desired version is available.

+

However, complete OpenType math fonts are rare. Therefore +unicode-math supports using multiple fonts with the range +option. This way one can emulate, e. g., the bold math version +via:

+
\renewcommand{\boldmath}{%
+  \setmathfont{XITS Bold}%
+  \setmathfont[range={"1D400-"1F020}]{XITS Math}%
+  \setmathfont[range=\mathup->\mathbfup]{XITS Math}%
+  \setmathfont[range=\mathsfit->\mathbfsfit]{XITS Math}%
+  % ...
+}
+
+

It would be nice if unicode-math could provide a \newmathversion +command similar to the \newfontfamily in fontspec for such setups.

+

For alphanumerical characters, the \mathbf, \mathsf, and +\mathsfbf behave like “in-line math versions”.

+
+
math styles
+

are supported with the math-style package option that accepts the +values TeX, ISO, french, upright, and literal.

+
+
+
+
+
+

4.4 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 a LaTeX equivalent of the +mathematical alphanumeric symbols Unicode block.

+

This should be (relatively) easy to achieve via virtual fonts when the +glyphs for the Greek letters already exist. Examples are Latin Modern, +Kerkis, GFS Neohellenic, LX Fonts and KP-Serif.

+

Alternatively, the T7 encoding could be used for math alphabets (if it +ever happens to materialise).

+

Upright small Greek letters in \mathrm would enable the +specification of the constant pi, Myons, Pions, alpha-particles, +photons, and neutrinos with math alphabets. (With mathdesign +fonts, this is already possible today.)

+

With the development of the unicode-math package, an interesting +alternative for ISO-conforming math typesetting became available to +users of Unicode-enabled TeX engines (XeTeX or LuaTeX).

+
+
+
+

5 References

+
[ISO-80000-2]
+
+

Quantities and units – Part 2: Mathematical signs +and symbols to be used in the natural sciences and technology: +http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=31887.

+
+
+
[ISO-31]
+
+

Quantities and units, Superseded by [ISO-80000].

+
+
+
[typefaces]
+
+

National Institute of Standards and Technology (NIST), +Typefaces for Symbols in Scientific Manuscripts: +http://physics.nist.gov/cuu/pdf/typefaces.pdf.

+
+
+
[checklist]
+
+

National Institute of Standards and Technology (NIST), +SI Unit rules and style conventions +Check List for Reviewing Manuscripts: +http://physics.nist.gov/cuu/Units/checklist.html.

+
+
+
[fonts_for_symbols]
+
+

International Union of Pure and Applied +Chemistry (IUPAC), 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]
+
+

Bureau international des poids et mesures (BIPM), +The International System of Units (SI): +http://www.bipm.org/en/si/si_brochure/.

+
+
+
[Green-Book]
+
+

International Union of Pure and Applied Chemistry (IUPAC), +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].

+
+
+
[Red-Book]
+
+

International Union of Pure and Applied Physics (IUPAP), +Symbols, Units, Nomenclature and Fundamental Constants in Physics: +http://metrology.wordpress.com/measurement-process-index/iupap-red-book/index-iupap-red-book/.

+
+
+
[encguide]
+
+

Frank Mittelbach, Robin Fairbairns, Werner Lemberg, +LaTeX3 Project Team, LaTeX font encodings: +http://mirror.ctan.org/macros/latex/doc/encguide.pdf.

+
+
+
[fntguide]
+
+(1, 2)

LaTeX3 Project Team, LaTeX 2e font selection: +http://mirror.ctan.org/macros/latex/doc/fntguide.pdf.

+
+
+
[tr25]
+
+(1, 2)

Barbara Beeton, Asmus Freytag, Murray Sargent III, +Unicode Support for Mathematics, Unicode Technical Report #25: +http://www.unicode.org/reports/tr25/.

+
+
+
[beeton:2000]
+
+

Barbara Beeton: +Unicode and math, a combination whose time has come – Finally!, +TUGBoat, 21#3, 2000: +http://www.tug.org/TUGboat/Articles/tb21-3/tb68beet.pdf.

+
+
+ + +
+
+ + diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.pdf b/Master/texmf-dist/doc/latex/isomath/isomath.pdf index 161ef30edb6..b91d0a8ef3a 100644 Binary files a/Master/texmf-dist/doc/latex/isomath/isomath.pdf and b/Master/texmf-dist/doc/latex/isomath/isomath.pdf differ diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.html b/Master/texmf-dist/doc/latex/isomath/isomath.sty.html index 8a9e5af86af..8d459c5d09e 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.sty.html +++ b/Master/texmf-dist/doc/latex/isomath/isomath.sty.html @@ -1,6 +1,6 @@ - - + + @@ -10,7 +10,7 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 6387 2010-08-13 12:23:41Z milde $ +:Id: $Id: html4css1.css 6511 2011-01-03 14:49:11Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. @@ -190,7 +190,7 @@ img.align-center, .figure.align-center, object.align-center { /* reset inner alignment in figures */ div.align-right { - text-align: left } + text-align: inherit } /* div.align-center * { */ /* text-align: left } */ @@ -341,8 +341,8 @@ body { /* avoid long lines --> better reading */ /* OTOH: lines should not be too short because of missing hyphenation, */ div.document { - max-width: 45em; - margin: 0 auto; + max-width: 45em; + margin: auto; } /* separate items except for compact lists */ @@ -376,8 +376,7 @@ div.sidebar { /* Special definition lists */ /* ======================== */ -/* start definition term on the same line as the label */ - +/* bold definition term on the same line as the label */ dl.field-list > dt, dl.option-list > dt, dl.docinfo > dt, dl.footnote > dt, dl.citation > dt, dl.description > dt { clear: left; @@ -385,31 +384,27 @@ dl.footnote > dt, dl.citation > dt, dl.description > dt { margin: 0; padding: 0; padding-right: 0.5em; -/* background: yellow; */ -} - -/* Definition list with the layout of a LaTeX `description` list */ -/* (bold label, continue on same line) */ -dl.description > dt { font-weight: bold; } +/* except for these */ +dl.option-list > dt, dl.footnote > dt { + font-weight: normal; +} + + /* Field Lists */ /* ----------- */ -/* field names: bold, followed by a colon */ -dl.field-list > dt, dl.docinfo > dt { - font-weight: bold; -} +/* field names followed by a colon */ dl.field-list > dt:after, dl.docinfo > dt:after { content: ":"; } /* Offset for field content (corresponds to the --field-name-limit option) */ dl.field-list > dd { - margin-left: 8.5em; + margin-left: 9em; /* ca. 14 chars in the test examples */ padding-left: 0.5em; -/* background: yellow; */ } /* start field-body on a new line after long field names */ @@ -420,8 +415,8 @@ dl.field-list > dd p { } dl.field-list > dd > p:first-child, -dl.field-list > dd > ol:first-child, -dl.field-list > dd > ul:first-child, +/* dl.field-list > dd > ol:first-child, */ +/* dl.field-list > dd > ul:first-child, */ dl.field-list > dd > dl:first-child { display: inline-block; } @@ -452,16 +447,12 @@ dl.field-list.fix-labelwidth > dd:after { /* docinfo */ -dl.docinfo { - margin: 2em 2em; /* setting from html4css1.css */ - padding-left: 0; -} - dl.docinfo > dd { margin-left: 8em; /* margin-bottom: 0.5em; */ } + /* option list */ dl.option-list { @@ -486,7 +477,7 @@ a.footnote-reference, a.fn-backref { text-decoration: inherit; /* do not underline footnote links */ } -dl.footnote, dl.citation { +dl.footnote { /* line on the left */ padding-left: 1ex; border-left: solid; @@ -494,8 +485,15 @@ dl.footnote, dl.citation { /* border-color: black; */ } +/* paragraph on same line as backrefs */ +dd > em { +/* background: green; */ + float: left; + margin-right: 1ex +} + -/* +/* Ordered List (Enumeration) -------------------------- @@ -512,7 +510,6 @@ ol { /* Set the negative indent of the list label as feature of the list item */ ol > li { text-indent: -40px; /* Mozillas default indent */ - margin-bottom: 1em; } /* Label */ @@ -573,96 +570,120 @@ ol.nested > li:before, ol.nested ol > li:before { /* smaller font for super- and subscripts */ /* sub, sup {font-size: 70%;} */ /* Mozilla default is `smaller` */ -/* unordered lists */ -/* --------------- */ - -/* drop bullets from Table of Contents */ -/* div.topic.contents ul { */ -/* list-style: none; */ -/* } */ /* Tables */ -/* ------ */ +/* ====== */ /* borders for "normal" tables */ -table.table { +table { + margin-top: 0.5em ; + margin-bottom: 0.5em; border-style: outset; border-width: thin; + /* border-collapse: collapse; */ } -table.table td, table.table th { +td, th { border-style: inset; border-width: thin; + /* text-align: left; */ + padding: 0 1ex; +} + +td > p:first-child, th > p:first-child { + margin-top: 0; +} +td > p, th > p { + margin-bottom: 0; } /* no borders for "borderless" tables */ -table.table.borderless, table.table.borderless * { +table.borderless, table.borderless * { border-style: none; } +/* "booktabs" style (no vertical lines) */ +table.booktabs { + border: 0; + border-top: 2px solid; + border-bottom: 2px solid; + border-collapse: collapse; +} + +table.booktabs * { + border: 0; +} +table.booktabs th { + border-bottom: thin solid; +} + +table > caption { + text-align: left; +/* padding: 2em 0 1em 0; */ +} + /* numbered tables and figures*/ body { counter-reset: table; - counter-reset: figure; +/* counter-reset: figure; */ } table.numbered > caption:before { counter-increment: table; - content: "table " counter(table) ": "; + content: "Table " counter(table) ": "; font-weight: bold; } - -table > caption { - text-align: left; - padding: 2em 0 1em 0; -} - /* whitespace and line-wrapping in inline literals ----------------------------------------------- */ /* possible values: normal, nowrap, pre, pre-wrap, pre-line */ -tt.docutils.literal { +tt.literal { white-space: pre-wrap; } + +/* Table of Contents */ + +/* don't indent like a topic */ +div.topic.contents { + margin: 0; +} +/* div.topic.contents ul { */ +/* list-style: none; */ +/* } */ + +div.topic.contents a { + text-decoration: none; /* no underline for links */ +} + +/* section numbers */ + +span.sectnum { + padding-right: 1ex; +} + +/* admonitions */ + +/* no padding for top and bottom */ +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + padding: 0px 1em } + @@ -712,16 +768,16 @@ dl.field-list > dd {
-
© 2008, 2010 Günter Milde
+
Licence
-
This work may be distributed and/or modified under the +

This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either -version 1.3 of this license or (at your option) any later version.

+version 1.3 of this license or (at your option) any later version.

+
Identification
-
-\NeedsTeXFormat{LaTeX2e}
+
\NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{isomath}
-[2010/08/23 v0.4 math according to ISO 31]
+[2011/02/01 v0.5 ISO math style]
 
@@ -730,359 +786,389 @@ version 1.3 of this license or (at your option) any later version.

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.

+by the International Standard ISO 80000-2.

+
+
-

History

- +

History

+
- - - + + + - - - + + + + + + + + + + + - + - + - + + + + + - + - + - + - - - + + + - + - + - + - + + + + + - - - + + + - + - + - + - +
0.12008-09-25first public version.

0.1

2008-09-25

first public version.

0.22008-10-02bugfix: a usage example was uncommented;

0.2

2008-10-02

bugfix: a usage example was uncommented;

 

updated documentation;

 

define mathsans only if OMLmathsans is true;

 updated documentation;

option reuseMathalphabets -> reuseMathAlphabets.

0.3

2009-06-19

documentation update;

 define mathsans only if OMLmathsans is true;

fix OMLmathrm and OMLmathsans definitions;

 option reuseMathalphabets -> reuseMathAlphabets.

switch license to LPP.

0.32009-06-19documentation update;

0.4

2010-08-23

split user documentation from literate source;

 fix OMLmathrm and OMLmathsans definitions;

option scaled;

 switch license to LPP.

documentation update.

0.5

2011-01-04

math alphabet names matching Unicode;

0.42010-08-23split user documentation from literate source;

 

documentation review and extension;

 option scaled;

bold alphabet variants in bold math version;

 documentation update.

upright numbers with \vectorsym.

-
-

Requirements

+

Requirements

-

fixmath.sty

-

The package fixmath by Walter Schmidt defines Greek letters as symbols -of type \mathalpha and takes them from the letters SymbolFont in -\mathnormal (as opposed to operators in fontmath.ltx).

-

fixmath also defines the \mathbold alphabet, setting it to cmm. +

fixmath.sty

+

The package fixmath by Walter Schmidt defines Greek letters as symbols +of type \mathalpha and takes them from the letters SymbolFont in +\mathnormal (as opposed to operators in fontmath.ltx).

+

fixmath 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}
+
\RequirePackage{fixmath}
 
-

kvoptions.sty

-

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

-
-\RequirePackage{kvoptions}
+

kvoptions.sty

+

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

+

Options

-

rmdefault

+

rmdefault

Family for roman math fonts. Must be available in OML encoding. The default is to use the corresponding text font family -(\rmdefault).

-
-\DeclareStringOption[\rmdefault]{rmdefault}
+(\rmdefault).

+
\DeclareStringOption[\rmdefault]{rmdefault}
 
-

sfdefault

+

sfdefault

Family for sans-serif math fonts. The default selects CM Bright, as most sans serif fonts are not available in OML encoding:

-
-\DeclareStringOption[cmbr]{sfdefault}
+
\DeclareStringOption[cmbr]{sfdefault}
 
-

scaled

-

The sans-serif fonts, fav (Arev), llcmss (LX Fonts), and -iwona can be scaled with the scaled option.

-
-\DeclareStringOption[1.0]{scaled}
-% Use a key definition like in inconsolata.sty (cf. also helvet.sty)?
-% \define@key{isomath}{scaled}[1.0]{\def\isomath@scaled{s*[#1]}}
+

scaled

+

The sans-serif fonts, fav (Arev), llcmss (LX Fonts), and +iwona can be scaled with the scaled option.

+
\DeclareStringOption[1.0]{scaled}
 
-

reuseMathAlphabets

+

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.

-
-\DeclareBoolOption{reuseMathAlphabets}
+
\DeclareBoolOption{reuseMathAlphabets}
 
-

OMLmath*

+

OMLmath*

The following options cause isomath to (re)define the corresponding math alphabets in OML encoding:

-
-\DeclareBoolOption{OMLmathrm}
+
\DeclareBoolOption{OMLmathrm}
 \DeclareBoolOption{OMLmathbf}
 \DeclareBoolOption{OMLmathsf}
-\DeclareBoolOption{OMLmathsans}
+\DeclareBoolOption{OMLmathsfit}
 \DeclareBoolOption{OMLmathtt}
+% backwards compatibility option alias
+\DeclareVoidOption{OMLmathsans}{\isomath@OMLmathsfittrue}
 

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, only the mathdesign fonts support roman in +different shapes with e.g. \mathrm{\pi} if an OML encoded font +is available. Currently, only the mathdesign fonts support roman in OML encoding.

With some packages, these options can result in a “too many math alphabets used in version normal” error.

-
-
-

Process Options

-

Process the options with kvoptions extensions:

-
-\ProcessKeyvalOptions*
+
+

Process the options with kvoptions extensions:

+
\ProcessKeyvalOptions*
 
-

Declarations

+

Declarations

-

Math alphabets

+

Math alphabets

In math, LaTeX uses “absolute” fontnames instead of a selection by family, shape, and weight because typefaces have a semantic meaning -(see fntguide).

+[fntguide].

isomath defines a math alphabet for every required font variant and optionally re-defines 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 -reuseMathAlphabets option reduces this number by two, with the -side effect of italic shape with \mathbf and \mathsf commands:

-
-\ifisomath@reuseMathAlphabets
+reuseMathAlphabets option reduces the number of math alphabet
+definitions by two, with the side effect of italic shape with
+\mathbf and \mathsf commands:

+
\ifisomath@reuseMathAlphabets
   \PackageWarningNoLine{isomath}{%
-    Re-using math alphabet `mathsf' for \protect \mathboldsans
-    \MessageBreak and `mathbf' for \protect \mathbold
+    Re-using math alphabet `mathsf' for \protect \mathsfbfit
+    \MessageBreak and `mathbf' for \protect \mathbfit
   }
 \fi
 
-
-

mathbold

-

The italic bold math alphabet is named \mathbold like in -fixmath and related packages. With the reuseMathAlphabets option, -the roman bold math alphabet \mathbf is redefined and -\mathbold made an alias (overwriting existing definitions):

-
-\ifisomath@reuseMathAlphabets
+
+

mathbfit

+

The bold italic math alphabet is named \mathbfit like in +unicode-math (with an alias \mathbold like in fixmath and +related packages). With the reuseMathAlphabets option, the roman bold +math alphabet \mathbf is redefined and \mathbfit made an +alias. The series selector bx (bold extended) is used, because it +is better supported than b. (Is there any LaTeX math font +distinguishing between b and bx?)

+
\ifisomath@reuseMathAlphabets
   \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it}
-  \def\mathbold{\mathbf}
+  \def\mathbfit{\mathbf}
 \else
-  \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it}
+  \DeclareMathAlphabet{\mathbfit}{OML}{\isomath@rmdefault}{bx}{it}
 \fi
 
+

alias (overwriting the definition from fixmath):

+
\renewcommand{\mathbold}{\mathbfit}
+
-
-

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}
+
+

mathsfit

+

For sans-serif italic, we define a new alphabet \mathsfit (with +the alias \mathsans in analogy to \mathbold). As this typeface +is not required by ISO 80000-2 and TeX limits the number of math alphabets +to 16 per math version, it is only defined if the OMLmathsfit or +OMLmathsans option is set:

+
\ifisomath@OMLmathsfit
+  \DeclareMathAlphabet{\mathsfit}{OML}{\isomath@sfdefault}{m}{it}
+  \SetMathAlphabet{\mathsfit}{bold}{OML}{\isomath@sfdefault}{bx}{it}
+  \def\mathsans{\mathsfit}
 \fi
 
-
-

mathboldsans

-

A sans serif slanted bold alphabet is needed for tensor symbols. +

+

mathsfbfit

+

The sans serif bold italic alphabet is used for tensor symbols. +Following the Unicode math name scheme it is called +\mathsfbfit``(with the backwards compatibility alias ``\mathboldsans). With the reuseMathAlphabets option, the upright sans serif math -alphabet \mathsf is redefined and \mathboldsans made an -alias:

-
-\ifisomath@reuseMathAlphabets
+alphabet \mathsf is redefined and \mathsfbfit made an
+alias to it:

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

Redefine standard alphabets

+

Redefine standard alphabets

Redefine standard alphabets in OML font encoding if the corresponding OMLmath* option is true:

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

Command aliases

+

Command aliases

The following macros allow semantic markup of mathematical symbols. -The argument is typeset as proposed by ISO 31 and -Typefaces for Symbols in Scientific Manuscripts.

+The argument is typeset as proposed by ISO 80000-2 and +Typefaces for Symbols in Scientific Manuscripts.

-

\vectorsym

-

Symbols for vectors are typeset boldface italic:

-
-\newcommand{\vectorsym}{\mathbold}
+

\vectorsym

+

Alphabetic vectors symbols are typeset boldface italic while numeric +ones (e.g. zero vector) are typeset boldface upright. The number +test is a simplified version from the LaTeX FAQ +Is the argument a number? +It fails if a number is followed by a non-number, e.g. \vectorsym{1a}, +but this is no valid vector symbol and would look strange with the +\vec accent, too.

+
\providecommand*{\vectorsym}[1]{%
+  \ifnum9<1#1%
+    \mathbf{#1}%
+  \else%
+    \mathbfit{#1}%
+  \fi}
 

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 of the documentation).

-

Attention: Some fonts (CM, Latin Modern, ...) have old-style figures in -their math italic version. The Null vector must not be written \vec{0} -in this case. Use e.g. \mathbf{0}, \boldsymbol{0} (with AMS math) or -\bm{0} (with boldmath). The latter two variants provide also a failsafe -alias for a bold vector.

+you might want to re-define the standard \vec command after loading this +package.

-

\matrixsym

+

\matrixsym

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

-
-\newcommand{\matrixsym}{\mathbold}
+
\providecommand*{\matrixsym}{\vectorsym}
 
-

\tensorsym

+

\tensorsym

Symbols for tensors are sans-serif bold italic:

-
-\newcommand{\tensorsym}{\mathboldsans}
+
\providecommand*{\tensorsym}{\mathsfbfit}
 
-

Font mappings

+

Font mappings

+

Substitutions needed for the math alphabet definitions and setup for +scaled fonts. For details about the font definition macros see +[fntguide].

+
+

Common family name for text and math

Some font packages provide matching text and 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 the package's -*.fd files.

-

For details about the font definition macros see the fntguide.

-

Mathpazo (Palatino) ppl <-> zplm

-
-\DeclareFontFamily{OML}{ppl}{\skewchar\font127}
+define a substitution in their *.fd files. Ideally, the following
+mappings should be moved there.

+

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}{}
 
+
-

Scaling

-

Scale the fav (Arev), llcmss (LX Fonts), and iwona fonts -by the value of the scaled option.

-

To get scaled versions of a font, you cannot use the ssub -size function, but must use the empty function or s with the font +

Scaling

+

Scale the fav (Arev), llcmss (LX Fonts), and iwona fonts +by the value of the scaled option.

+

To get scaled versions of a font, you cannot use the ssub +size function, but must use the empty function or s with the font file as argument [found by experiment, GM 2010-01-28].

-

Arev (see omlzavm.fd): fav <-> zavm

-
-\DeclareFontFamily{OML}{fav}{\skewchar\font127}
+

Arev (see omlzavm.fd): fav ↔ zavm

+
\DeclareFontFamily{OML}{fav}{\skewchar\font127}
 \DeclareFontShape{OML}{fav}{m}{it}{<-> s * [\isomath@scaled] zavmri7m}{}
 \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [\isomath@scaled] zavmbi7m}{}
 
-

LX Fonts (see lxfonts.sty): llcmss -> llcmm

-
-\DeclareFontFamily{OML}{llcmss}{\skewchar\font'177}
+

LX Fonts (see lxfonts.sty): llcmss ↔ llcmm

+
\DeclareFontFamily{OML}{llcmss}{\skewchar\font'177}
 \DeclareFontShape{OML}{llcmss}{m}{it}{<-> s * [\isomath@scaled] lcmmi8}{}
 \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> s * [\isomath@scaled] lcmmib8}{}
 
-

Ivona (see omliwona.fd):

-
-\DeclareFontFamily{OML}{iwona}{}
+

Ivona (see omliwona.fd) iwona ↔ mi-iwona:

+
\DeclareFontFamily{OML}{iwona}{}
 \DeclareFontShape{OML}{iwona}{m}{it}{<-> s * [\isomath@scaled] mi-iwonari}{}
 \DeclareFontShape{OML}{iwona}{bx}{it}{<-> s * [\isomath@scaled] mi-iwonabi}{}
 
-

No declarations below this point:

-
-\endinput
-
- -
+
+

References

+
[fntguide]
+
+(1, 2)

LaTeX 2e font selection: +http://mirror.ctan.org/macros/latex/doc/fntguide.pdf.

+
+
+
diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt index 2c7405d7988..df34d12eee9 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt +++ b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt @@ -1,6 +1,11 @@ isomath.sty: Math for scientists ******************************** +: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 80000-2. + :Copyright: © 2008, 2010 Günter Milde :Licence: This work may be distributed and/or modified under the conditions of the `LaTeX Project Public License`_, either @@ -11,13 +16,10 @@ isomath.sty: Math for scientists \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{isomath} - [2010/08/23 v0.4 math according to ISO 31] + [2011/02/01 v0.5 ISO math style] + +.. contents:: -: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. - History ======= @@ -35,10 +37,12 @@ History 0.4 2010-08-23 split user documentation from literate source; \ option ``scaled``; \ documentation update. +0.5 2011-01-04 math alphabet names matching Unicode; +\ documentation review and extension; +\ bold alphabet variants in ``bold`` math version; +\ upright numbers with ``\vectorsym``. === ============ ======================================================== -.. contents:: - Requirements ============ @@ -46,13 +50,12 @@ Requirements fixmath.sty ----------- The package fixmath_ by Walter Schmidt defines Greek letters as symbols -of type ``\mathalpha`` and takes them from the ``letters`` SymbolFont in +of type ``\mathalpha`` and takes them from the ``letters`` symbol font in ``\mathnormal`` (as opposed to ``operators`` in ``fontmath.ltx``). fixmath_ also defines the ``\mathbold`` alphabet, setting it to ``cmm``. -This definition will be overwritten with a configurable value for -the font family below. -:: +This definition is be overwritten with a configurable value for +the font family below. :: \RequirePackage{fixmath} @@ -91,9 +94,6 @@ The sans-serif fonts, ``fav`` (Arev), ``llcmss`` (LX Fonts), and :: \DeclareStringOption[1.0]{scaled} - % Use a key definition like in inconsolata.sty (cf. also helvet.sty)? - % \define@key{isomath}{scaled}[1.0]{\def\isomath@scaled{s*[#1]}} - reuseMathAlphabets ------------------ @@ -107,28 +107,29 @@ bold. \DeclareBoolOption{reuseMathAlphabets} - OMLmath* -------- -The following options cause `isomath` to (re)define the corresponding +The following options cause `isomath` to (re)define the corresponding `math alphabets`_ in OML encoding:: \DeclareBoolOption{OMLmathrm} \DeclareBoolOption{OMLmathbf} \DeclareBoolOption{OMLmathsf} - \DeclareBoolOption{OMLmathsans} + \DeclareBoolOption{OMLmathsfit} \DeclareBoolOption{OMLmathtt} + % backwards compatibility option alias + \DeclareVoidOption{OMLmathsans}{\isomath@OMLmathsfittrue} 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, only the mathdesign_ fonts support roman in +different shapes with e.g. ``\mathrm{\pi}`` *if an OML encoded font +is available*. Currently, only the mathdesign_ fonts support roman in OML encoding. With some packages, these options can result in a “too many math alphabets used in version normal” error. -Process Options ---------------- +-------------------------------------------------------- + Process the options with ``kvoptions`` extensions:: \ProcessKeyvalOptions* @@ -137,66 +138,80 @@ Process the options with ``kvoptions`` extensions:: Declarations ============ - Math alphabets -------------- In math, LaTeX uses “absolute” fontnames instead of a selection by family, shape, and weight because typefaces have a semantic meaning -(see fntguide_). +[fntguide]_. `isomath` defines a math alphabet for every required font variant and optionally re-defines 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 -``reuseMathAlphabets`` option reduces this number by two, with the -side effect of italic shape with ``\mathbf`` and ``\mathsf`` commands:: +limited to 16, so we have to be careful not to exceed this. The +``reuseMathAlphabets`` option reduces the number of math alphabet +definitions by two, with the side effect of italic shape with +``\mathbf`` and ``\mathsf`` commands:: \ifisomath@reuseMathAlphabets \PackageWarningNoLine{isomath}{% - Re-using math alphabet `mathsf' for \protect \mathboldsans - \MessageBreak and `mathbf' for \protect \mathbold + Re-using math alphabet `mathsf' for \protect \mathsfbfit + \MessageBreak and `mathbf' for \protect \mathbfit } \fi -mathbold +mathbfit ~~~~~~~~ -The *italic bold* math alphabet is named ``\mathbold`` like in -fixmath_ and related packages. With the reuseMathAlphabets_ option, -the roman bold math alphabet ``\mathbf`` is redefined and -``\mathbold`` made an alias (overwriting existing definitions):: +The *bold italic* math alphabet is named ``\mathbfit`` like in +unicode-math_ (with an alias ``\mathbold`` like in fixmath_ and +related packages). With the reuseMathAlphabets_ option, the roman bold +math alphabet ``\mathbf`` is redefined and ``\mathbfit`` made an +alias. The series selector ``bx`` (bold extended) is used, because it +is better supported than ``b``. (Is there any LaTeX math font +distinguishing between ``b`` and ``bx``?) :: \ifisomath@reuseMathAlphabets \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it} - \def\mathbold{\mathbf} + \def\mathbfit{\mathbf} \else - \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it} + \DeclareMathAlphabet{\mathbfit}{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:: +alias (overwriting the definition from fixmath):: - \ifisomath@OMLmathsans - \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} + \renewcommand{\mathbold}{\mathbfit} + +mathsfit +~~~~~~~~ +For *sans-serif italic*, we define a new alphabet ``\mathsfit`` (with +the alias ``\mathsans`` in analogy to ``\mathbold``). As this typeface +is not required by ISO 80000-2 and TeX limits the number of math alphabets +to 16 per math version, it is only defined if the ``OMLmathsfit`` or +``OMLmathsans`` option is set:: + + \ifisomath@OMLmathsfit + \DeclareMathAlphabet{\mathsfit}{OML}{\isomath@sfdefault}{m}{it} + \SetMathAlphabet{\mathsfit}{bold}{OML}{\isomath@sfdefault}{bx}{it} + \def\mathsans{\mathsfit} \fi -mathboldsans +mathsfbfit ~~~~~~~~~~~~ -A *sans serif slanted bold* alphabet is needed for tensor symbols. +The *sans serif bold italic* alphabet is used for tensor symbols. +Following the Unicode math name scheme it is called +``\mathsfbfit``(with the backwards compatibility alias ``\mathboldsans``). With the reuseMathAlphabets_ option, the upright sans serif math -alphabet ``\mathsf`` is redefined and ``\mathboldsans`` made an -alias:: +alphabet ``\mathsf`` is redefined and ``\mathsfbfit`` made an +alias to it:: \ifisomath@reuseMathAlphabets \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it} - \def\mathboldsans{\mathsf} + \def\mathsfbfit{\mathsf} \else - \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} + \DeclareMathAlphabet{\mathsfbfit}{OML}{\isomath@sfdefault}{bx}{it} \fi + \def\mathboldsans{\mathsfbfit} Redefine standard alphabets ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -206,68 +221,78 @@ if the corresponding `OMLmath*`_ option is true:: \ifisomath@OMLmathrm \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{m}{n} + \SetMathAlphabet{\mathrm}{bold}{OML}{\isomath@rmdefault}{bx}{n} \fi \ifisomath@OMLmathbf - \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n} + \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{bx}{n} \fi \ifisomath@OMLmathsf \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{m}{n} + \SetMathAlphabet{\mathsf}{bold}{OML}{\isomath@sfdefault}{bx}{n} \fi \ifisomath@OMLmathtt \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{m}{n} + \SetMathAlphabet{\mathtt}{bold}{OML}{\ttdefault}{bx}{n} \fi Command aliases --------------- The following macros allow semantic markup of mathematical symbols. -The argument is typeset as proposed by ISO 31 and +The argument is typeset as proposed by ISO 80000-2 and `Typefaces for Symbols in Scientific Manuscripts`_. \\vectorsym ~~~~~~~~~~~ -Symbols for vectors are typeset *boldface italic*:: - - \newcommand{\vectorsym}{\mathbold} +Alphabetic vectors symbols are typeset *boldface italic* while numeric +ones (e.g. zero vector) are typeset *boldface upright*. The number +test is a simplified version from the LaTeX FAQ +`Is the argument a number? +`__ +It fails if a number is followed by a non-number, e.g. ``\vectorsym{1a}``, +but this is no valid vector symbol and would look strange with the +``\vec`` accent, too. :: + + \providecommand*{\vectorsym}[1]{% + \ifnum9<1#1% + \mathbf{#1}% + \else% + \mathbfit{#1}% + \fi} 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 of the documentation). - -Attention: Some fonts (CM, Latin Modern, ...) have old-style figures in -their math italic version. The Null vector must not be written ``\vec{0}`` -in this case. Use e.g. ``\mathbf{0}``, ``\boldsymbol{0}`` (with AMS math) or -``\bm{0}`` (with boldmath). The latter two variants provide also a failsafe -alias for a bold vector. +package. \\matrixsym ~~~~~~~~~~~ Symbols for matrices are typeset *boldface italic*, i. e. in the same face as vectors. :: - \newcommand{\matrixsym}{\mathbold} - + \providecommand*{\matrixsym}{\vectorsym} \\tensorsym ~~~~~~~~~~~ Symbols for tensors are *sans-serif bold italic*:: - \newcommand{\tensorsym}{\mathboldsans} + \providecommand*{\tensorsym}{\mathsfbfit} + - Font mappings ------------- -Some font packages provide matching text and math font but do not -define a substitution in their ``*.fd`` files. +Substitutions needed for the math alphabet definitions and setup for +scaled fonts. For details about the font definition macros see +[fntguide]_. -We define the substitutions needed for the math alphabet definitions -in this package. Ideally, these should become part of the package's -``*.fd`` files. +Common family name for text and math +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For details about the font definition macros see the fntguide_. +Some font packages provide matching text and math font but do not +define a substitution in their ``*.fd`` files. Ideally, the following +mappings should be moved there. -Mathpazo (Palatino) ppl <-> zplm :: +Mathpazo (Palatino) ppl ↔ zplm :: \DeclareFontFamily{OML}{ppl}{\skewchar\font127} \DeclareFontShape{OML}{ppl}{m}{it}{<-> ssub * zplm/m/it}{} @@ -277,50 +302,51 @@ Mathpazo (Palatino) ppl <-> zplm :: Scaling ~~~~~~~ Scale the ``fav`` (Arev), ``llcmss`` (LX Fonts), and ``iwona`` fonts -by the value of the ``scaled`` option. +by the value of the scaled_ option. To get scaled versions of a font, you cannot use the ``ssub`` `size function`, but must use the empty function or ``s`` with the font file as argument [found by experiment, GM 2010-01-28]. -Arev (see omlzavm.fd): fav <-> zavm :: +Arev (see omlzavm.fd): fav ↔ zavm :: \DeclareFontFamily{OML}{fav}{\skewchar\font127} \DeclareFontShape{OML}{fav}{m}{it}{<-> s * [\isomath@scaled] zavmri7m}{} \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [\isomath@scaled] zavmbi7m}{} -LX Fonts (see lxfonts.sty): llcmss -> llcmm :: +LX Fonts (see lxfonts.sty): llcmss ↔ llcmm :: \DeclareFontFamily{OML}{llcmss}{\skewchar\font'177} \DeclareFontShape{OML}{llcmss}{m}{it}{<-> s * [\isomath@scaled] lcmmi8}{} \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> s * [\isomath@scaled] lcmmib8}{} -Ivona (see ``omliwona.fd``):: +Iwona (see ``omliwona.fd``) iwona ↔ mi-iwona:: \DeclareFontFamily{OML}{iwona}{} \DeclareFontShape{OML}{iwona}{m}{it}{<-> s * [\isomath@scaled] mi-iwonari}{} \DeclareFontShape{OML}{iwona}{bx}{it}{<-> s * [\isomath@scaled] mi-iwonabi}{} -No declarations below this point:: - - \endinput -.. Links -.. ***** +References +========== + +.. [fntguide] `LaTeX 2e font selection`: + http://mirror.ctan.org/macros/latex/doc/fntguide.pdf. .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt -.. _arev: http://dante.ctan.org/CTAN/help/Catalogue/entries/arev.html -.. _cmbright: http://dante.ctan.org/CTAN/help/Catalogue/entries/cmbright.html -.. _fixmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/fixmath.html -.. _fntguide: http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf -.. _hvmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/hvmath.html -.. _iwona: http://dante.ctan.org/CTAN/help/Catalogue/entries/iwona.html -.. _keyval: http://dante.ctan.org/CTAN/help/Catalogue/entries/keyval.html -.. _kvoptions: http://dante.ctan.org/CTAN/help/Catalogue/entries/kvoptions.html -.. _lxfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/lxfonts.html -.. _mathdesign: http://dante.ctan.org/CTAN/help/Catalogue/entries/mathdesign.html +.. _arev: http://mirror.ctan.org/help/Catalogue/entries/arev.html +.. _cmbright: http://mirror.ctan.org/help/Catalogue/entries/cmbright.html +.. _fixmath: http://mirror.ctan.org/help/Catalogue/entries/fixmath.html +.. _hvmath: http://mirror.ctan.org/help/Catalogue/entries/hvmath.html +.. _iwona: http://mirror.ctan.org/help/Catalogue/entries/iwona.html +.. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html +.. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html +.. _lxfonts: http://mirror.ctan.org/help/Catalogue/entries/lxfonts.html +.. _mathdesign: http://mirror.ctan.org/help/Catalogue/entries/mathdesign.html .. _mathematical alphanumeric symbols: http://www.unicode.org/charts/PDF/U1D400.pdf -.. _oberdiek: http://dante.ctan.org/CTAN/help/Catalogue/entries/oberdiek.html +.. _oberdiek: http://mirror.ctan.org/help/Catalogue/entries/oberdiek.html .. _`Typefaces for Symbols in Scientific Manuscripts`: - http://physics.nist.gov/Document/typefaces.pdf + http://physics.nist.gov/cuu/pdf/typefaces.pdf +.. _unicode-math: + http://mirror.ctan.org/help/Catalogue/entries/unicode-math.html diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.txt b/Master/texmf-dist/doc/latex/isomath/isomath.txt index ad3697083c4..23100dcacfe 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.txt +++ b/Master/texmf-dist/doc/latex/isomath/isomath.txt @@ -4,148 +4,162 @@ isomath: Math for scientists **************************** :Author: Günter Milde -:Date: 2010-08-23 -:Copyright: © 2008, 2010 Günter Milde +:Date: 2011-01-14 +:Copyright: © 2008, 2011 Günter Milde :Licence: This work may be distributed and/or modified under the conditions of the `LaTeX Project Public License`_, either version 1.3 of this license or (at your option) any later version. -: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 sets up an “ISO math style” allowing the + use of Greek and Latin letters as symbols for scalars, + vectors, matrices, and tensors in the typefaces recommended + for scientific papers by the International Standard + ISO 80000-2. .. contents:: .. sectnum:: -Motivation ----------- + +Features +-------- .. How do you write the stress tensor ``$\sigma$`` in a - sans-serif bold italic typeface, as recommended by [typefaces]_? + `sans-serif bold italic` typeface, as recommended by [typefaces]_? -Scientific organisations like IUPAP_, IUPAC_, NIST_, BIPM_, and others -recommend typesetting math according to the International Standard ISO 31 -`Quantities and units` [ISO-31]_.\ [#]_ +Leading international scientific organisations recommend math layout +rules in line with the International Standard [ISO-80000-2]_ in their +style guides, e. g., [typefaces]_, [checklist]_, [SI]_, [fonts_for_symbols]_, +[Red-Book]_, [Green-Book]_: -.. [#] Summaries of these rules are free available, see [typefaces]_, - [checklist]_, [fonts_for_symbols]_, and [SI-brochure]_. +* The overall rule is that symbols representing physical quantities + (or variables) are italic, but symbols representing units, or + labels, are roman. -The traditional `LaTeX math style` deviates in some points from this rules: +* Symbols for vectors are boldface italic, symbols for tensors are + sans-serif bold italic, and symbols for matrices are boldface + italic. -* The ``\vec`` command produces an array accent, while ISO 31 recommends - a bold italic typeface for vector symbols. +* The above rules apply equally to letter symbols from both the Greek + and the Latin alphabet. -* Greek letters are excluded from font changes with the math - alphabets, while the ISO 31 rules apply equally to letters from the - Greek and Latin alphabet. +The traditional TeX `math style`_ deviates from this rules in some +points: -* There is no provision for typesetting of Greek letters in bold italic - style recommended for vectors. +* capital Greek letters default to upright shape, -* There is no provision for typesetting letters in sans-serif bold italic - recommended for typesetting tensor symbols. +* small Greek letters are excluded from font changes with the `math + alphabets`_. -Some of these points are 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. +* The ``\vec`` command produces an arrow accent. +The `isomath` package implements an `ISO math style`_ and provides +`new math alphabets`_ with bold italic and sans-serif bold italic +typeshape that can be used for vector and tensor symbols. -Features --------- .. _`equal treatment of Latin and Greek`: -Equal treatment of Latin and Greek letters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ISO math style +~~~~~~~~~~~~~~ -This feature is provided by the required package fixmath_ which -ensures that: +The required package fixmath_ changes the default math layout to the +“ISO” `math style`_: -+ Both, Greek and Latin letters change shape if a different - math alphabet is used. ++ Uppercase Greek letters are typeset italic by default. -+ By default, uppercase Greek letters are typeset in italic style. ++ Both, Greek and Latin letters change shape if a different + `math alphabet`_ is used. -However, `fixmath` works only for Computer Modern. With `isomath`, +However, fixmath works only for the Computer Modern font family. +With `isomath`, + the used math fonts are configurable (using the rmdefault_ and sfdefault_ options), and + upright Greek letters can be made available through the common - ``\math*`` alphabets via the OMLmath_ options, if the + ``\math*`` alphabets via the `OMLmath*`_ options if the corresponding fonts support the `OML font encoding`_. -Caution: - Placing Greek letters in a ``\math*`` macro, e. g. - ``\mathrm{k\Omega}``, can lead to garbage, as the standard math +.. Caution:: + + Using Greek letters in standard `math alphabets`_, e. g., + ``\mathrm{\pi}``, can lead to garbage, as the standard math alphabets are usually taken from text fonts that have ligatures and non-alpha symbols in place of the small Greek letters. - Do not use Greek letters in the standard math alphabet commands + Do not use small Greek letters in the standard math alphabet commands ``mathit``, ``mathrm``, ``mathbf``, ``mathsf``, and ``mathtt`` - unless you use the OMLmath_ options.\ [#]_ + unless you use the `OMLmath*`_ options. - .. [#] Some packages provide ``\up*`` or ``\var*`` macros for - upright Greek letters so the above example could be written - ``\mathrm{k}\upOmega``. + Some packages provide alternative macros or options for upright + Greek letters (cf. `Table 6`_). New math alphabets ~~~~~~~~~~~~~~~~~~ -New math alphabets are defined: +`Isomath` defines three new `math alphabets`_: + + .. class:: borderless -:``\mathbold``: boldface italic (vector and matrix symbols), -:``\mathboldsans``: sans-serif bold italic (tensor symbols). -:``\mathsans``: sans-serif italic (optional), + =============== ====================== ================================= + ``\mathbfit`` boldface italic vector and matrix symbols + ``\mathsfit`` sans-serif italic optional (see OMLmath*_ options) + ``\mathsfbfit`` sans-serif bold italic tensor symbols + =============== ====================== ================================= -The rmdefault_ and sfdefault_ options set the font family used for +The rmdefault_ and sfdefault_ options_ set the font family used for these alphabets. +.. Caution:: -Command aliases -~~~~~~~~~~~~~~~ -The command aliases ``\vectorsym``, ``\matrixsym``, and ``\tensorsym`` -allow semantic markup. They print the argument in an ISO-conforming -typeface. + Using the new math alphabets for numbers can result in _`upright + old-style numbers` instead of italic ones, because some italic math + fonts (e. g., cmr, cmbr) have old-style numbers in place of italic + digits. +For compatibility with earlier versions and `related packages`_, the +new math alphabets are also available under the aliases +``\mathbold``, ``\mathsans``, and ``\mathboldsans``. -Font mappings -~~~~~~~~~~~~~ +Semantic markup +~~~~~~~~~~~~~~~ +The following commands set the argument in an ISO-conforming math alphabet: -Some font definitions are added for font families which have an OML -encoded counterpart but no substitution definition in their ``*.fd`` -files. + .. class:: borderless -Usage ------ + ========================== ======================================== + ``\vectorsym, \matrixsym`` bold italic for Greek and Latin letters, + bold upright for numbers -Make sure that LaTeX can find ``isomath.sty`` and insert the command:: + ``\tensorsym`` sans-serif bold italic + ========================== ======================================== - \usepackage{isomath} -in the document preamble (see also Examples_). +Usage +----- +Make sure that LaTeX can find ``isomath.sty`` and load it with +``\usepackage`` (see also Options_ and Examples_). Options ~~~~~~~ rmdefault ''''''''' -Family for serif math fonts (roman and kursive). The default is to use the -corresponding text font family (the value of ``\rmdefault``). The font -must be available in `OML font encoding`_. +Family for serif math fonts (``\mathrm``, ``\mathbf``, ``\mathit``, +``\mathbfit``). The default is to use the corresponding text font +family (the value of ``\rmdefault``). The font must be available in +`OML font encoding`_ (cf. `Table 3`_). sfdefault ''''''''' Family for sans-serif math fonts. The default is ``cmbr`` because many sans-serif fonts define the Computer Roman font `cmm` as OML substitution -(see `Table 2`_). +(see `Table 4`_). -There are only few sans serif `fonts that support the OML -encoding`_: +There are only few sans serif fonts in `OML font encoding`_: -.. class:: booktab +.. class:: borderless ========== =========== =================================================== Name Package Comment @@ -153,27 +167,27 @@ Name Package Comment ``cmbr`` cmbright_ `Computer Modern Bright`, bitmap, slightly lighter than cmss (Type 1 fonts with hfbright_) ``fav`` arev_ `Arev` (`Vera Sans`) with math extension, - large x-hight + large x-height ``iwona`` iwona_ Humanistic Sans Serif, some shapes very similar to roman ``hvm`` hvmath_ `Helvetica Math`, commercial, free bitmap version -``llcmss`` lxfonts_ `LX Fonts`, very wide, excentric, large x-hight, +``llcmss`` lxfonts_ `LX Fonts`, very wide, eccentric, large x-height, new in 2008 ========== =========== =================================================== scaled '''''' -As the choice of sans serif math fonts is very limited, -the fonts, ``fav``, ``llcmss``, and ``iwona`` can be scaled -with the ``scaled`` option (see examples_). +To improve the chances of configuring a matching sans serif math font, +the fonts, ``fav``, ``llcmss``, and ``iwona`` can be scaled with the +``scaled`` option (cf. Examples_). 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 +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 @@ -181,63 +195,110 @@ option tells ``isomath`` to re-use the existing ``\mathbf`` and math-mode off and might use a different font, so watch for side-effects. -OMLmath -'''''''' +.. _OMLmath*: + +OMLmathrm, OMLmathbf, OMLmathsf, OMLmathsfit, OMLmathtt +''''''''''''''''''''''''''''''''''''''''''''''''''''''' -With Greek letters defined as ``\mathalpha``, the math alphabets are -expected to be in `OML font encoding`_. Unfortunately, the standard -math alphabets are usually taken from OT1 or T1 encoded fonts that -have ligatures and accents in place of the Greek letters. +With Greek letters defined as ``\mathalpha``, the letter fonts are +expected to be in `OML font encoding`_. The predefined +`math alphabets`_, however, use OT1 encoded text fonts. These fonts +have ligatures and accents in place of the small Greek letters. +The ``\mathsfit`` alphabet is not required for ISO conforming math. -The following options cause isomath to (re)define math alphabets in OML -encoding:: +The ``OMLmath*`` options bind the corresponding ``\math*`` command to an +OML-encoded font. +This enables use of small Greek letters in `math alphabet`_ commands, +e. g., ``\mathrm{\pi}`` *if an OML encoded font is available*. +`Table 3`_ lists font families supporting the OML encoding. - OMLmathrm, OMLmathbf, OMLmathsf, OMLmathsans, OMLmathtt +.. caution:: -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, only the mathdesign_ package provides -upright `fonts that support the OML encoding`_. Many font packages -define an italic font as replacement for a roman font in OML encoding. + If no matching OML encoded font is found, LaTeX's substitute + mechanism kicks in and selects a font with different font attributes + (for all letters, not only Greek). Currently, only the mathdesign_ + package provides upright fonts in OML encoding. Many font packages + define an *italic* font as OML substitute for roman fonts. + + With some packages, these options can result in a “`too many math + alphabets used in version normal`_” error. -With some packages, these options can result in a “`too many math alphabets -used in version normal`_” error. Examples ~~~~~~~~ -* Use `isomath` with the default settings:: +* Redefine the standard ``\vec`` command to set its argument in an + ISO-conforming math alphabet.:: \usepackage{isomath} + \renewcommand{\vec}{\vectorsym} + +* Use scaled arev_ fonts for the sans serif alphabets + (adapt the scaling factor to your needs):: -* Define also a slanted sans-serif math alphabet:: + \usepackage[sfdefault=fav,scaled=0.875]{isomath} - \usepackage[OMLmathsans]{isomath} +* Define the ``\mathsfit`` sans-serif italic math alphabet:: -* Use the heavier `Arev` sans serif fonts:: + \usepackage[OMLmathsfit]{isomath} - \usepackage[sfdefault=fav,scaled=0.875]{isomath} - (Adapt the scaling factor to your needs.) +* The ``\mathbfit`` and ``\mathsfbfit`` alphabets do not have a different + weight in the ``bold`` `math version`_ because the number of LaTeX math + fonts providing `extrabold` or `ultrabold` series is negligible. -* Redefine the standard ``\vec`` macro to typeset its argument in `bold - italic`:: + As a workaround, use the heavier arev_ font, scaled to 0,875, in the + bold version of ``\mathsfbfit``:: \usepackage{isomath} - \renewcommand{\vec}{\vectorsym} + \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{} + \SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it} - (Use ``\bm`` or ``boldmath`` for for the zero and unit vectors, as - ``\vec{0}`` and ``\vec{1}`` will give undesired results.) +See also the ``isomath-test.tex`` test document. -* The mathdesign_ package provides an OML encoded *bold roman* font but does - not set it up for ``\mathbf``. To set it up, write e.g.:: +How to get upright small Greek letters +'''''''''''''''''''''''''''''''''''''' - \usepackage[charter]{mathdesign} - \usepackage[OMLmathbf]{isomath} +Of the following methods, only the first requires `isomath`: - Now, e.g. ``\mathbf{\pi}`` produces a bold upright pi symbol. +a) Use `isomath` and the mathdesign_ package:: + + \usepackage[utopia]{mathdesign} + \usepackage[OMLmathrm,OMLmathbf]{isomath} + + Now, e. g., ``\mathrm{\pi}`` and ``\mathbf{\pi}`` work as + expected. + +b) To get upright small Greek letters without affecting other fonts, + set the math alphabet manually to one of the three mathdesign_ + fonts, e. g.:: + + \SetMathAlphabet{\mathbf}{normal}{OML}{mdput}{b}{n} + + (check if the letter shapes match with the rest of the document). + +c) Use a package that provides macros for upright Greek letters + in math: + + .. class:: borderless + + ============= ===================================== + fourier_ ``\otheralpha ... \otherOmega`` + kpfonts_ ``\alphaup ... \Omegaup`` + mathdesign_ ``\alphaup ... \Omegaup`` + upgreek_ ``\upalpha ... \upOmega`` + ============= ===================================== + +d) Use an upright text character (requires a matching LGR-encoded + Greek text font). The following lines redefine ``\pi`` to set + the mathematical constant pi upright:: + + \usepackage[LGR,T1]{fontenc} + \usepackage[greek,british]{babel} + \usepackage{amsmath} + \let\mathpi\pi + \renewcommand{\pi}{\text{\textrm{\greektext p }}} -See also the ``isomath-test.tex`` test document. Related packages @@ -250,7 +311,7 @@ fixmath_ by Walter Schmidt defines Greek letters as alphabetic symbols. kvoptions_ - (in the oberdiek_ bundle) facilitates the setup of package options + by Heiko Oberdiek facilitates the setup of package options and provides a key=value interface (based on keyval_). @@ -258,65 +319,62 @@ Recommendations ~~~~~~~~~~~~~~~ cmbright_ - provides *sans serif* and *sans-serif bold* fonts for the - ``\mathsans`` and ``\mathboldsans`` alphabets that match with - Computer Modern and derivatives. Free Type 1 versions of the fonts - with hfbright_. + by Walter Schmidt provides sans serif and sans-serif bold fonts + for the ``\mathsfit`` and ``\mathsfbfit`` alphabets that match + with Computer Modern and derivatives. Free Type 1 versions of the + fonts are provided by hfbright_. arev_ - provides *sans serif* somewhat heavier letters that are clearly - distinguishable from the roman or italic counterparts (important if - used to distinguish vectors and tensors). However, `Arev` has a - large x-hight, so for most default fonts, either small or capital + by Stephen Hartke provides the not-so-light `Arev` sans serif font + with letters that are clearly distinguishable from the roman or + italic counterparts (important if used to distinguish vectors and + tensors). + + `Arev` has a large x-height. For many fonts, either small or capital letters will not match in size. Alternatives ~~~~~~~~~~~~ -If the only requirement is a bold italic font for (Latin and Greek) vector -symbols, there are established alternatives to `isomath`: - -* Packages that support `equal treatment of Latin and Greek`_ and - provide the ``\mathbold`` alphabet (but not ``\mathsansbold``) in - `OML font encoding`_: +See `Table 2`_ for other packages that implement the “ISO” `math +style`_ and `Table 6`_ for packages that provide bold italic +math fonts. - Roman - * eulervm_ (Euler Math), - * fixmath_ (Computer Modern), - * mathpazo_ (Palatino), - * tmmath_ (TM-Math/Times). +`“In-line math versions”`_ + can be used as ISO-conforming replacement for ``\vec``: - Sans serif - * arev_ (Arev/Vera Sans), - * cmbright_ (CM Bright), - * hvmath_ (HV-Math/Helvetica), + * ``\boldsymbol`` from `amsbsy`_ (part of `amsmath`_, the + near-indispensable adjunct to serious mathematical typesetting in + LaTeX), + * ``\bm`` from the `bm`_ package. Combining `bm` and `isomath` may + lead to the `too many math alphabets used in version normal`_ error. -* Packages that provide commands which can be used as replacement for - ``\vec``: - - * `amsbsy`_ (part of `amsmath`_, the near-indispensable adjunct to serious - mathematical typesetting in LaTeX) defines ``\boldmath``, +``\text`` + from `amsmath`_ can be used to get, e. g., upright or sans-serif + bold italic Greek symbols from a text font into a formula (see + `How to get upright small Greek letters`_). - * `bm`_ defines a command ``\bm`` which makes its argument bold (more - careful than amsbsy's ``\boldmath``). Combining `bm` and `isomath` may - lead to the `too many math alphabets used in version normal`_ error. +unicode-math_ + for XeTeX and LuaTeX allows mathematical typesetting using OpenType + math fonts. It supports the “ISO” `math style`_ and all mathematical + characters in the Unicode standard. -The ``\text`` macro from `amsmath`_ can be used to get e.g. upright or -sans-serif bold slanted Greek symbols from a text font into a formula. + unicode-math cannot be used together with `isomath`. It can, however, + replace all of isomath's functionality. See the discussion of `the + unicode-math package`_ below. Conflicts ~~~~~~~~~ -* “_`too many math alphabets used in version normal`” - +“_`too many math alphabets used in version normal`” This error occurs if the combination of packages tries to load more - than 16 fonts into the ‘normal’ math version. + than 16 fonts into the ``normal`` `math version`_. - It can be avoided with the reuseMathAlphabets_ option (see there - for side-effects). + `Isomath` can reduce the number of math alphabet definitions with the + reuseMathAlphabets_ option (see there for side-effects). Examples for problematic combinations: @@ -327,13 +385,13 @@ Conflicts and heavy fonts. Their number can be customized by defining ``\bmmax`` and ``\hmmax`` before loading the package. -* 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). +fourier_ + provides upright and italic Greek letters, but uses non-standard + math font encodings. It cannot be used with `isomath`. - However, it is possible to use the symbols from `fourier`_ together - with math alphabets from another package, e.g `mathdesign`_:: + However, it is possible to use the non-alphanumeric symbols from + `fourier`_ together with math alphabets from another package, e.g + `mathdesign`_:: \usepackage{fourier} \usepackage[OMLmathbf,rmdefault=mdput, @@ -343,43 +401,197 @@ Conflicts Background ---------- -Letter symbols -~~~~~~~~~~~~~~ +This section discusses LaTeX `math font selection`_, suitable +`math letter fonts`_ for the ISO math style, and the relation of LaTeX and +`Unicode mathematical typesetting`_. -IUPAC_'s [fonts_for_symbols]_ guide says: - 2. The overall rule is that symbols representing physical quantities (or - variables) are italic, but symbols representing units, or labels, are - roman. […] +Math font selection +~~~~~~~~~~~~~~~~~~~ - 3. The above rule applies equally to letter symbols from both the Greek - and the Latin alphabet, […]. +There are three complementary methods to set font attributes in LaTeX +math mode: `LaTeX 2e font selection` [fntguide]_ describes `math +alphabets`_ and `math versions`_, several extension packages +provide alternative `math styles`_ (cf. `Table 2`_). -In contrast, the standard LaTeX style treats Greek letter symbols +.. _math alphabet: -* as invariant operators, +Math alphabets +'''''''''''''' -* with lower case italic and upper case upright. +Math alphabets are a counterpart to the `mathematical alphanumeric +symbols`_ block in Unicode. Both are “to be used for mathematical +variables where style variations are important semantically”. +The font guide [fntguide]_ defines in +section 3: -A possible fix (established by fixmath_) is using a common font for -Greek and Latin letters. There is one established font encoding -providing Latin and Greek letters: the `OML font encoding`_. However, + Some math fonts are selected explicitly by one-argument commands + such as ``\mathsf{max}`` or ``\mathbf{vec}``; such fonts are called + *math alphabets*. -* support_ for OML is limited to a few (mostly italic) fonts. + Math fonts [...] have the same five attributes as text fonts: + encoding, family, series, shape and size. However, there are no + commands that allow the attributes to be individually changed. + Instead, the conversion from math fonts to these five attributes is + controlled by the `math version`_. -* The widely supported but non-standard `LGR` font encoding has Greek - but no Latin letters, while + The _`predefined math alphabets` are: -* the standard Greek font encoding `T7` is just a “reserved name”. + .. class:: borderless + ================= =============== + ``\mathnormal`` default [#mathnormal]_ + ``\mathrm`` roman [#roman]_ + ``\mathbf`` bold roman + ``\mathsf`` sans serif + ``\mathit`` text italic + ``\mathtt`` typewriter + ``\mathcal`` calligraphic + ================= =============== -OML font encoding +.. [#mathnormal] ``\mathnormal`` is used by default for alphanumeric + characters in math mode. It sets the letter shape according to + character class and `math style`_. (`Table 1`_ shows the default + letter shapes for common math styles). + +.. [#roman] The specifier “roman” is ambiguous: roman shape + stands for *upright*, while roman type stands for *serif* (as + opposed to sans serif). + +Many packages define additional math alphabets (cf. `Table 6`_). + +In contrast to the similar named text commands, math alphabets are +*not* orthogonal, e. g., the code ``$\mathit{\mathbf{a}}$`` sets the +letter ``a`` in **upright** bold type. + + +.. _math version: + +Math versions +''''''''''''' + +The number of mathematical symbols exceeds the maximal number of +characters in a TeX font file by an order of magnitude. [#max]_ +Grouping math fonts with common characteristics in math versions +simplifies the setting of font attributes for mathematical expressions. + +*Math versions* set up “math symbol fonts” for non-alphanumeric +symbols and bind the `math alphabet`_ commands to fonts using default +values for non-specified font attributes. TeX limits the number of +(symbol + alphanumeric) fonts per math version to 16. + +The predefined math versions are ``normal`` and ``bold`` with the +defaults: + + .. class:: borderless + + ======== ========== ======== + .. ``normal`` ``bold`` + *type* serif serif + *weight* medium bold + *shape* upright upright + ======== ========== ======== + +Packages can define additional math versions, e. g., the wrisym_ package +defines a ``mono`` math version. A ``sans`` math version example is +available from a `comp.text.tex post +`__ + +Math versions are intended for mathematical content in a special +context, e. g., a bold section heading. +Setting a math version resembles the individual selection of text +font attributes (bold, sans-serif, monospaced). + +Math versions can only be changed outside of math mode. The commands +``\boldsymbol`` (amsmath_) and ``\bm`` (bm_) behave like _`“in-line +math versions”`: they typeset their argument using the fonts of the +``bold`` math version but can be used inside math mode. + +Example: four ways to set the letter ``a`` in a bold +sans-serif font:: + + % Text Math: + \textbf{\textsf{a}} $\bm{\mathsf{a}}$ + \bfseries \textsf{a} \mathversion{bold} $\mathsf{a}$ + +.. [#max] Unicode provides about 2500 math characters. Font files used + by 8-bit TeX engines can hold up to 256 characters. The standard + math fonts adhere to the original limit of 128 characters. + +.. _math style: + +Math styles +''''''''''' + +A *math style* is a document-level feature that determines the default +letter shape in math mode (i. e. the shape attribute of letters in the +``\mathnormal`` `math alphabet`_). + +.. _Table 1: + +.. table:: Default letter shapes for common math styles + + ============ ======= ======= ======= ======= + math style latin Latin greek Greek + ============ ======= ======= ======= ======= + TeX it it it up + ISO it it it it + French it up up up + upright up up up up + ============ ======= ======= ======= ======= + +LaTeX defaults to the “TeX” math style (without naming it such). +Alternative math styles are introduced by extension packages +(`Table 2`_). + +.. _Table 2: + +.. table:: Packages providing math styles + + ============ ============= ================================== + math style Package Option(s) + ============ ============= ================================== + ISO fixmath_ + .. isomath + .. kpfonts_ slantedGreeks + .. lucimatx_ math-style=iso + .. mathdesign_ greekuppercase=italicized + .. mathpazo_ slantedGreek + .. mathptmx_ slantedGreek + .. unicode-math_ math-style=ISO + + French fourier_ upright + .. kpfonts_ frenchstyle (or upright) + .. lucimatx_ math-style=french + .. mathdesign_ uppercase=upright, greeklowercase=upright + .. unicode-math_ math-style=french + + upright eulervm_ + .. lucimatx_ math-style=upright + .. unicode-math_ math-style=upright + ============ ============= ================================== + + +Math letter fonts ~~~~~~~~~~~~~~~~~ +The equal treatment of Latin and Greek letters in the `ISO math +style`_ is simplest achieved with a font that contains all required +letters in one file. + +There is only one established LaTeX font encoding that contains Latin and +Greek letters, the `OML font encoding`_. The standard Greek font +encoding `T7` is just a “reserved name” and the de-facto standard +Greek text font encoding `LGR` has no Latin letters. Unfortunately, +`OML support`_ is limited to a few (mostly italic) fonts. + +OML font encoding +''''''''''''''''' + The `LaTeX font encodings` guide [encguide]_ names the OML encoding `TeX math italic` and defines: - The OML encoding contains italic Latin and Greek letters for use in + The _`OML` encoding contains italic Latin and Greek letters for use in mathematical formulas (typically used for variables) together with some symbols. @@ -394,9 +606,9 @@ The reference to *italic* shape is odd: alphabets in roman {n} as well as italic {it} shape without conflicts. -This seems to be a remnant of pre-NFSS times – there is only one OML -encoded font in Knuth's Computer Modern fonts: `Computer Modern Math -Italic` (cmmi) – rather than a necessary restriction. +This seems to be more a remnant of pre-NFSS times than a necessary +restriction – there is only one OML encoded font in Knuth's Computer +Modern fonts: `Computer Modern Math Italic` (cmmi). Proposals: @@ -415,16 +627,16 @@ Proposals: Math Letters`. The latter would also explain the acronym OML. -Support -''''''' +OML Support +''''''''''' Unfortunately, support for the OML encoding is missing for many font -families even if the base font contains all Greek letters. - +families even if the text font defines Greek letters. Supported font families can be found searching for ``oml*.fd`` files and grepping for ``DeclareFont.*OML`` in ``*.sty`` files. -`Table 1`_ lists the findings for a selection of TeXLive + some -additonally installed font packages. + +`Table 3`_ lists the findings for a selection of TeXLive 2009 + some +additionally installed font packages. * If there is an alias (substitution) from the text font to a math-variant, only the text font is listed. @@ -433,57 +645,57 @@ additonally installed font packages. however mapping to an italic variant of the OML encoded font. These are not listed as supporting ``m/n`` or ``bx/n`` here. -`Table 2`_ lists some fonts that define ``cmm`` as OML substitution. -With isomath, a better matching substitution can be set using the -rmdefault_ or sfdefault_ options. - -.. _Table 1: +.. _Table 3: -.. table:: _`Fonts that support the OML encoding` +.. table:: Font families supporting the OML encoding ============= =========================== ======= ======== ====== ======= 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 - kurier Kurier x x - mdbch Math Design Charter x x x x - mdput Math Design Utopia x x x x - mdugm Math Design Garamond x 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 - udidot Didot (gfsdidot) x - ywclm (greektex) x x - zavm Arev (Vera Sans-Serif) x x - zesfcm (efont) x - zplm Palatino (mathpazo) x x - zpple Palatino x x - ztmcm Times (mathptmx) x - zer Computer Modern (zefonts) x x + aer AE (Almost European) ✓ ✓ + antt Antykwa Torunska ✓ ✓ + cmr Computer Modern Roman ✓ ✓ + ccr Concrete ✓ ✓ + cmbr Computer Modern Bright ✓ ✓ + hlh Lucida ✓ ✓ + hfor CM with old-style digits ✓ ✓ + iwona Iwona (sans serif) ✓ ✓ + jkp Kepler Serif ✓ ✓ + jkpl Kepler Serif ✓ ✓ + jkpvos Kepler Serif ✓ ✓ + jkplvos Kepler Serif ✓ ✓ + llcmm LX Fonts (sans serif) ✓ ✓ + lmr Latin Modern Roman ✓ ✓ + mak Kerkis ✓ + kurier Kurier ✓ ✓ + mdbch Math Design Charter ✓ ✓ ✓ ✓ + mdput Math Design Utopia ✓ ✓ ✓ ✓ + mdugm Math Design Garamond ✓ ✓ ✓ ✓ + neohellenic GFS Neohellenic ✓ + plcm CM (PLaTeX) ✓ + ptmom Times (Omega or MB-Times) ✓ ✓ + ptmomu Times (Omega or MB-Times) ✓ ✓ + ptmcm Times (psfont) ✓ + pxr Palatino (pxfonts) ✓ ✓ + qpl Palatino/Pagella (qpxmath) ✓ ✓ + qtm Times/Termes (qtxmath) ✓ ✓ + txr Times (txfonts) ✓ ✓ + udidot Didot (gfsdidot) ✓ + ywclm (greektex) ✓ ✓ + zavm Arev (Vera Sans-Serif) ✓ ✓ + zesfcm (efont) ✓ + zplm Palatino (mathpazo) ✓ ✓ + zpple Palatino ✓ ✓ + ztmcm Times (mathptmv) ✓ + zer Computer Modern (zefonts) ✓ ✓ ============= =========================== ======= ======== ====== ======= -.. _Table 2: +`Table 4`_ lists some fonts that define ``cmm`` as OML substitution. +With `isomath`, a better matching substitution can be set using the +rmdefault_ or sfdefault_ options. + +.. _Table 4: .. table:: Non-CM fonts with ``cmm`` as OML substitution @@ -513,189 +725,345 @@ rmdefault_ or sfdefault_ options. ============= =============================== -Math in Unicode -~~~~~~~~~~~~~~~ +Unicode mathematical typesetting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The technical report [tr25]_ presents an in-depth discussion of the +mathematics character repertoire of the Unicode Standard as well as +mathematical notation in general. -Basis for the definition of the Unicode block -`mathematical alphanumeric symbols`_, was the consideration outlined -in [beeton:2000]_: - - These alphabets are needed for proper composition - of mathematics: - - * lightface upright Latin, Greek and digits - * boldface upright Latin, Greek and digits - * lightface italic Latin, Greek and digits - * boldface italic Latin, Greek and digits - * script - * fraktur - * bold fraktur - * open-face (blackboard bold) including digits - * lightface upright sans serif Latin and digits - * lightface italic sans serif Latin - * boldface upright sans serif Latin, Greek, and digits - * boldface italic sans serif Latin and Greek - * monospace Latin and digits - - Except for the lightface upright letters and digits, - which are to be encoded using the base Unicodes - (ASCII for the Latin letters and digits), the - alphanumerics are to be placed in a tightly packed - block (U+D400–D7FF) in plane 1, so that they can - be used for math (most likely via entity names in - MathML), but will be very difficult to access for - other purposes. - -The technical report `Unicode Support for Mathematics` [tr25]_ lists -“alphanumeric symbols encountered in mathematics” in table 2: -`Mathematical Alphabets`. - -The Unicode block `mathematical alphanumeric symbols`_ provides style -variants for Latin and Greek letters and digits. It is labelled “to be -used for mathematical variables where style variations are important -semantically”. `Table 3`_ gives a survey of current LaTeX support. - -.. _table 3: - -.. table:: Styles in the `mathematical alphanumeric symbols`_ - Unicode block - :class: booktab - - ================= ======= ================= ========================== - Style Symbols LaTeX macro Package, Comment - [#]_ - ================= ======= ================= ========================== - bold LGD ``\mathbf`` no Greek - - italic LG ``\mathit`` no Greek - \ ``\mathnormal`` small Greek but - old-style digits (upright) - bold italic LG ``\mathbold`` fixmath and friends - \ ``\boldsymbol`` ams - script L ``\mathcal`` or only capital Latin - (calligraphic) ``\mathscr`` - bold script L - fraktur L ``\mathfrak`` eufrak - double-struck L D ``\mathbb`` bbold, mathbbol, - mbboard - \ ``\mathbbm`` bbm - \ ``\mathds`` dsfont - bold fraktur L - sans-serif L D ``\mathsf`` no Greek - sans-serif bold LGD - sans-serif italic L ``\mathsans`` isomath - sans bold italic LG ``\mathboldsans`` isomath - monospace L D ``\mathtt`` no Greek - ----------------- ------- ----------------- -------------------------- - *Not in the mathematical alphanumeric symbols block*: - ---------------------------------------------------------------------- - plain LGD ``\mathrm`` no Greek - \ ``\mathnormal`` capital Greek - ================= ======= ================= ========================== - -.. [#] LGD: **L**\ atin, **G**\ reek, **D**\ igits +This section compares `math font selection`_ in LaTeX and Unicode. +It suggests a set of 14 math alphabets that covers all Unicode +`mathematical alphanumeric symbols`_ and discusses compatibility +issues between math typesetting with traditional (8-bit) TeX engines +versus `the unicode-math package`_ for Unicode-enabled TeX engines +(XeTeX, LuaTeX). +.. _mathematical alphanumeric symbols: + +Unicode math alphabets +'''''''''''''''''''''' + +Chapter 2 `Mathematical Character Repertoire` of [tr25]_ lists 14 +`Mathematical Alphabets` in Table 2.1. These mathematical alphabets are a +superset of the predefined `math alphabets`_ in the LaTeX core. + +Unicode assignes code points to most letters of the mathematical +alphabets in the `mathematical alphanumeric symbols Unicode block`_. +The plain (upright, serifed) letters have been unified with the +existing characters in the Basic Latin and Greek blocks. + +`Table 5`_ maps the 14 Unicode mathematical alphabets to LaTeX commands +according to the `naming scheme`_ below. `Table 6`_ lists the status of +LaTeX support for the mathematical alphanumeric symbols. Full support is +provided by `the unicode-math package`_. + +.. _table 5: + +.. table:: Mapping Unicode `mathematical alphanumeric symbols`_ to LaTeX + math alphabets. + + ========== ======== ============= ================== =============== + serifs weight shape symbols math alphabet + ========== ======== ============= ================== =============== + *serif* *medium* *upright* Latin/Greek/digits ``\mathrm`` + [#up]_ + .. bold Latin/Greek/digits ``\mathbf`` + .. italic Latin/Greek ``\mathit`` + .. bold italic Latin/Greek ``\mathbfit`` + .. script Latin ``\mathcal`` + .. bold script Latin ``\mathbfcal`` + .. fraktur Latin ``\mathfrak`` + .. double-struck Latin/digits ``\mathbb`` + .. bold fraktur Latin ``\mathbffrak`` + sans serif Latin/digits ``\mathsf`` + sans serif bold Latin/Greek/digits ``\mathsfbf`` + sans serif italic Latin ``\mathsfit`` + sans serif bold italic Latin/Greek ``\mathsfbfit`` + .. monospace Latin/digits ``\mathtt`` + ========== ======== ============= ================== =============== + +.. [#up] plain standard characters outside the + `mathematical alphanumeric symbols` Unicode block. + +Naming scheme +````````````` + +The naming scheme is an extension of the predefined `math alphabet`_ +commands with the established short-cuts: + + .. class:: borderless + + ===== ================================ + bf bold + it italic + cal script (calligraphic) + frak fraktur + bb double-struck (blackboard bold) + sf sans serif + ===== ================================ + +combined to commands in the form ``\math``. + +The <*type*>, <*weight*>, and <*shape*> specifiers are optional +(defaults depend on the `math version`_). Their order matches the +names of Unicode `Mathematical Alphanumeric Symbols`_. + +Examples:: + + \mathbf{d} % MATHEMATICAL BOLD SMALL D + \mathsfbfit{d} % MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D. + + +.. _Table 6: + +.. table:: LaTeX support for `mathematical alphanumeric symbols`_. + + ============ ========================= =========================== + style math alphabet package, comment + ============ ========================= =========================== + plain [#up]_ ``\mathrm`` predefined [#no-g]_ + .. ``\mathup`` unicode-math_ + bf ``\mathbf`` predefined [#no-g]_ + it ``\mathit`` predefined [#no-g]_ + bf it ``\mathbfit`` isomath [#digits]_ + .. ``\mathbold`` fixmath_, mathpazo_, + mathptmx_, tmmath_ + [#digits]_ + .. ``\boldsymbol`` amsmath_ + .. ``\bm`` bm_ + cal ``\mathcal`` predefined [#script]_ + .. ``\mathscr`` mathrsfs_, euscript_, + mathdesign_ + bf cal ``\mathbfscr`` unicode-math_ + frak ``\mathfrak`` amssymb_, amsfonts_, eufrak_ + bf frak ``\mathbffrak`` unicode-math_ + bb ``\mathbb`` amssymb_, bbold_, + mathbbol_, mbboard_, + mathpazo_ + .. ``\mathbbm`` bbm_ + .. ``\mathds`` dsfont (doublestoke_) + sf ``\mathsf`` predefined [#no-g]_ + sf bf ``\mathbfsfup`` unicode-math_ + sf it ``\mathsfit`` isomath [#digits]_ + sf bf it ``\mathsfbfit`` isomath [#digits]_ + .. ``\mathbold`` cmbright_, hvmath_ + .. ``\mathbfsfit`` unicode-math_ + tt ``\mathtt`` predefined [#no-g]_ + ============ ========================= =========================== + +.. [#no-g] no small Greek, full Greek with `OMLmath*`_ options. +.. [#digits] Some italic math fonts (e. g., cmr, cmbr) have old-style + numbers in place of italic digits. +.. [#script] no small Latin, formal script with calrsfs_, eucal_, fourier_ + + +The unicode-math package +'''''''''''''''''''''''' + +Users of UTF-8 enabled TeX engines (XeTeX, LuaTeX) can typeset +mathematics with the experimental unicode-math_ package by Will +Robertson. It provides a LaTeX interface to OpenType fonts with math +support, e. g., `Asana Math`_, Cambria Math, `New Euler`_ or XITS_, with +commands to access the complete mathematics character repertoire of the +Unicode Standard + +LaTeX `math font selection`_ methods with unicode-math: + +`math alphabets`_ + map to a range of the `mathematical alphanumeric symbols`_ block in the + current font (or a substitution defined with the ``range`` math font + option). + + Some command names differ from the `predefined math alphabets`_ or the + above `naming scheme`_: + + =============== =============== + LaTeX unicode-math + =============== =============== + ``\mathbf`` ``\mathbfup`` + ``\mathsf`` ``\mathsfup`` + ``\mathsfbf`` ``\mathbfsfup`` + ``\mathsfbfit`` ``\mathbfsfit`` + =============== =============== + + With unicode-math, ``\mathbf``, ``\mathsf``, and ``\mathsfbf`` + behave similar to `“in-line math versions”`_: they consider the + `math style`_ for upright vs. italic shape. Compatibility can be + achieved via the options ``bold-style=upright`` and + ``sans-style=upright``. + + ``\mathbfsfit`` reverses the order of the ``sf`` and ``bf`` selectors, + so that, e. g., the Unicode character `MATHEMATICAL SANS-SERIF BOLD + ITALIC CAPITAL A` is selected by the non-mnemonic ``\mathbfsfit{A}``. + +`math versions`_ + are not directly supported but easy to emulate. + + As Unicode fonts can hold all math symbols in a single font file, a + single ``\setmathfont[]{}`` can replace + the ``\mathversion{}`` command if a complete OpenType + math font in the desired version is available. + + + However, complete OpenType math fonts are rare. Therefore + unicode-math supports using multiple fonts with the ``range`` + option. This way one can emulate, e. g., the ``bold`` math version + via:: + + \renewcommand{\boldmath}{% + \setmathfont{XITS Bold}% + \setmathfont[range={"1D400-"1F020}]{XITS Math}% + \setmathfont[range=\mathup->\mathbfup]{XITS Math}% + \setmathfont[range=\mathsfit->\mathbfsfit]{XITS Math}% + % ... + } + + It would be nice if unicode-math could provide a ``\newmathversion`` + command similar to the ``\newfontfamily`` in fontspec_ for such setups. + + For alphanumerical characters, the ``\mathbf``, ``\mathsf``, and + ``\mathsfbf`` behave like `“in-line math versions”`_. + +`math styles`_ + are supported with the ``math-style`` package option that accepts the + values ``TeX``, ``ISO``, ``french``, ``upright``, and ``literal``. 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 a LaTeX equivalent of the `Mathematical -Alphanumeric Symbols`_ Unicode block. +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 a LaTeX equivalent of the +`mathematical alphanumeric symbols`_ Unicode block. This should be (relatively) easy to achieve via virtual fonts when the glyphs for the Greek letters already exist. Examples are Latin Modern, -Kerkis, GFS-Neohellenic, LX-Fonts and KP-Serif. +Kerkis, GFS Neohellenic, LX Fonts and KP-Serif. -Alternatively, the T7 encoding could be used for math alphabets (if it ever -happens to materialise). +Alternatively, the T7 encoding could be used for math alphabets (if it +ever happens to materialise). -Upright small Greek letters in ``\mathrm`` would enable the specification of -the constant pi, Myons, Pions, alpha-particles, photons, and neutrinos -without special packages. (With mathdesign_, this is already possible -today.) +Upright small Greek letters in ``\mathrm`` would enable the +specification of the constant pi, Myons, Pions, alpha-particles, +photons, and neutrinos with `math alphabets`_. (With mathdesign_ +fonts, this is already possible today.) +With the development of the unicode-math_ package, an interesting +alternative for ISO-conforming math typesetting became available to +users of Unicode-enabled TeX engines (XeTeX or LuaTeX). References ---------- -.. [ISO-31] International Standard 31 `Quantities and units`, - (ISO 31-0:1992 to ISO 31-14:1992): - http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=46202 +.. [ISO-80000-2] `Quantities and units – Part 2: Mathematical signs + and symbols to be used in the natural sciences and technology`: + http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=31887. + +.. [ISO-31] `Quantities and units`, Superseded by [ISO-80000]. -.. [typefaces] `Typefaces for Symbols in Scientific Manuscripts`: - http://physics.nist.gov/Document/typefaces.pdf +.. [typefaces] National Institute of Standards and Technology (NIST_), + `Typefaces for Symbols in Scientific Manuscripts`: + http://physics.nist.gov/cuu/pdf/typefaces.pdf. -.. [checklist] `SI Unit rules and style conventions` +.. [checklist] National Institute of Standards and Technology (NIST_), + `SI Unit rules and style conventions` Check List for Reviewing Manuscripts: - http://physics.nist.gov/cuu/Units/checklist.html + http://physics.nist.gov/cuu/Units/checklist.html. -.. [fonts_for_symbols] `On the use of italic and roman fonts for symbols +.. [fonts_for_symbols] International Union of Pure and Applied + Chemistry (IUPAC_), `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 + http://old.iupac.org/standing/idcns/fonts_for_symbols.html. + +.. [SI] Bureau international des poids et mesures (BIPM_), + `The International System of Units (SI)`: + http://www.bipm.org/en/si/si_brochure/. + +.. [Green-Book] International Union of Pure and Applied Chemistry (IUPAC_), + `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/ +.. [Red-Book] International Union of Pure and Applied Physics (IUPAP_), + `Symbols, Units, Nomenclature and Fundamental Constants in Physics`: + http://metrology.wordpress.com/measurement-process-index/iupap-red-book/index-iupap-red-book/. -.. [encguide] `LaTeX font encodings`: - http://mirror.ctan.org/macros/latex/doc/encguide.pdf +.. [encguide] Frank Mittelbach, Robin Fairbairns, Werner Lemberg, + LaTeX3 Project Team, `LaTeX font encodings`: + http://mirror.ctan.org/macros/latex/doc/encguide.pdf. -.. [fntguide] `LaTeX 2e font selection`: - http://mirror.ctan.org/macros/latex/doc/fntguide.pdf +.. [fntguide] LaTeX3 Project Team, `LaTeX 2e font selection`: + http://mirror.ctan.org/macros/latex/doc/fntguide.pdf. -.. [tr25] `Unicode Support for Mathematics`, Unicode Technical Report #25: - http://www.unicode.org/reports/tr25/ +.. [tr25] Barbara Beeton, Asmus Freytag, Murray Sargent III, + `Unicode Support for Mathematics`, Unicode Technical Report #25: + http://www.unicode.org/reports/tr25/. .. [beeton:2000] Barbara Beeton: `Unicode and math, a combination whose time has come – Finally!`, - TUGBoat, 21#3, 2000. available: + TUGBoat, 21#3, 2000: http://www.tug.org/TUGboat/Articles/tb21-3/tb68beet.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] + [koma-mail] Custom font substitution: http://www.komascript.de/node/823. .. Links ===== -.. Print external links as footnotes (currently errors with LaTeX) - .. target-notes:: - -.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt .. _BIPM: http://www.bipm.org/ .. _IUPAC: http://iupac.org/ .. _IUPAP: http://www.iupap.org/ +.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt +.. _Jens-Peer Kuska: http://phong.informatik.uni-leipzig.de/~kuska/ .. _NIST: http://physics.nist.gov/ -.. _mathematical alphanumeric symbols: +.. _mathematical alphanumeric symbols unicode block: http://www.unicode.org/charts/PDF/U1D400.pdf -.. _amsbsy: http://dante.ctan.org/CTAN/help/Catalogue/entries/amsbsy.html -.. _amsmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/amsmath.html -.. _arev: http://dante.ctan.org/CTAN/help/Catalogue/entries/arev.html -.. _bm: http://dante.ctan.org/CTAN/help/Catalogue/entries/bm.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 -.. _hfbright: http://dante.ctan.org/CTAN/help/Catalogue/entries/hfbright.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 +.. _amsbsy: http://mirror.ctan.org/help/Catalogue/entries/amsbsy.html +.. _amsfonts: http://mirror.ctan.org/help/Catalogue/entries/amsfonts.html +.. _amsmath: http://mirror.ctan.org/help/Catalogue/entries/amsmath.html +.. _amssymb: http://mirror.ctan.org/help/Catalogue/entries/amssymb.html +.. _arev: http://mirror.ctan.org/help/Catalogue/entries/arev.html +.. _Asana Math: http://mirror.ctan.org/help/Catalogue/entries/asana-math.html +.. _bm: http://mirror.ctan.org/help/Catalogue/entries/bm.html +.. _bbm: http://mirror.ctan.org/help/Catalogue/entries/bbm.html +.. _bbold: http://mirror.ctan.org/help/Catalogue/entries/bbold.html +.. _calrsfs: http://mirror.ctan.org/help/Catalogue/entries/calrsfs.html +.. _cmbright: http://mirror.ctan.org/help/Catalogue/entries/cmbright.html +.. _doublestoke: http://mirror.ctan.org/help/Catalogue/entries/doublestoke.html +.. _eucal: http://mirror.ctan.org/help/Catalogue/entries/eucal.html +.. _eufrak: http://mirror.ctan.org/help/Catalogue/entries/eufrak.html +.. _eulervm: http://mirror.ctan.org/help/Catalogue/entries/eulervm.html +.. _euscript: http://mirror.ctan.org/help/Catalogue/entries/euscript.html +.. _fixmath: http://mirror.ctan.org/help/Catalogue/entries/fixmath.html +.. _fix-cm: http://mirror.ctan.org/help/Catalogue/entries/fix-cm.html +.. _fourier: http://mirror.ctan.org/help/Catalogue/entries/fourier.html +.. _fontspec: http://mirror.ctan.org/help/Catalogue/entries/fontspec.html +.. _hvmath: http://mirror.ctan.org/help/Catalogue/entries/hvmath.html +.. _hfbright: http://mirror.ctan.org/help/Catalogue/entries/hfbright.html +.. _ifthen: http://mirror.ctan.org/help/Catalogue/entries/ifthen.html +.. _iwona: http://mirror.ctan.org/help/Catalogue/entries/iwona.html +.. _kpfonts: http://mirror.ctan.org/help/Catalogue/entries/kpfonts.html +.. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html +.. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html +.. _lxfonts: http://mirror.ctan.org/help/Catalogue/entries/lxfonts.html +.. _lucimatx: http://pctex.com/files/managed/b/bf/lucimatxAbbrev.pdf +.. _mathbbol: http://mirror.ctan.org/help/Catalogue/entries/mathbbol.html +.. _mbboard: http://mirror.ctan.org/help/Catalogue/entries/mbboard.html +.. _mathdesign: http://mirror.ctan.org/help/Catalogue/entries/mathdesign.html +.. _mathpazo: http://mirror.ctan.org/help/Catalogue/entries/mathpazo.html +.. _mathptmx: http://mirror.ctan.org/help/Catalogue/entries/mathptmx.html +.. _mathrsfs: http://mirror.ctan.org/help/Catalogue/entries/mathrsfs.html +.. _New Euler: https://github.com/khaledhosny/euler-otf +.. _pxfonts: http://mirror.ctan.org/help/Catalogue/entries/pxfonts.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 +.. _tmmath: http://mirror.ctan.org/help/Catalogue/entries/tmmath.html +.. _txfonts: http://mirror.ctan.org/help/Catalogue/entries/txfonts.html +.. _unicode-math: + http://mirror.ctan.org/help/Catalogue/entries/unicode-math.html +.. _upgreek: http://mirror.ctan.org/help/Catalogue/entries/upgreek.html +.. _wrisym: http://phong.informatik.uni-leipzig.de/~kuska/wri_texmf_4.2.zip +.. _XITS: http://mirror.ctan.org/help/Catalogue/entries/xits.html diff --git a/Master/texmf-dist/tex/latex/isomath/isomath.sty b/Master/texmf-dist/tex/latex/isomath/isomath.sty index 2686cbcefba..55ee4f50ac5 100644 --- a/Master/texmf-dist/tex/latex/isomath/isomath.sty +++ b/Master/texmf-dist/tex/latex/isomath/isomath.sty @@ -1,6 +1,11 @@ % isomath.sty: Math for scientists % ******************************** % +% :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 80000-2. +% % :Copyright: © 2008, 2010 Günter Milde % :Licence: This work may be distributed and/or modified under the % conditions of the `LaTeX Project Public License`_, either @@ -11,13 +16,10 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{isomath} -[2010/08/23 v0.4 Mathematics conformant to ISO 31.] +[2011/02/01 v0.5 ISO math style] -% :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. -% +% .. contents:: +% % History % ======= % @@ -35,10 +37,12 @@ % 0.4 2010-08-23 split user documentation from literate source; % \ option ``scaled``; % \ documentation update. +% 0.5 2011-01-04 math alphabet names matching Unicode; +% \ documentation review and extension; +% \ bold alphabet variants in ``bold`` math version; +% \ upright numbers with ``\vectorsym``. % === ============ ======================================================== % -% .. contents:: -% % % Requirements % ============ @@ -46,13 +50,12 @@ % fixmath.sty % ----------- % The package fixmath_ by Walter Schmidt defines Greek letters as symbols -% of type ``\mathalpha`` and takes them from the ``letters`` SymbolFont in +% of type ``\mathalpha`` and takes them from the ``letters`` symbol font in % ``\mathnormal`` (as opposed to ``operators`` in ``fontmath.ltx``). % % fixmath_ also defines the ``\mathbold`` alphabet, setting it to ``cmm``. -% This definition will be overwritten with a configurable value for -% the font family below. -% :: +% This definition is be overwritten with a configurable value for +% the font family below. :: \RequirePackage{fixmath} @@ -91,9 +94,6 @@ % :: \DeclareStringOption[1.0]{scaled} -% Use a key definition like in inconsolata.sty (cf. also helvet.sty)? -% \define@key{isomath}{scaled}[1.0]{\def\isomath@scaled{s*[#1]}} - % reuseMathAlphabets % ------------------ @@ -107,28 +107,29 @@ \DeclareBoolOption{reuseMathAlphabets} - % OMLmath* % -------- -% The following options cause `isomath` to (re)define the corresponding +% The following options cause `isomath` to (re)define the corresponding % `math alphabets`_ in OML encoding:: \DeclareBoolOption{OMLmathrm} \DeclareBoolOption{OMLmathbf} \DeclareBoolOption{OMLmathsf} -\DeclareBoolOption{OMLmathsans} +\DeclareBoolOption{OMLmathsfit} \DeclareBoolOption{OMLmathtt} +% backwards compatibility option alias +\DeclareVoidOption{OMLmathsans}{\isomath@OMLmathsfittrue} % 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, only the mathdesign_ fonts support roman in +% different shapes with e.g. ``\mathrm{\pi}`` *if an OML encoded font +% is available*. Currently, only the mathdesign_ fonts support roman in % OML encoding. % % With some packages, these options can result in a “too many math alphabets % used in version normal” error. % -% Process Options -% --------------- +% -------------------------------------------------------- +% % Process the options with ``kvoptions`` extensions:: \ProcessKeyvalOptions* @@ -137,66 +138,80 @@ % Declarations % ============ % -% % Math alphabets % -------------- % % In math, LaTeX uses “absolute” fontnames instead of a selection by % family, shape, and weight because typefaces have a semantic meaning -% (see fntguide_). +% [fntguide]_. % % `isomath` defines a math alphabet for every required font variant and % optionally re-defines 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 -% ``reuseMathAlphabets`` option reduces this number by two, with the -% side effect of italic shape with ``\mathbf`` and ``\mathsf`` commands:: +% limited to 16, so we have to be careful not to exceed this. The +% ``reuseMathAlphabets`` option reduces the number of math alphabet +% definitions by two, with the side effect of italic shape with +% ``\mathbf`` and ``\mathsf`` commands:: \ifisomath@reuseMathAlphabets \PackageWarningNoLine{isomath}{% - Re-using math alphabet `mathsf' for \protect \mathboldsans - \MessageBreak and `mathbf' for \protect \mathbold + Re-using math alphabet `mathsf' for \protect \mathsfbfit + \MessageBreak and `mathbf' for \protect \mathbfit } \fi -% mathbold +% mathbfit % ~~~~~~~~ -% The *italic bold* math alphabet is named ``\mathbold`` like in -% fixmath_ and related packages. With the reuseMathAlphabets_ option, -% the roman bold math alphabet ``\mathbf`` is redefined and -% ``\mathbold`` made an alias (overwriting existing definitions):: +% The *bold italic* math alphabet is named ``\mathbfit`` like in +% unicode-math_ (with an alias ``\mathbold`` like in fixmath_ and +% related packages). With the reuseMathAlphabets_ option, the roman bold +% math alphabet ``\mathbf`` is redefined and ``\mathbfit`` made an +% alias. The series selector ``bx`` (bold extended) is used, because it +% is better supported than ``b``. (Is there any LaTeX math font +% distinguishing between ``b`` and ``bx``?) :: \ifisomath@reuseMathAlphabets \DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it} - \def\mathbold{\mathbf} + \def\mathbfit{\mathbf} \else - \DeclareMathAlphabet{\mathbold}{OML}{\isomath@rmdefault}{bx}{it} + \DeclareMathAlphabet{\mathbfit}{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:: +% alias (overwriting the definition from fixmath):: -\ifisomath@OMLmathsans - \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} +\renewcommand{\mathbold}{\mathbfit} + +% mathsfit +% ~~~~~~~~ +% For *sans-serif italic*, we define a new alphabet ``\mathsfit`` (with +% the alias ``\mathsans`` in analogy to ``\mathbold``). As this typeface +% is not required by ISO 80000-2 and TeX limits the number of math alphabets +% to 16 per math version, it is only defined if the ``OMLmathsfit`` or +% ``OMLmathsans`` option is set:: + +\ifisomath@OMLmathsfit + \DeclareMathAlphabet{\mathsfit}{OML}{\isomath@sfdefault}{m}{it} + \SetMathAlphabet{\mathsfit}{bold}{OML}{\isomath@sfdefault}{bx}{it} + \def\mathsans{\mathsfit} \fi -% mathboldsans +% mathsfbfit % ~~~~~~~~~~~~ -% A *sans serif slanted bold* alphabet is needed for tensor symbols. +% The *sans serif bold italic* alphabet is used for tensor symbols. +% Following the Unicode math name scheme it is called +% ``\mathsfbfit``(with the backwards compatibility alias ``\mathboldsans``). % With the reuseMathAlphabets_ option, the upright sans serif math -% alphabet ``\mathsf`` is redefined and ``\mathboldsans`` made an -% alias:: +% alphabet ``\mathsf`` is redefined and ``\mathsfbfit`` made an +% alias to it:: \ifisomath@reuseMathAlphabets \DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it} - \def\mathboldsans{\mathsf} + \def\mathsfbfit{\mathsf} \else - \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} + \DeclareMathAlphabet{\mathsfbfit}{OML}{\isomath@sfdefault}{bx}{it} \fi +\def\mathboldsans{\mathsfbfit} % Redefine standard alphabets % ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -206,68 +221,78 @@ \ifisomath@OMLmathrm \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{m}{n} + \SetMathAlphabet{\mathrm}{bold}{OML}{\isomath@rmdefault}{bx}{n} \fi \ifisomath@OMLmathbf - \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n} + \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{bx}{n} \fi \ifisomath@OMLmathsf \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{m}{n} + \SetMathAlphabet{\mathsf}{bold}{OML}{\isomath@sfdefault}{bx}{n} \fi \ifisomath@OMLmathtt \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{m}{n} + \SetMathAlphabet{\mathtt}{bold}{OML}{\ttdefault}{bx}{n} \fi % Command aliases % --------------- % % The following macros allow semantic markup of mathematical symbols. -% The argument is typeset as proposed by ISO 31 and +% The argument is typeset as proposed by ISO 80000-2 and % `Typefaces for Symbols in Scientific Manuscripts`_. % % \\vectorsym % ~~~~~~~~~~~ -% Symbols for vectors are typeset *boldface italic*:: - -\newcommand{\vectorsym}{\mathbold} +% Alphabetic vectors symbols are typeset *boldface italic* while numeric +% ones (e.g. zero vector) are typeset *boldface upright*. The number +% test is a simplified version from the LaTeX FAQ +% `Is the argument a number? +% `__ +% It fails if a number is followed by a non-number, e.g. ``\vectorsym{1a}``, +% but this is no valid vector symbol and would look strange with the +% ``\vec`` accent, too. :: + +\providecommand*{\vectorsym}[1]{% + \ifnum9<1#1% + \mathbf{#1}% + \else% + \mathbfit{#1}% + \fi} % 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 of the documentation). -% -% Attention: Some fonts (CM, Latin Modern, ...) have old-style figures in -% their math italic version. The Null vector must not be written ``\vec{0}`` -% in this case. Use e.g. ``\mathbf{0}``, ``\boldsymbol{0}`` (with AMS math) or -% ``\bm{0}`` (with boldmath). The latter two variants provide also a failsafe -% alias for a bold vector. +% package. % % \\matrixsym % ~~~~~~~~~~~ % Symbols for matrices are typeset *boldface italic*, i. e. in the same face % as vectors. :: -\newcommand{\matrixsym}{\mathbold} - +\providecommand*{\matrixsym}{\vectorsym} % \\tensorsym % ~~~~~~~~~~~ % Symbols for tensors are *sans-serif bold italic*:: -\newcommand{\tensorsym}{\mathboldsans} +\providecommand*{\tensorsym}{\mathsfbfit} + - % Font mappings % ------------- % -% Some font packages provide matching text and math font but do not -% define a substitution in their ``*.fd`` files. +% Substitutions needed for the math alphabet definitions and setup for +% scaled fonts. For details about the font definition macros see +% [fntguide]_. % -% We define the substitutions needed for the math alphabet definitions -% in this package. Ideally, these should become part of the package's -% ``*.fd`` files. +% Common family name for text and math +% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ % -% For details about the font definition macros see the fntguide_. +% Some font packages provide matching text and math font but do not +% define a substitution in their ``*.fd`` files. Ideally, the following +% mappings should be moved there. % -% Mathpazo (Palatino) ppl <-> zplm :: +% Mathpazo (Palatino) ppl ↔ zplm :: \DeclareFontFamily{OML}{ppl}{\skewchar\font127} \DeclareFontShape{OML}{ppl}{m}{it}{<-> ssub * zplm/m/it}{} @@ -277,50 +302,51 @@ % Scaling % ~~~~~~~ % Scale the ``fav`` (Arev), ``llcmss`` (LX Fonts), and ``iwona`` fonts -% by the value of the ``scaled`` option. +% by the value of the scaled_ option. % % To get scaled versions of a font, you cannot use the ``ssub`` % `size function`, but must use the empty function or ``s`` with the font % file as argument [found by experiment, GM 2010-01-28]. % -% Arev (see omlzavm.fd): fav <-> zavm :: +% Arev (see omlzavm.fd): fav ↔ zavm :: \DeclareFontFamily{OML}{fav}{\skewchar\font127} \DeclareFontShape{OML}{fav}{m}{it}{<-> s * [\isomath@scaled] zavmri7m}{} \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [\isomath@scaled] zavmbi7m}{} -% LX Fonts (see lxfonts.sty): llcmss -> llcmm :: +% LX Fonts (see lxfonts.sty): llcmss ↔ llcmm :: \DeclareFontFamily{OML}{llcmss}{\skewchar\font'177} \DeclareFontShape{OML}{llcmss}{m}{it}{<-> s * [\isomath@scaled] lcmmi8}{} \DeclareFontShape{OML}{llcmss}{bx}{it}{<-> s * [\isomath@scaled] lcmmib8}{} -% Ivona (see ``omliwona.fd``):: +% Iwona (see ``omliwona.fd``) iwona ↔ mi-iwona:: \DeclareFontFamily{OML}{iwona}{} \DeclareFontShape{OML}{iwona}{m}{it}{<-> s * [\isomath@scaled] mi-iwonari}{} \DeclareFontShape{OML}{iwona}{bx}{it}{<-> s * [\isomath@scaled] mi-iwonabi}{} -% No declarations below this point:: - -\endinput -% .. Links -% .. ***** +% References +% ========== +% +% .. [fntguide] `LaTeX 2e font selection`: +% http://mirror.ctan.org/macros/latex/doc/fntguide.pdf. % % .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt -% .. _arev: http://dante.ctan.org/CTAN/help/Catalogue/entries/arev.html -% .. _cmbright: http://dante.ctan.org/CTAN/help/Catalogue/entries/cmbright.html -% .. _fixmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/fixmath.html -% .. _fntguide: http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf -% .. _hvmath: http://dante.ctan.org/CTAN/help/Catalogue/entries/hvmath.html -% .. _iwona: http://dante.ctan.org/CTAN/help/Catalogue/entries/iwona.html -% .. _keyval: http://dante.ctan.org/CTAN/help/Catalogue/entries/keyval.html -% .. _kvoptions: http://dante.ctan.org/CTAN/help/Catalogue/entries/kvoptions.html -% .. _lxfonts: http://dante.ctan.org/CTAN/help/Catalogue/entries/lxfonts.html -% .. _mathdesign: http://dante.ctan.org/CTAN/help/Catalogue/entries/mathdesign.html +% .. _arev: http://mirror.ctan.org/help/Catalogue/entries/arev.html +% .. _cmbright: http://mirror.ctan.org/help/Catalogue/entries/cmbright.html +% .. _fixmath: http://mirror.ctan.org/help/Catalogue/entries/fixmath.html +% .. _hvmath: http://mirror.ctan.org/help/Catalogue/entries/hvmath.html +% .. _iwona: http://mirror.ctan.org/help/Catalogue/entries/iwona.html +% .. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html +% .. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html +% .. _lxfonts: http://mirror.ctan.org/help/Catalogue/entries/lxfonts.html +% .. _mathdesign: http://mirror.ctan.org/help/Catalogue/entries/mathdesign.html % .. _mathematical alphanumeric symbols: % http://www.unicode.org/charts/PDF/U1D400.pdf -% .. _oberdiek: http://dante.ctan.org/CTAN/help/Catalogue/entries/oberdiek.html +% .. _oberdiek: http://mirror.ctan.org/help/Catalogue/entries/oberdiek.html % .. _`Typefaces for Symbols in Scientific Manuscripts`: -% http://physics.nist.gov/Document/typefaces.pdf +% http://physics.nist.gov/cuu/pdf/typefaces.pdf +% .. _unicode-math: +% http://mirror.ctan.org/help/Catalogue/entries/unicode-math.html -- cgit v1.2.3