diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-12 22:14:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-12 22:14:06 +0000 |
commit | 60134622cf5eb833e549dd5dfefb08a674b5a78c (patch) | |
tree | 579dcaa6e820e1fba51249eb4c3c654c868c76b0 /Master/texmf-dist/doc/latex/isomath/isomath.txt | |
parent | 524f74405302fcc9daf66401d0da8485241764e9 (diff) |
isomath (12sep12)
git-svn-id: svn://tug.org/texlive/trunk@27654 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/isomath/isomath.txt')
-rw-r--r-- | Master/texmf-dist/doc/latex/isomath/isomath.txt | 722 |
1 files changed, 383 insertions, 339 deletions
diff --git a/Master/texmf-dist/doc/latex/isomath/isomath.txt b/Master/texmf-dist/doc/latex/isomath/isomath.txt index 23100dcacfe..f91e12e6678 100644 --- a/Master/texmf-dist/doc/latex/isomath/isomath.txt +++ b/Master/texmf-dist/doc/latex/isomath/isomath.txt @@ -1,22 +1,26 @@ .. -*- rst-mode -*- -isomath: Math for scientists -**************************** +isomath +******* +Mathematical style for science and technology +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :Author: Günter Milde -:Date: 2011-01-14 -:Copyright: © 2008, 2011 Günter Milde +:Date: 2012-09-10 +:Copyright: © 2008, 2012 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 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. +:Abstract: The `isomath` package provides tools for a mathematical style + that conforms to the International Standard ISO 80000-2 and is + common in science and technology. It changes the default shape of + capital Greek letters to italic, sets up bold italic and + sans-serif bold italic math alphabets with Latin and Greek + characters, and defines macros for markup of vector, matrix and + tensor symbols. -.. contents:: +.. contents:: :depth: 2 .. sectnum:: @@ -24,121 +28,122 @@ Features -------- .. How do you write the stress tensor ``$\sigma$`` in a - `sans-serif bold italic` typeface, as recommended by [typefaces]_? - -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 + *sans-serif bold italic* typeface, as recommended by [typefaces]_? + +In their style guides, e. g. [typefaces]_, [checklist]_, [SI]_, +[fonts_for_symbols]_, [Red-Book]_, [Green-Book]_, many international +scientific organisations recommend layout rules for mathematics in line with +the International Standard [ISO-80000-2]_. + +.. admonition:: International standard layout rules + + * The overall rule is that symbols representing physical quantities + (or variables) are italic, but symbols representing units, or + labels, are roman. + + * Symbols for vectors and matrices are bold italic, symbols for tensors + are sans-serif bold italic. + + * The above rules apply equally to letter symbols from the Greek and the + Latin alphabet. + +.. The recommendations in this standard are intended mainly for use in the + natural sciences and technology, but also apply to other areas where + mathematics is used. + +TeX's default mathematical style deviates from this rules in several points: -* capital Greek letters default to upright shape, +* Capital Greek letters default to upright shape, * small Greek letters are excluded from font changes with the `math - alphabets`_. + alphabet`_ commands, and -* The ``\vec`` command produces an arrow accent. +* 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. +The `isomath` package implements an `“ISO” math style`_, provides `new math +alphabets`_ with *bold italic* and *sans-serif bold italic* type and macros +for `semantic markup`_ of vector, matrix and tensor symbols. It can be +combined with most packages for mathematical typesetting (see +`<isomath-test.tex>`_ and the sections on alternatives_ and conflicts_). -.. _`equal treatment of Latin and Greek`: -ISO math style -~~~~~~~~~~~~~~ +“ISO” math style +~~~~~~~~~~~~~~~~ -The required package fixmath_ changes the default math layout to the -“ISO” `math style`_: +Isomath builds on the package fixmath_ by Walter Schmidt to change the +default mathematics layout to the “ISO” `math style`_: -+ Uppercase Greek letters are typeset italic by default. ++ Capital Greek letters are typeset in italic shape 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. + Be careful with Greek letters in the argument of ``\mathit``, ``\mathrm``, + ``\mathbf``, ``\mathsf``, and ``\mathtt``. By default, these `math + alphabets`_ use text fonts. Fonts in OT1 text font encoding have capital + (but not small) Greek letters at the expected places, T1 encoded text fonts + have no Greek letters at all. - Some packages provide alternative macros or options for upright - Greek letters (cf. `Table 6`_). + See the examples_ section on `how to get upright small Greek letters`_ in + mathematical context. New math alphabets ~~~~~~~~~~~~~~~~~~ -`Isomath` defines three new `math alphabets`_: +`Isomath` defines the new `math alphabets`_: - .. class:: borderless +.. class:: borderless - =============== ====================== ================================= - ``\mathbfit`` boldface italic vector and matrix symbols - ``\mathsfit`` sans-serif italic optional (see OMLmath*_ options) - ``\mathsfbfit`` sans-serif bold italic tensor symbols - =============== ====================== ================================= +=============== ====================== ================================= +``\mathbfit`` boldface italic vector and matrix symbols +``\mathsfit`` sans-serif italic optional (see OMLmath*_ options) +``\mathsfbfit`` sans-serif bold italic tensor symbols +=============== ====================== ================================= + +For compatibility with earlier versions and `related packages`_, the +new math alphabets are also available under the aliases +``\mathbold``, ``\mathsans``, and ``\mathboldsans``. 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. + 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``) contain old-style 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``. Semantic markup ~~~~~~~~~~~~~~~ -The following commands set the argument in an ISO-conforming math alphabet: +The following commands set the argument in an ISO-conforming `math alphabet`_: - .. class:: borderless +.. class:: borderless - ========================== ======================================== - ``\vectorsym, \matrixsym`` bold italic for Greek and Latin letters, - bold upright for numbers +========================== ======================================== +``\vectorsym, \matrixsym`` bold italic for Greek and Latin letters, + bold upright for numbers - ``\tensorsym`` sans-serif bold italic - ========================== ======================================== +``\tensorsym`` sans-serif bold italic +========================== ======================================== Usage ----- -Make sure that LaTeX can find ``isomath.sty`` and load it with -``\usepackage`` (see also Options_ and Examples_). +Make sure that LaTeX can find ``isomath.sty`` and load it with:: + + \usepackage{isomath} + +Optionally redefine the standard vector macro ``\vec``:: + + \renewcommand{\vec}{\vectorsym} + +(see also Options_, Examples_, and isomath-test.tex_). Options ~~~~~~~ @@ -153,7 +158,7 @@ family (the value of ``\rmdefault``). The font must be available in sfdefault ''''''''' -Family for sans-serif math fonts. The default is ``cmbr`` because many +Family for sans-serif math fonts. The default is ``cmbr`` because most sans-serif fonts define the Computer Roman font `cmm` as OML substitution (see `Table 4`_). @@ -161,26 +166,25 @@ There are only few sans serif fonts in `OML font encoding`_: .. class:: borderless -========== =========== =================================================== +========== =========== ===================================================== 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 +``fav`` arev_ `Arev` (`Vera Sans`), large x-height ``hvm`` hvmath_ `Helvetica Math`, commercial, free bitmap version -``llcmss`` lxfonts_ `LX Fonts`, very wide, eccentric, large x-height, - new in 2008 -========== =========== =================================================== +``iwona`` iwona_ `Iwona`, humanistic sans serif, + some shapes very similar to roman +``jkpss`` kpfonts_ `Kepler Sans`, quite light +``llcmss`` lxfonts_ `LX Fonts`, “slide fonts”, very wide, large x-height +========== =========== ===================================================== 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_). +To improve the chances of finding a matching sans serif math font, the +fonts ``fav``, ``iwona``, ``jkpss``, and ``llcmss`` can be scaled with the +``scaled`` option (cf. Examples_). For other fonts, the option is ignored. reuseMathAlphabets @@ -191,34 +195,35 @@ option tells `isomath` to re-use the existing ``\mathbf`` and ``\mathsf`` alphabets for italic bold and sans-serif bold. [#]_ .. [#] To access the upright shapes, the corresponding ``\textbf`` and - ``\textsf`` commands might be used. However, this toggles the - math-mode off and might use a different font, so watch for - side-effects. + ``\textsf`` commands might be used. Watch for side-effects, as these + commands switch to text mode so that the font settings in the embedding + text apply. .. _OMLmath*: 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. + +The ``\mathsfit`` alphabet is not required for ISO conforming mathematical +layout and therefore only defined if the ``OMLmathsfit`` argument is used. + +The predefined `math alphabets`_ ``\mathrm``, ``\mathbf``, and ``\mathtt`` +use OT1 encoded text fonts with ligatures and accents in place of the small +Greek letters. The ``OMLmath*`` options enable the use of small Greek +letters in `math alphabet`_ commands, e. g. ``\mathrm{\pi}``, if the +corresponding font is available in `OML font encoding`_. `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. + If no matching OML encoded font is found, LaTeX's substitute mechanism + 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. @@ -227,13 +232,7 @@ e. g., ``\mathrm{\pi}`` *if an OML encoded font is available*. 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 +* Use scaled arev_ fonts for the sans serif math alphabets (adapt the scaling factor to your needs):: \usepackage[sfdefault=fav,scaled=0.875]{isomath} @@ -254,7 +253,8 @@ Examples \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{} \SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it} -See also the ``isomath-test.tex`` test document. +See also the `isomath-test.tex`_ test document. + How to get upright small Greek letters '''''''''''''''''''''''''''''''''''''' @@ -278,16 +278,16 @@ b) To get upright small Greek letters without affecting other fonts, (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`` - ============= ===================================== + in math mode: + + .. 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 @@ -299,6 +299,15 @@ d) Use an upright text character (requires a matching LGR-encoded \let\mathpi\pi \renewcommand{\pi}{\text{\textrm{\greektext p }}} +e) Use the text character with the `alphabeta` package from the lgrx_ + bundle:: + + \usepackage{amsmath} + \usepackage{alphabeta} + + and in the body :: + + $ u = 2 \text{\pi} r $ Related packages @@ -337,23 +346,26 @@ arev_ Alternatives ~~~~~~~~~~~~ -See `Table 2`_ for other packages that implement the “ISO” `math -style`_ and `Table 6`_ for packages that provide bold italic -math fonts. +The TUGboat article by Claudio Beccari [becc97]_ discusses tricks and +commands for physicists and engineers in order to satisfy the international +regulations and to distinguish similar symbols with different meanings. + +See `Table 2`_ for other packages that implement the “ISO” `math style`_ and +`Table 6`_ for packages that provide bold italic math fonts. `“In-line math versions”`_ can be used as ISO-conforming replacement for ``\vec``: + * ``\bm`` from the `bm`_ package. Combining `bm` and `isomath` may + lead to the `too many math alphabets used in version normal`_ error. + * ``\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. - -``\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 +amsmath_ + provides the command ``\text``, that 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`_). unicode-math_ @@ -361,7 +373,7 @@ unicode-math_ math fonts. It supports the “ISO” `math style`_ and all mathematical characters in the Unicode standard. - unicode-math cannot be used together with `isomath`. It can, however, + `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. @@ -379,10 +391,11 @@ Conflicts Examples for problematic combinations: + The `kpfonts`_, `pxfonts`_, and `txfonts`_ packages define many - additional math alphabets. + additional math alphabets (`kpfonts` works with `isomath`, if + it is loaded with ``\usepackage[nomathscript]{kpfonts}``). + The `bm`_ package normally allocates several symbol fonts for bold - and heavy fonts. Their number can be customized by defining + and heavy fonts. Their number can be customised by defining ``\bmmax`` and ``\hmmax`` before loading the package. fourier_ @@ -397,13 +410,19 @@ fourier_ \usepackage[OMLmathbf,rmdefault=mdput, sfdefault=arev,scaled=0.85]{isomath} +sansmath_ + defines a ``sans`` `math version`_ using **text** fonts in OT1 or T1 font + encoding. As fixmath/isomath expect math fonts in `OML font encoding`_, + Greek letters will not work inside the ``sans`` math version defined by + sansmath. + 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`_. +This section discusses LaTeX `math font selection`_, the `OML font +encoding`_, and the relation of LaTeX and `Unicode mathematical +typesetting`_. Math font selection @@ -412,14 +431,14 @@ 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`_). +provide alternative `math styles`_. .. _math alphabet: Math alphabets '''''''''''''' -Math alphabets are a counterpart to the `mathematical alphanumeric +TeX's *math alphabets* correspond 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 @@ -437,17 +456,17 @@ section 3: The _`predefined math alphabets` are: - .. class:: borderless + .. class:: borderless - ================= =============== - ``\mathnormal`` default [#mathnormal]_ - ``\mathrm`` roman [#roman]_ - ``\mathbf`` bold roman - ``\mathsf`` sans serif - ``\mathit`` text italic - ``\mathtt`` typewriter - ``\mathcal`` calligraphic - ================= =============== + ================= =============== + ``\mathnormal`` default [#mathnormal]_ + ``\mathrm`` roman [#roman]_ + ``\mathbf`` bold roman + ``\mathsf`` sans serif + ``\mathit`` text italic + ``\mathtt`` typewriter + ``\mathcal`` calligraphic + ================= =============== .. [#mathnormal] ``\mathnormal`` is used by default for alphanumeric characters in math mode. It sets the letter shape according to @@ -470,53 +489,61 @@ letter ``a`` in **upright** bold type. 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* specify the mapping from commands for mathematical +symbols and `math alphabets`_ to a set of mathematical fonts [#]_. +They are intended for mathematical content in a special context like a +bold section heading. Selecting a math version resembles +the individual selection of text font attributes. + +Example: + Some alternatives to set the letter ``a`` in a bold upright sans-serif + font: + + .. class:: borderless + + ============================ =================================== + Text Math + ============================ =================================== + ``\textbf{\textsf{a}}`` ``$\bm{\mathsf{a}}$`` + ``\bfseries \textsf{a}`` ``\mathversion{bold} $\mathsf{a}$`` + ``\bfseries \sffamily a`` ``$\mathsfbf{a}$`` + ============================ =================================== -*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: +following defaults for non-specified font attributes: - .. class:: borderless +.. class:: borderless - ======== ========== ======== - .. ``normal`` ``bold`` - *type* serif serif - *weight* medium bold - *shape* upright upright - ======== ========== ======== +========= ========== ======== +attribute ``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 -<http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2007-09/msg00181.html>`__ +Packages can define additional math versions, e. g., the kpfonts_ package +defines a ``sans`` math version (another ``sans`` math version example is +available from a `comp.text.tex post``__) and the wrisym_ package defines a +``mono`` math version. -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). +__ http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2007-09/msg00181.html 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}$ +.. [#] The number of mathematical symbols exceeds the maximal number of + characters in a TeX font file by an order of magnitude: Unicode + defines about 2500 mathematical characters [tr25]_, font files used by + 8-bit TeX engines are limited to 256 characters. The standard math + fonts adhere to the original limit of 128 characters. Grouping math + fonts with common characteristics in math versions simplifies the + setting of font attributes for mathematical expressions. TeX limits + the number of (symbol + alphanumeric) fonts per math version to 16. -.. [#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: @@ -525,9 +552,16 @@ 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`_). +``\mathnormal`` `math alphabet`_). [#]_ +LaTeX defaults to the “TeX” math style (without naming it such). +Alternative math styles are introduced by extension packages +(`Table 2`_). + +.. [#] The ``math-style`` option of unicode-math_ changes also the shape + attribute of other math alphabets (see also section + `the unicode-math package`_). -.. _Table 1: +.. _ Table 1: .. table:: Default letter shapes for common math styles @@ -540,13 +574,10 @@ letter shape in math mode (i. e. the shape attribute of letters in the 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 +.. table:: Packages providing alternative math styles ============ ============= ================================== math style Package Option(s) @@ -572,11 +603,11 @@ Alternative math styles are introduced by extension packages ============ ============= ================================== -Math letter fonts +OML font encoding ~~~~~~~~~~~~~~~~~ -The equal treatment of Latin and Greek letters in the `ISO math -style`_ is simplest achieved with a font that contains all required +The equal treatment of Latin and Greek letters in the `“ISO” math +style`_ is best achieved with a font that contains all required letters in one file. There is only one established LaTeX font encoding that contains Latin and @@ -585,22 +616,22 @@ 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 -''''''''''''''''' +Discussion +'''''''''' 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 + The OML encoding contains italic Latin and Greek letters for use in + mathematical formulae (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. +* No other font encoding is specific to a font shape. * The different font selection and the semantic of font features in - math do not interfere with the font *encoding*: Both, + mathematical formulae 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 @@ -615,7 +646,7 @@ 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 + mathematical formulae (typically used for variables) together with some symbols. It first appeared in the `Computer Modern Math Italic` (cmmi) font. @@ -635,7 +666,7 @@ 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 +`Table 3`_ lists the findings for a selection of TeXLive 2012 + some additionally installed font packages. * If there is an alias (substitution) from the text font to a @@ -645,56 +676,69 @@ additionally 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 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 3: .. table:: 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) ✓ ✓ - ============= =========================== ======= ======== ====== ======= + ============= ================================= ======= ======== ====== ======= + Name Family (package) m/it bx/it m/n bx/n + ============= ================================= ======= ======== ====== ======= + antt Antykwa Torunska (anttor_) ✓ ✓ + cmr Computer Modern ✓ ✓ + ccr Concrete Roman (concmath_) ✓ ✓ + cmbr CM Bright (cmbright_) ✓ ✓ + hlh Lucida ✓ ✓ + hfor CM with old-style digits ✓ ✓ + iwona Iwona (sans serif) (iwona_) ✓ ✓ + iwonal Iwona light ✓ ✓ + iwonac Iwona condensed ✓ ✓ + iwonalc Iwona light condensed ✓ ✓ + jkp Kepler Serif (kpfonts_) ✓ ✓ + jkpw Kepler Serif wide ✓ ✓ + jkpvos Kepler Serif oldstyle ✓ ✓ + jkpvosw Kepler Serif oldstyle wide ✓ ✓ + jkpl Kepler Serif light ✓ ✓ + jkplw Kepler Serif light wide ✓ ✓ + jkplvos Kepler Serif light oldstyle ✓ ✓ + jkplvosw Kepler Serif light os wide ✓ ✓ + jkpss Kepler Sans (kpfonts_) ✓ ✓ + jkpssvos Kepler Sans oldstyle ✓ ✓ + jtm expanded Times (jamtimes_) ✓ ✓ + llcmm LX Fonts (sans serif) (lxfonts_) ✓ ✓ + lmr Latin Modern Roman (lmodern) ✓ ✓ + mak Kerkis (kerkis_) ✓ + kurier Kurier (sans serif) (kurier_) ✓ ✓ + kurierc Kurier condensed ✓ ✓ + kurierl Kurier light ✓ ✓ + kurierlc Kurier light condensed ✓ ✓ + mdbch Math Design Charter (mathdesign_) ✓ ✓ ✓ ✓ + mdput Math Design Utopia ✓ ✓ ✓ ✓ + mdugm Math Design Garamond ✓ ✓ ✓ ✓ + neohellenic Neohellenic (gfsneohellenic_) ✓ + ntxmi Times (newtx_) ✓ ✓ + nxlmi Libertine (newtx_) ✓ ✓ + plcm CM (PLaTeX) ✓ + ptmom Times (Omega or MB-Times) ✓ ✓ + ptmomu Times (Omega or MB-Times) ✓ ✓ + ptmcm Times (mathptmx_) ✓ + pxr Palatino (pxfonts_) ✓ ✓ + qpl Palatino/Pagella (qpxmath) ✓ ✓ + qtm Times/Termes (qtxmath) ✓ ✓ + txr Times (txfonts_) ✓ ✓ + udidot Didot (gfsdidot_) ✓ + ywclm (greektex_) ✓ ✓ + zavm Arev (Vera Sans-Serif) ✓ ✓ + zplm Palatino (mathpazo_) ✓ ✓ + zpple Palatino ✓ ✓ + ztmcm Times (mathptmx_) ✓ + 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. - .. _Table 4: .. table:: Non-CM fonts with ``cmm`` as OML substitution @@ -716,7 +760,7 @@ rmdefault_ or sfdefault_ options. ubk Bookman (bookman) ucr Courier (courier) ucrs Courier - unc New Courier (nctrsbk) + unc New Century Schoolbook (psnfss) uni Universal (universa) uhv Helvetica (helvetic) upl Palatino (palatino) @@ -728,35 +772,61 @@ rmdefault_ or sfdefault_ options. Unicode mathematical typesetting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This section compares `math font selection`_ in LaTeX and Unicode. It +suggests a set of 14 math alphabet commands 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). + The technical report [tr25]_ presents an in-depth discussion of the -mathematics character repertoire of the Unicode Standard as well as +mathematical 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). - .. _mathematical alphanumeric symbols: -Unicode math alphabets -'''''''''''''''''''''' +Unicode mathematical 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 +Unicode assigns 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 +The plain (upright) 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`_. +LaTeX support for the mathematical alphanumeric symbols. + +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<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. .. _table 5: @@ -786,33 +856,12 @@ provided by `the unicode-math package`_. .. [#up] plain standard characters outside the `mathematical alphanumeric symbols` Unicode block. -Naming scheme +LaTeX support ````````````` -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<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. +Most commonly used math alphabets are supported either by the TeX kernel +or additional packages. Full support is only provided by `the unicode-math +package`_. .. _Table 6: @@ -823,7 +872,7 @@ Examples:: style math alphabet package, comment ============ ========================= =========================== plain [#up]_ ``\mathrm`` predefined [#no-g]_ - .. ``\mathup`` unicode-math_ + .. ``\mathup`` unicode-math_, kpfonts_ bf ``\mathbf`` predefined [#no-g]_ it ``\mathit`` predefined [#no-g]_ bf it ``\mathbfit`` isomath [#digits]_ @@ -840,7 +889,7 @@ Examples:: bf frak ``\mathbffrak`` unicode-math_ bb ``\mathbb`` amssymb_, bbold_, mathbbol_, mbboard_, - mathpazo_ + mathpazo_, sbbm_ .. ``\mathbbm`` bbm_ .. ``\mathds`` dsfont (doublestoke_) sf ``\mathsf`` predefined [#no-g]_ @@ -852,10 +901,12 @@ Examples:: tt ``\mathtt`` predefined [#no-g]_ ============ ========================= =========================== -.. [#no-g] no small Greek, full Greek with `OMLmath*`_ options. +.. [#no-g] no small Greek, full Greek with `OMLmath*`_ options and + OML-encoded fonts .. [#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_ +.. [#script] formal script with calrsfs_, eucal_, fourier_, + small Latin letters only with urwchancal_ The unicode-math package @@ -865,18 +916,19 @@ 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 +commands to access the complete mathematical 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). +* `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`_: + + .. class:: borderless =============== =============== LaTeX unicode-math @@ -894,46 +946,21 @@ LaTeX `math font selection`_ methods with unicode-math: ``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. - + so that, e. g., the Unicode character MATHEMATICAL SANS-SERIF BOLD + ITALIC CAPITAL A is selected by the non-mnemonic ``\mathbfsfit{A}``. - 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:: +* `Math versions`_ can be set up using the syntax + ``\setmathfont[version=<version name>,<font features>]{<font name>}`` - \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``. +* Several `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 +It is hoped, that in the future more font 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. @@ -942,9 +969,6 @@ 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_ @@ -991,6 +1015,10 @@ References `Symbols, Units, Nomenclature and Fundamental Constants in Physics`: http://metrology.wordpress.com/measurement-process-index/iupap-red-book/index-iupap-red-book/. +.. [becc97] Claudio Beccari, `Typesetting mathematics for science and + technology according to ISO 31 XI`, TUGboat, Volume 18, 1997, No. 1: + http://www.tug.org/TUGboat/tb18-1/tb54becc.pdf. + .. [encguide] Frank Mittelbach, Robin Fairbairns, Werner Lemberg, LaTeX3 Project Team, `LaTeX font encodings`: http://mirror.ctan.org/macros/latex/doc/encguide.pdf. @@ -1026,6 +1054,7 @@ References .. _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 +.. _anttor: http://mirror.ctan.org/help/Catalogue/entries/anttor.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 @@ -1033,7 +1062,9 @@ References .. _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 +.. _concmath: http://mirror.ctan.org/help/Catalogue/entries/concmath.html .. _doublestoke: http://mirror.ctan.org/help/Catalogue/entries/doublestoke.html +.. _efont: http://mirror.ctan.org/help/Catalogue/entries/efont.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 @@ -1042,13 +1073,20 @@ References .. _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 +.. _gfsdidot: http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html +.. _gfsneohellenic: http://mirror.ctan.org/help/Catalogue/entries/gfsneohellenic.html +.. _greektex: http://mirror.ctan.org/help/Catalogue/entries/greektex.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 +.. _jamtimes: http://mirror.ctan.org/help/Catalogue/entries/jamtimes.html +.. _kerkis: http://mirror.ctan.org/help/Catalogue/entries/kerkis.html +.. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html .. _kpfonts: http://mirror.ctan.org/help/Catalogue/entries/kpfonts.html +.. _kurier: http://mirror.ctan.org/help/Catalogue/entries/kurier.html .. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html -.. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html +.. _lgrx: http://mirror.ctan.org/help/Catalogue/entries/lgrx.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 @@ -1056,14 +1094,20 @@ References .. _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 +.. _mathptmv: http://mirror.ctan.org/help/Catalogue/entries/mathptmv.html .. _mathrsfs: http://mirror.ctan.org/help/Catalogue/entries/mathrsfs.html +.. _newtx: http://mirror.ctan.org/help/Catalogue/entries/newtx.html .. _New Euler: https://github.com/khaledhosny/euler-otf .. _pxfonts: http://mirror.ctan.org/help/Catalogue/entries/pxfonts.html +.. _sansmath: http://mirror.ctan.org/help/Catalogue/entries/sansmath.html +.. _sbbm: http://mirror.ctan.org/help/Catalogue/entries/sbbm.html .. _sfmath: http://dtrx.de/od/tex/sfmath.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 +.. _urwchancal: http://mirror.ctan.org/help/Catalogue/entries/urwchancal.html .. _wrisym: http://phong.informatik.uni-leipzig.de/~kuska/wri_texmf_4.2.zip .. _XITS: http://mirror.ctan.org/help/Catalogue/entries/xits.html +.. _zefonts: http://mirror.ctan.org/help/Catalogue/entries/zefonts.html |