diff options
author | Karl Berry <karl@freefriends.org> | 2009-06-21 00:24:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-06-21 00:24:47 +0000 |
commit | 1818174ad5a62aca7ee9a87c646d9888c0e1188a (patch) | |
tree | dcd4c6f5f20742233e74dc0af9b33e69d819f8df /Master/texmf-dist/doc/latex/isomath/isomath.sty.txt | |
parent | d5c69362ef92a985a1cecefe6bbbca5eb51e822a (diff) |
isomath 0.3 (20jun09)
git-svn-id: svn://tug.org/texlive/trunk@13844 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/isomath/isomath.sty.txt')
-rw-r--r-- | Master/texmf-dist/doc/latex/isomath/isomath.sty.txt | 320 |
1 files changed, 210 insertions, 110 deletions
diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt index aa082fdd79c..c133b50b45e 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt +++ b/Master/texmf-dist/doc/latex/isomath/isomath.sty.txt @@ -1,21 +1,22 @@ isomath: Math for scientists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -:Copyright: © 2008 Günter Milde -:Licence: Released under the terms of the GNU General Public License - (version 2 or later). - -:Abstract: The isomath package enables formatting Greek and Latin - letters as symbols for vectors, matrices, and tensors - in the typefaces recommended for scientific papers +:Copyright: © 2008, 2009 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. For this, a *bold italic* and a *sans-serif bold italic* math alphabet are defined. -.. contents:: +.. contents:: Introduction ************ - + Motivation ========== @@ -46,7 +47,7 @@ there is currently no package (known to the author) that defines the *sans-serif bold italic* math alphabet needed for tensor symbols. .. [#] Summaries of these rules are free available, see [typefaces]_, - [fonts-for-symbols]_, and [SI-brochure]_. + [checklist]_, [fonts-for-symbols]_, and [SI-brochure]_. Features @@ -59,17 +60,17 @@ typesetting math with LaTeX: + 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 can be made available through the ``\mathrm`` - and ``\mathbf`` alphabets, if the corresponding fonts support the + + + 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. They print the argument in an ISO-conforming typeface. - + * For this, new `math alphabets`_ are defined: :``\mathbold``: *boldface italic* (vector and matrix symbols), @@ -84,14 +85,16 @@ typesetting math with LaTeX: encoded counterpart but no substitution definition in their ``*.fd`` files. - + Usage ===== Make sure that LaTeX can find ``isomath.sty`` and insert the command ``\usepackage{isomath}`` in the document preamble. -Examples +For package options, see the Options_ section below. + +Examples -------- * In many cases (e.g. when ``\sfdefault`` expands to "cmss"), the @@ -101,7 +104,11 @@ Examples Use cmbright_ for sans-serif math alphabets:: \usepackage[sfdefault=cmbr]{isomath} - + + Define also a slanted sans-serif math alphabet:: + + \usepackage[sfdefault=cmbr,OMLmathsans]{isomath} + * Redefine the standard ``\vec`` macro to typeset its argument in `bold italic`:: @@ -113,7 +120,7 @@ Examples \usepackage[charter]{mathdesign} \usepackage[OMLmathbf,sfdefault=cmbr]{isomath} - + Now, ``\mathbf{\pi}`` produces a bold upright pi symbol. Related packages @@ -140,38 +147,97 @@ Conflicts --------- The `fourier`_ package for math typesetting with Utopia defines its own, -incompatible math font encodings. It cannot be used with ``isomath`` but -provides other means to typeset upright or italic Greek (see its -documentation). +incompatible math font encodings. It cannot be used with ``isomath`` +but provides other means to typeset upright or italic Greek (see its +documentation).\ [#]_ The `kpfonts`_, `pxfonts`_, and `txfonts`_ packages define many additional -math alphabets and can only be combined with ``isomath``, if the -reuseMathAlphabets_ option is used. +math alphabets the additional definitions in isomath lead to a "too many +math alphabets used in version normal" error. The error can be avoided with +the reuseMathAlphabets_ option. + +.. [#] However, it is possible to use the symbols from `fourier`_ together + with math alphabets from another package, e.g `mathdesign`_:: + + \usepackage{fourier} + \usepackage[OMLmathbf,rmdefault=mdput,sfdefault=cmbr]{isomath} + Greek in Math ============= +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. [...] + + 3. The above rule **applies equally to letter symbols from both the Greek + and the Latin alphabet**, although authors often appear to resist + putting Greek letters into italic. + +[emphasis by the author]. In contrast, the standard LaTeX style treats Greek +symbols as invariant operators with lower case italic and upper case upright. + 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 technical report `Unicode Support for Mathematics` [tr25]_ lists +"lphanumeric 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 "to be used for -mathematical variables where style variations are important semantically". +variants for Latin and Greek letters and digits. It is labelled "to be used +for mathematical variables where style variations are important +semantically". + +.. _table 1: + +.. table:: Styles in the `mathematical alphanumeric symbols`_ + Unicode block + :class: booktab + + ================= ==== ================= ============================ + Style LGD LaTeX macro Package, Comment + [#]_ + ================= ==== ================= ============================ + bold LGD ``\mathbf`` no Greek + + italic LG ``\mathit`` no Greek + \ ``\mathnormal`` small Greek but + old-style roman Digits + 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 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. +*OML* is the only established font encoding providing Latin and Greek +letters in one font. (The text font encoding *LGR* is Greek-only while *T7* +is just a "reserved name" for a standard Greek encoding.) Definition """""""""" @@ -179,24 +245,36 @@ 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. + The OML encoding contains italic Latin and Greek letters for use in + mathematical formulas (typically used for variables) together with some + symbols. -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** letters 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), +* There is only one OML encoded font in the Computer Modern fonts: + `Computer Modern Math Italic` (cmmi). -* but generally, font encodings (T1, OT1) are not specific to the font shape. +* Generally, font encodings (T1, OT1) are not specific to the font shape. * Both, ``\DeclareSymbolFont`` and ``\DeclareMathAlphabet`` require a - {<shape>} argument. Thus it is possible to define OML encoded math + {<shape>} argument. Thus it is possible to set up OML encoded math alphabets in roman {n} as well as italic {it} shape without conflicts. -* A more suitable public name would be `TeX math letters` or `Original/Old +* The name `TeX math italic` can be interpreted as "encoding *of* `Computer + Modern Math Italic`" rather than "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. +A more inclusive definition would be: + + 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. + + + Support """"""" @@ -206,7 +284,7 @@ Supported font families can be found searching for ``oml*.fd`` files and by grepping for "DeclareFont.*OML", "SymbolFont.*OML" and "MathAlphabet.*OML" in ``*.sty`` files. -.. _table 1: +.. _table 2: .. table:: Fonts supporting the OML font encoding :class: booktab @@ -229,9 +307,9 @@ in ``*.sty`` files. llcmm LXfonts (sans serif) x x lmr Latin Modern Roman x x mak Kerkis x - mdbch Math Design Charter x x ? x - mdput Math Design Utopia x x ? x - mdugm Math Design Garamond x x ? x + 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 @@ -260,9 +338,9 @@ Explanations: supporting {m}{n} or {bx}{n} here. The following fonts define ``cmm`` as OML substitution. A better matching -substitution can be set with the rmdefault_ option. +substitution can be set with the rmdefault_ or sfdefault_ options. -.. _table 2: +.. _table 3: .. table:: Non-CM fonts with ``cmm`` as OML substitution :class: booktab @@ -296,7 +374,7 @@ 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. +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. @@ -304,12 +382,14 @@ 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). +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 -Myons, Pions, alpha-particles, photons, and neutrinos without special -packages. (With mathdesign_, this is already possible today.) +the constant pi, Myons, Pions, alpha-particles, photons, and neutrinos +without special packages. (With mathdesign_, this is already possible +today.) + Implementation ************** @@ -320,19 +400,25 @@ Identification \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{isomath} - [2008/10/02 v0.2 typeset math according to International Standard ISO 31] - + [2009/06/19 v0.3 typeset math according to International Standard ISO 31] + +History +------- + .. 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. -===== ========== ======================================================== +\ updated documentation; +\ define \mathsans only if OMLmathsans is true; +\ option reuseMathalphabets -> reuseMathAlphabets. +0.3 2009-06-19 documentation update; +\ fix OMLmathrm and OMLmathsans definitions; +\ switch license to LPPL +=== ============ ======================================================== + - Requirements ============ @@ -341,29 +427,30 @@ 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``). +``\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.) - +the font family below.) :: \RequirePackage{fixmath} -.. caution:: +.. caution:: + + After loading fixmath, placing Greek letters in a math alphabet, e.g. + ``\mathrm{k\Omega}``, can lead to garbage, as 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. - 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. - + outside the math alphabet command. + Some packages provide ``\up*`` or ``\var*`` macros for upright Greek letters, e.g. ``\mathrm{k}\upOmega``. - + kvoptions.sty ------------- @@ -379,8 +466,9 @@ rmdefault --------- Alternative family for roman math fonts. The default is to use the -corresponding text font family (``\rmdefault``) in OMS encoding. -`Table 2`_ lists some fonts where a different setting is advised. +corresponding text font family (``\rmdefault``) in OML encoding. +`Table 3`_ lists some fonts where a different setting is advised. + :: \DeclareStringOption[\rmdefault]{rmdefault} @@ -389,9 +477,9 @@ sfdefault --------- Alternative family for sans-serif math fonts. The default is to use the -corresponding text font family (``\sfdefault``) in OMS encoding. - -Computer Modern Sans Serif (cmss) has no OMS encoded variant. Nor have many +corresponding text font family (``\sfdefault``) in OML encoding. + +Computer Modern Sans Serif (cmss) has no OML encoded variant. Nor have many derivatives (lmss, aess, ...). Actually, there are only a few OML-encoded sans-serif fonts (all slanted/italic): @@ -412,7 +500,7 @@ recommended setting. TODO Allow scaling? - + reuseMathAlphabets ------------------ @@ -424,17 +512,17 @@ As a workaround, this option tells ``isomath`` to re-use the existing 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). +might use a different font). :: \DeclareBoolOption{reuseMathAlphabets} -.. caution:: +.. caution:: Do not use ``reuseMathAlphabets`` together with the ``OMLmathbf`` or - ``OMLmathsf`` options. + ``OMLmathsf`` options. + - OML math alphabets ------------------ @@ -453,22 +541,24 @@ encoding:: \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 +* only the mathdesign_ fonts support roman in OML encoding, while * many font packages define an italic font as OML replacement for a roman font. - + With some packages, these options can result in a "too many math alphabets used in version normal" error. - ---------------------------------------------------- + +Process Options +--------------- Process the options with ``kvoptions`` extensions:: \ProcessKeyvalOptions* + Declarations ============ @@ -476,10 +566,10 @@ Math alphabets -------------- In math, LaTeX uses "absolute" fontnames instead of a selection by family, -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. +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 Greek and Latin letters in different typefaces. Isomath defines a math alphabet for every required font variant and optionally re-defines the standard math alphabets in `OML font encoding`_. @@ -489,8 +579,8 @@ to 16, so we have to be carefull not to exceed this. mathbold """""""" -The *italic bold* math alphabet is named ``\mathbold`` like in -`related packages`_. With the reuseMathAlphabets_ option, ``\mathfb`` +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):: @@ -505,14 +595,14 @@ 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:: +analogy to ``\mathbold``). As this typeface is not required by ISO 31, it +is only defined if the ``OMLmathsans`` option is set:: \ifisomath@OMLmathsans \DeclareMathAlphabet{\mathsans}{OML}{\isomath@sfdefault}{m}{it} \fi -mathboldsans +mathboldsans """""""""""" A *sans serif slanted bold* alphabet is needed for tensor symbols. With the @@ -524,7 +614,7 @@ made an alias:: \def\mathboldsans{\mathsf} \else \DeclareMathAlphabet{\mathboldsans}{OML}{\isomath@sfdefault}{bx}{it} - \fi + \fi Redefine standard alphabets """"""""""""""""""""""""""" @@ -533,16 +623,16 @@ Redefine standard alphabets in `OML font encoding`_ if the corresponding `OML math alphabets`_ option is true:: \ifisomath@OMLmathrm - \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{n}{n} + \SetMathAlphabet{\mathrm}{normal}{OML}{\isomath@rmdefault}{m}{n} \fi \ifisomath@OMLmathbf \SetMathAlphabet{\mathbf}{normal}{OML}{\isomath@rmdefault}{b}{n} \fi \ifisomath@OMLmathsf - \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{n}{n} + \SetMathAlphabet{\mathsf}{normal}{OML}{\isomath@sfdefault}{m}{n} \fi \ifisomath@OMLmathtt - \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{n}{n} + \SetMathAlphabet{\mathtt}{normal}{OML}{\ttdefault}{m}{n} \fi Command aliases @@ -562,6 +652,12 @@ 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). +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. + \\matrixsym """"""""""" @@ -594,15 +690,14 @@ Mathpazo (Palatino) ppl -> zplm :: \DeclareFontShape{OML}{ppl}{m}{it}{<-> ssub * zplm/m/it}{} \DeclareFontShape{OML}{ppl}{bx}{it}{<-> ssub * zplm/b/it}{} -Arev (arev): fav -> zavm :: +Arev (see omlzavm.fd): fav -> zavm :: - \DeclareFontFamily{OML}{fav}{} + \DeclareFontFamily{OML}{fav}{\skewchar \font =127} \DeclareFontShape{OML}{fav}{m}{it}{<->ssub * zavm/m/it}{} \DeclareFontShape{OML}{fav}{bx}{it}{<->ssub * zavm/b/it}{} -LX Fonts (lxfonts): llcmss -> llcmm :: - - % repeat font declarations from lxfonts.sty +LX Fonts (see lxfonts.sty): llcmss -> llcmm :: + \DeclareFontFamily{OML}{llcmm}{\skewchar\font'177} \DeclareFontShape{OML}{llcmm}{m}{it}{<-> lcmmi8}{} \DeclareFontShape{OML}{llcmm}{bx}{it}{<-> lcmmib8}{} @@ -620,15 +715,19 @@ No declarations below this point:: References ********** -.. [ISO-31] International Standard 31 `Quantities and units`, +.. [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 -.. [fonts-for-symbols] `On the use of italic and roman fonts for symbols in - scientific text`, (Revised December 1999): +.. [checklist] `SI Unit rules and style conventions` + Check List for Reviewing Manuscripts: + http://physics.nist.gov/cuu/Units/checklist.html + +.. [fonts-for-symbols] `On the use of italic and roman fonts for symbols + in scientific text`, (Revised December 1999): http://old.iupac.org/standing/idcns/fonts_for_symbols.html .. [SI-brochure] `The International System of Units (SI)`: @@ -653,6 +752,7 @@ References .. Links .. ***** +.. _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/ |