summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/isomath
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-04 23:50:58 +0000
committerKarl Berry <karl@freefriends.org>2008-10-04 23:50:58 +0000
commitd5d609e002170e08c67f533bcd4f4fada5196187 (patch)
tree4b1c02f4c562ceaadb494d5894d2e625f8b9c52a /Master/texmf-dist/tex/latex/isomath
parent27ba1b8d22c0132a0b0c5fba15fb37ea10205cd3 (diff)
isomath update (4oct08)
git-svn-id: svn://tug.org/texlive/trunk@10854 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/isomath')
-rw-r--r--Master/texmf-dist/tex/latex/isomath/isomath.sty247
1 files changed, 146 insertions, 101 deletions
diff --git a/Master/texmf-dist/tex/latex/isomath/isomath.sty b/Master/texmf-dist/tex/latex/isomath/isomath.sty
index 7dc97ec2e45..89353a74869 100644
--- a/Master/texmf-dist/tex/latex/isomath/isomath.sty
+++ b/Master/texmf-dist/tex/latex/isomath/isomath.sty
@@ -23,10 +23,10 @@
% *sans-serif bold italic* typeface, as recommended by [typefaces]_?
%
% Scientific organisations like IUPAP_, IUPAC_, NIST_, BIPM_, and others
-% recommend typesetting math according to International Standard `ISO 31`_
-% `Quantities and units` (ISO 31-0:1992 to ISO 31-14:1992).\ [#]_
+% recommend typesetting math according to the International Standard ISO 31
+% `Quantities and units` [ISO-31]_.\ [#]_
%
-% The traditional `LaTeX-style` deviates in some points from this rules:
+% The traditional `LaTeX math style` deviates in some points from this rules:
%
% * The ``\vec`` command produces an array accent, while ISO 31 recommends
% a *bold italic* typeface for vector symbols.
@@ -36,28 +36,17 @@
% and the Latin alphabet.
%
% * There is no provision for typesetting of Greek letters in *bold italic*
-% style recommended for vectors (even though the required fonts are
-% available).
+% style recommended for vectors.
%
% * There is no provision for typesetting letters in *sans-serif bold italic*
% recommended for typesetting tensor symbols.
%
-% Also, the Unicode Standard defines the block `mathematical alphanumeric
-% symbols`_ — *To be used for mathematical variables where style variations
-% are important semantically* — which contains Latin and Greek letters in
-% bold, italic, bold italic, sans-serif bold, and sans-serif bold italic
-% typeface.\ [#]_
-%
-% Some of these points are already adressed by `related packages`_, however
+% 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.
%
-% .. [#] A summary of these rules is free available [typefaces]_. See also
-% [fonts-for-symbols]_ and [SI-brochure]_.
-%
-% .. [#] Plus Number variants and Latin letters in script, bold script,
-% fraktur, bold fraktur, double-struck, sans-serif and monospace;
-% alltogether 1023 codepoints.
+% .. [#] Summaries of these rules are free available, see [typefaces]_,
+% [fonts-for-symbols]_, and [SI-brochure]_.
%
%
% Features
@@ -66,26 +55,20 @@
% The ``isomath.sty`` package facilitates the task to abide with ISO 31 when
% typesetting math with LaTeX:
%
-% * It utilises fixmath_ to re-define Greek letters as ``\mathalpha``, taking
-% them from the "letters" symbol fonts (as opposed to "operators" in
-% ``fontmath.ltx``). This ensures that
+% * Equal treatment of Latin and `Greek in math`_ via fixmath.sty_:
%
% + Greek letters change shape together with Latin letters if a different
% math alphabet is used.
%
% + Uppercase Greek letters are typeset in italic style by default.
%
-% + Upright Greek letters are available through the ``\mathrm`` and
-% ``\mathbf`` alphabets, if the corresponding fonts are OML encoded.
-%
-% Caution: small Greek letters in a math alphabet command can lead to garbage.
-% Use the options for `OML math alphabets`_ (if the used font supports the
-% `OML font encoding`_) or place Greek letters outside the math alphabet
-% command. Some packages (including fixmath_) provide ``\up*`` or
-% ``\var*`` macros for upright Greek letters, e.g. ``\mathrm{k}\upOmega``.
+% + Upright Greek letters can be made available through the ``\mathrm``
+% and ``\mathbf`` alphabets, if the corresponding fonts support the
+% `OML font encoding`_.
%
% * The `command aliases`_ ``\vectorsym``, ``\matrixsym``, and ``\tensorsym``
-% allow semantic markup selecting an ISO-conforming typeface.
+% allow semantic markup. They print the argument in an ISO-conforming
+% typeface.
%
% * For this, new `math alphabets`_ are defined:
%
@@ -98,13 +81,18 @@
% ``sfdefault=<family>`` options_ can be used to override the defaults.
%
% * Missing `font mappings`_ are defined for font families which have an OML
-% encoded counterpart but miss the substitution definition in their ``*.fd``
+% encoded counterpart but no substitution definition in their ``*.fd``
% files.
%
%
-% Examples
-% ========
+% Usage
+% =====
%
+% Make sure that LaTeX can find ``isomath.sty`` and insert the command
+% ``\usepackage{isomath}`` in the document preamble.
+%
+% Examples
+% --------
%
% * In many cases (e.g. when ``\sfdefault`` expands to "cmss"), the
% ``\mathboldsans`` alphabet is neither bold nor sans, as "cmss" has no OML
@@ -126,13 +114,13 @@
% \usepackage[charter]{mathdesign}
% \usepackage[OMLmathbf,sfdefault=cmbr]{isomath}
%
-% Now, ``\mathbf{\pi}`` works as expected.
+% Now, ``\mathbf{\pi}`` produces a bold upright pi symbol.
%
% Related packages
% ================
%
-% Some packages already define Greek letters as ``\mathalpha`` and provide the
-% ``\mathbold`` alphabet (in OML):
+% A set of packages at CTAN also defines Greek letters as ``\mathalpha`` and
+% provide the ``\mathbold`` alphabet (in OML):
%
% * arev_ (Arev/Vera Sans)
% * cmbright_ (CM Bright)
@@ -142,11 +130,11 @@
% * mathpazo_ (Palatino)
% * tmmath_ (TM-Math/Times)
%
-% This package builds on and extends fixmath_ by Walter Schmidt
-% (see Requirements_).
+% This package requires and extends fixmath.sty_.
%
-% The cmbright_ package provides fonts for ``\mathsans`` and
-% ``\mathboldsans`` matching with Computer Modern and derivatives.
+% The cmbright_ package provides *sans serif* and *sans-serif bold* fonts for
+% the ``\mathsans`` and ``\mathboldsans`` alphabets that match with Computer
+% Modern and derivatives.
%
% Conflicts
% ---------
@@ -158,22 +146,47 @@
%
% The `kpfonts`_, `pxfonts`_, and `txfonts`_ packages define many additional
% math alphabets and can only be combined with ``isomath``, if the
-% reuseMathalphabets_ option is used.
+% reuseMathAlphabets_ option is used.
+%
+% Greek in Math
+% =============
+%
+% Unicode Math Support
+% --------------------
+%
+% The technical report `Unicode Support for Mathematics` [tr25]_ lists
+% *alphanumeric symbols encountered in mathematics* in Table 2.1 `Mathematical
+% Alphabets`. It includes Latin and Greek letters in the bold, italic, bold
+% italic, sans-serif bold, and sans-serif bold italic math styles.
+%
+% The Unicode block `mathematical alphanumeric symbols`_ provides style
+% variants for Latin and Greek letters and digits. It is "to be used for
+% mathematical variables where style variations are important semantically".
+%
%
% OML font encoding
-% =================
+% -----------------
+%
+% The OML font encoding is the only established encoding providing
+% Latin and Greek letters in one font:
+%
+% * LGR is Greek-only,
+% * T7 is just a "reserved name" for a standard Greek encoding.
%
-% The `LaTeX font encodings` guide [encguide]_ defines:
+% Definition
+% """"""""""
+%
+% The `LaTeX font encodings` guide [encguide]_ names OML `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.
%
-% and names it `TeX math italic`. However, the reference to *italic* seems to
-% be a description of the *state of the art* rather than a necessary
-% restriction:
+% However, the reference to **italic** seems to be a description of the *state
+% of the art* rather than a necessary restriction:
%
-% * The only OML encoded CM font is "Computer Modern Math Italic" (cmmi),
+% * The only OML encoded CM font is `Computer Modern Math Italic` (cmmi),
%
% * but generally, font encodings (T1, OT1) are not specific to the font shape.
%
@@ -184,11 +197,8 @@
% * A more suitable public name would be `TeX math letters` or `Original/Old
% Math Letters`. The latter would also explain the acronym OML.
%
-% The OML font encoding is the only established encoding providing
-% Latin and Greek letters in one font:
-%
-% * LGR is Greek-only,
-% * T7 is just a "reserved name" for a standard Greek encoding.
+% Support
+% """""""
%
% Unfortunately, support for the OML encoding is missing for many font
% families even if the base font contains all Greek letters.
@@ -283,17 +293,16 @@
% ============= ===============================
%
% Conclusions and outlook
-% =======================
+% -----------------------
%
% It is hoped, that in the future more fonts families will support the OML
-% encoding in normal and bold weight as well as upright and italic shape.
-% This would be a major step towards the full support of the `Mathematical
+% 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 is (relatively) easy to achieve via virtual fonts when the glyphs for
-% the Greek letters already exist (this is the case for many fonts where the
-% primary version is Unicode encoded). Examples are Latin Modern, Kerkis,
-% GFS-Neohellenic, LX-Fonts and KP-Serif.
+% 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, T7 could be used for math alphabets (if it ever happens to
% materialise).
@@ -311,25 +320,52 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{isomath}
-[2008/06/23 v0.1 typeset math according to International Standard ISO 31]
+[2008/10/02 v0.2 typeset math according to International Standard ISO 31]
+% .. class:: borderless
+%
+% ===== ========== ========================================================
+% 0.1 2008-09-25 first public version.
+% 0.2 2008-10-02 bugfix: a usage example was uncommented;
+% updated documentation;
+% define \mathsans only if OMLmathsans is true;
+% option reuseMathalphabets -> reuseMathAlphabets.
+% ===== ========== ========================================================
+%
+%
% Requirements
% ============
%
-% fixmath
-% -------
+% fixmath.sty
+% -----------
%
-% fixmath_ by Walter Schmidt defines Greek letters as symbols of type
-% ``\mathalpha`` and takes them from the "letters" SymbolFont in
-% ``\mathnormal``. (It also defines the ``\mathbold`` alphabet, setting it to
-% ``cmm``. This definition will be overwritten with a configurable value for
+% The 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``.
+% However, this definition will be overwritten with a configurable value for
% the font family below.)
+%
% ::
\RequirePackage{fixmath}
-% kvoptions
-% ---------
+% .. caution::
+%
+% Placing small Greek letters in a math alphabet, e.g.
+% ``\mathrm{k\Omega}``, can lead to garbage.
+%
+% If the chosen font supports the `OML font encoding`_, you can use the
+% options for `OML math alphabets`_. Otherwise, place Greek letters
+% outside the math alphabet command.
+%
+% Some packages provide ``\up*`` or ``\var*`` macros for upright Greek
+% letters, e.g. ``\mathrm{k}\upOmega``.
+%
+%
+% kvoptions.sty
+% -------------
%
% The kvoptions_ package in the oberdiek_ bundle facilitates the setup of
% package options and provides a key=value interface (based on keyval_)::
@@ -377,7 +413,7 @@
% Allow scaling?
%
%
-% reuseMathalphabets
+% reuseMathAlphabets
% ------------------
%
% The definition of new `math alphabets`_ can lead to a "too many math
@@ -387,29 +423,37 @@
% ``\mathbf`` and ``\mathsf`` alphabets for italic bold and sans-serif bold.
%
% To access the upright shapes, the corresponding ``\textbf`` and ``\textsf``
-% commands might be used (however, that this toggles the math-mode off and
+% commands might be used (however, this toggles the math-mode off and
% might use a different font).
%
% ::
-\DeclareBoolOption{reuseMathalphabets}
+\DeclareBoolOption{reuseMathAlphabets}
-% Caution: Do not use ``reuseMathalphabets`` together with ``OMLmathbf`` or
-% ``OMLmathsf``.
+% .. caution::
+% Do not use ``reuseMathAlphabets`` together with the ``OMLmathbf`` or
+% ``OMLmathsf`` options.
%
%
% OML math alphabets
% ------------------
%
-% The following options cause isomath to (re)define `math alphabets`_ in OML
-% encoding.
-%
% With Greek letters defined as ``\mathalpha``, the math alphabets are
-% expected to be in `OML font encoding`_ as OT1 encoded fonts have ligatures
-% and non-alpha symbols in place of the small Greek letters.
+% expected to be in `OML font encoding`_. Unfortunately, the standard math
+% alphabets are usually taken from OT1 encoded fonts that have ligatures and
+% non-alpha symbols in place of the small Greek letters.
%
+% The following options cause isomath to (re)define `math alphabets`_ in OML
+% encoding::
+
+\DeclareBoolOption{OMLmathrm}
+\DeclareBoolOption{OMLmathbf}
+\DeclareBoolOption{OMLmathsf}
+\DeclareBoolOption{OMLmathsans}
+\DeclareBoolOption{OMLmathtt}
+
% Setting these options enables access to small Greek letters in different
-% shapes with e.g. ``\mathrm{\pi}`` **if an OML encoded font is available**.
+% shapes with e.g. ``\mathrm{\pi}`` — *if an OML encoded font is available*.
% Currently, support for the `OML font encoding`_ is rather limited:
%
% * only the mathdesign_ fonts support *bold roman* in OML encoding, while
@@ -418,14 +462,7 @@
%
% With some packages, these options can result in a "too many math alphabets
% used in version normal" error.
-% ::
-
-\DeclareBoolOption{OMLmathrm}
-\DeclareBoolOption{OMLmathbf}
-\DeclareBoolOption{OMLmathsf}
-\DeclareBoolOption{OMLmathsans}
-\DeclareBoolOption{OMLmathtt}
-
+%
% ---------------------------------------------------
%
% Process the options with ``kvoptions`` extensions::
@@ -439,22 +476,25 @@
% --------------
%
% In math, LaTeX uses "absolute" fontnames instead of a selection by family,
-% shape, and weight (see the [fntguide]_ for the rationale).
+% shape, and weight because typefaces have a semantic meaning [fntguide]_.
+% This correlates with the `Unicode math support`_ where the
+% `mathematical alphanumeric symbols`_ block defines distinct Unicode
+% characters for in Greek and Latin letters in different typefaces.
%
-% We define a math alphabet for every required font variant and optionally
-% re-define the standard math alphabets in `OML font encoding`_.
+% 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.
%
% mathbold
% """"""""
%
-% For the *`italic bold* math alphabet we use the name ``\mathbold``
-% established in `related packages`_. With the reuseMathalphabets_ option,
-% ``\mathfb`` is redefined and ``\mathbold`` made an alias (overwriting
-% existing definitions). ::
+% The *italic bold* math alphabet is named ``\mathbold`` like in
+% `related packages`_. With the reuseMathAlphabets_ option, ``\mathfb``
+% is redefined and ``\mathbold`` made an alias (overwriting existing
+% definitions)::
-\ifisomath@reuseMathalphabets
+\ifisomath@reuseMathAlphabets
\DeclareMathAlphabet{\mathbf}{OML}{\isomath@rmdefault}{bx}{it}
\def\mathbold{\mathbf}
\else
@@ -476,10 +516,10 @@
% """"""""""""
%
% A *sans serif slanted bold* alphabet is needed for tensor symbols. With the
-% reuseMathalphabets_ option, ``\mathsf`` is redefined and ``\mathboldsans``
+% reuseMathAlphabets_ option, ``\mathsf`` is redefined and ``\mathboldsans``
% made an alias::
-\ifisomath@reuseMathalphabets
+\ifisomath@reuseMathAlphabets
\DeclareMathAlphabet{\mathsf}{OML}{\isomath@sfdefault}{bx}{it}
\def\mathboldsans{\mathsf}
\else
@@ -490,7 +530,7 @@
% """""""""""""""""""""""""""
%
% Redefine standard alphabets in `OML font encoding`_
-% (if the corresponding `OML math alphabets`_ option is true). ::
+% if the corresponding `OML math alphabets`_ option is true::
\ifisomath@OMLmathrm
\SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n}
@@ -509,7 +549,7 @@
% ---------------
%
% The following macros allow semantic markup of mathematical symbols.
-% The symbols argument is typeset as proposed by ISO 31 and [typefaces]_.
+% The argument is typeset as proposed by ISO 31 and [typefaces]_.
%
% \\vectorsym
% """""""""""
@@ -580,6 +620,10 @@
% 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
+%
% .. [typefaces] `Typefaces for Symbols in Scientific Manuscripts`:
% http://physics.nist.gov/Document/typefaces.pdf
%
@@ -596,6 +640,9 @@
% .. [fntguide] `LaTeX 2e font selection`:
% http://dante.ctan.org/CTAN/macros/latex/doc/fntguide.pdf
%
+% .. [tr25] `Unicode Support for Mathematics`, Unicode Technical Report #25:
+% http://www.unicode.org/reports/tr25/
+%
% .. see also
% [koma-mail] Custom font substitution: http://www.komascript.de/node/823
%
@@ -610,8 +657,6 @@
% .. _IUPAC: http://iupac.org/
% .. _IUPAP: http://www.iupap.org/
% .. _NIST: http://physics.nist.gov/
-% .. _ISO 31:
-% http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=46202
% .. _mathematical alphanumeric symbols:
% http://www.unicode.org/charts/PDF/U1D400.pdf
% .. _arev: http://dante.ctan.org/CTAN/help/Catalogue/entries/arev.html