Debian Codegraph @

texmf-dist/doc/latex/isomath/isomath.txt

raw
1 .. -*- rst-mode -*-
2
3 isomath
4 *******
5 Mathematical style for science and technology
6 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7
8 :Author: Günter Milde
9 :Date: 2012-09-10
10 :Copyright: © 2008, 2012 Günter Milde
11 :Licence: This work may be distributed and/or modified under the
12 conditions of the `LaTeX Project Public License`_, either
13 version 1.3 of this license or (at your option) any later version.
14
15 :Abstract: The `isomath` package provides tools for a mathematical style
16 that conforms to the International Standard ISO 80000-2 and is
17 common in science and technology. It changes the default shape of
18 capital Greek letters to italic, sets up bold italic and
19 sans-serif bold italic math alphabets with Latin and Greek
20 characters, and defines macros for markup of vector, matrix and
21 tensor symbols.
22
23 .. contents:: :depth: 2
24 .. sectnum::
25
26
27 Features
28 --------
29
30 .. How do you write the stress tensor ``$\sigma$`` in a
31 *sans-serif bold italic* typeface, as recommended by [typefaces]_?
32
33 In their style guides, e. g. [typefaces]_, [checklist]_, [SI]_,
34 [fonts_for_symbols]_, [Red-Book]_, [Green-Book]_, many international
35 scientific organisations recommend layout rules for mathematics in line with
36 the International Standard [ISO-80000-2]_.
37
38 .. admonition:: International standard layout rules
39
40 * The overall rule is that symbols representing physical quantities
41 (or variables) are italic, but symbols representing units, or
42 labels, are roman.
43
44 * Symbols for vectors and matrices are bold italic, symbols for tensors
45 are sans-serif bold italic.
46
47 * The above rules apply equally to letter symbols from the Greek and the
48 Latin alphabet.
49
50 .. The recommendations in this standard are intended mainly for use in the
51 natural sciences and technology, but also apply to other areas where
52 mathematics is used.
53
54 TeX's default mathematical style deviates from this rules in several
55 points:
56
57 * Capital Greek letters default to upright shape,
58
59 * small Greek letters are excluded from font changes with the `math
60 alphabet`_ commands, and
61
62 * the ``\vec`` command produces an arrow accent.
63
64
65 The `isomath` package implements an `“ISO” math style`_, provides `new math
66 alphabets`_ with *bold italic* and *sans-serif bold italic* type and macros
67 for `semantic markup`_ of vector, matrix and tensor symbols. It can be
68 combined with most packages for mathematical typesetting (see
69 `<isomath-test.tex>`_ and the sections on alternatives_ and conflicts_).
70
71
72 “ISO” math style
73 ~~~~~~~~~~~~~~~~
74
75 Isomath builds on the package fixmath_ by Walter Schmidt to change the
76 default mathematics layout to the “ISO” `math style`_:
77
78 + Capital Greek letters are typeset in italic shape by default.
79
80 + Both, Greek and Latin letters change shape if a different
81 `math alphabet`_ is used.
82
83 .. Caution::
84
85 Be careful with Greek letters in the argument of ``\mathit``, ``\mathrm``,
86 ``\mathbf``, ``\mathsf``, and ``\mathtt``. By default, these `math
87 alphabets`_ use text fonts. Fonts in OT1 text font encoding have capital
88 (but not small) Greek letters at the expected places, T1 encoded text fonts
89 have no Greek letters at all.
90
91 See the examples_ section on `how to get upright small Greek letters`_ in
92 mathematical context.
93
94
95 New math alphabets
96 ~~~~~~~~~~~~~~~~~~
97 `Isomath` defines the new `math alphabets`_:
98
99 .. class:: borderless
100
101 =============== ====================== =================================
102 ``\mathbfit`` boldface italic vector and matrix symbols
103 ``\mathsfit`` sans-serif italic optional (see OMLmath*_ options)
104 ``\mathsfbfit`` sans-serif bold italic tensor symbols
105 =============== ====================== =================================
106
107 For compatibility with earlier versions and `related packages`_, the
108 new math alphabets are also available under the aliases
109 ``\mathbold``, ``\mathsans``, and ``\mathboldsans``.
110
111 The rmdefault_ and sfdefault_ options_ set the font family used for
112 these alphabets.
113
114 .. Caution::
115
116 Using the new math alphabets for numbers can result in upright old-style
117 numbers instead of italic ones, because some italic math fonts (e. g.,
118 ``cmr``, ``cmbr``) contain old-style in place of italic digits.
119
120
121 Semantic markup
122 ~~~~~~~~~~~~~~~
123 The following commands set the argument in an ISO-conforming `math alphabet`_:
124
125 .. class:: borderless
126
127 ========================== ========================================
128 ``\vectorsym, \matrixsym`` bold italic for Greek and Latin letters,
129 bold upright for numbers
130
131 ``\tensorsym`` sans-serif bold italic
132 ========================== ========================================
133
134
135 Usage
136 -----
137
138 Make sure that LaTeX can find ``isomath.sty`` and load it with::
139
140 \usepackage{isomath}
141
142 Optionally redefine the standard vector macro ``\vec``::
143
144 \renewcommand{\vec}{\vectorsym}
145
146 (see also Options_, Examples_, and isomath-test.tex_).
147
148 Options
149 ~~~~~~~
150
151 rmdefault
152 '''''''''
153 Family for serif math fonts (``\mathrm``, ``\mathbf``, ``\mathit``,
154 ``\mathbfit``). The default is to use the corresponding text font
155 family (the value of ``\rmdefault``). The font must be available in
156 `OML font encoding`_ (cf. `Table 3`_).
157
158
159 sfdefault
160 '''''''''
161 Family for sans-serif math fonts. The default is ``cmbr`` because most
162 sans-serif fonts define the Computer Roman font `cmm` as OML substitution
163 (see `Table 4`_).
164
165 There are only few sans serif fonts in `OML font encoding`_:
166
167 .. class:: borderless
168
169 ========== =========== =====================================================
170 Name Package Comment
171 ========== =========== =====================================================
172 ``cmbr`` cmbright_ `Computer Modern Bright`, bitmap, slightly lighter
173 than cmss (Type 1 fonts with hfbright_)
174 ``fav`` arev_ `Arev` (`Vera Sans`), large x-height
175 ``hvm`` hvmath_ `Helvetica Math`, commercial, free bitmap version
176 ``iwona`` iwona_ `Iwona`, humanistic sans serif,
177 some shapes very similar to roman
178 ``jkpss`` kpfonts_ `Kepler Sans`, quite light
179 ``llcmss`` lxfonts_ `LX Fonts`, “slide fonts”, very wide, large x-height
180 ========== =========== =====================================================
181
182
183 scaled
184 ''''''
185 To improve the chances of finding a matching sans serif math font, the
186 fonts ``fav``, ``iwona``, ``jkpss``, and ``llcmss`` can be scaled with the
187 ``scaled`` option (cf. Examples_). For other fonts, the option is ignored.
188
189
190 reuseMathAlphabets
191 ''''''''''''''''''
192 The definition of new math alphabets can lead to a “`too many math
193 alphabets used in version normal`_” error. As a workaround, this
194 option tells `isomath` to re-use the existing ``\mathbf`` and
195 ``\mathsf`` alphabets for italic bold and sans-serif bold. [#]_
196
197 .. [#] To access the upright shapes, the corresponding ``\textbf`` and
198 ``\textsf`` commands might be used. Watch for side-effects, as these
199 commands switch to text mode so that the font settings in the embedding
200 text apply.
201
202 .. _OMLmath*:
203
204 OMLmathrm, OMLmathbf, OMLmathsf, OMLmathsfit, OMLmathtt
205 '''''''''''''''''''''''''''''''''''''''''''''''''''''''
206
207 The ``OMLmath*`` options bind the corresponding ``\math*`` command to an
208 OML-encoded font.
209
210 The ``\mathsfit`` alphabet is not required for ISO conforming mathematical
211 layout and therefore only defined if the ``OMLmathsfit`` argument is used.
212
213 The predefined `math alphabets`_ ``\mathrm``, ``\mathbf``, and ``\mathtt``
214 use OT1 encoded text fonts with ligatures and accents in place of the small
215 Greek letters. The ``OMLmath*`` options enable the use of small Greek
216 letters in `math alphabet`_ commands, e. g. ``\mathrm{\pi}``, if the
217 corresponding font is available in `OML font encoding`_. `Table 3`_ lists
218 font families supporting the OML encoding.
219
220 .. caution::
221
222 If no matching OML encoded font is found, LaTeX's substitute mechanism
223 selects a font with different font attributes (for all letters, not only
224 Greek). Currently, only the mathdesign_ package provides upright fonts in
225 OML encoding. Many font packages define an *italic* font as OML substitute
226 for roman fonts.
227
228 With some packages, these options can result in a “`too many math
229 alphabets used in version normal`_” error.
230
231
232 Examples
233 ~~~~~~~~
234
235 * Use scaled arev_ fonts for the sans serif math alphabets
236 (adapt the scaling factor to your needs)::
237
238 \usepackage[sfdefault=fav,scaled=0.875]{isomath}
239
240 * Define the ``\mathsfit`` sans-serif italic math alphabet::
241
242 \usepackage[OMLmathsfit]{isomath}
243
244
245 * The ``\mathbfit`` and ``\mathsfbfit`` alphabets do not have a different
246 weight in the ``bold`` `math version`_ because the number of LaTeX math
247 fonts providing `extrabold` or `ultrabold` series is negligible.
248
249 As a workaround, use the heavier arev_ font, scaled to 0,875, in the
250 bold version of ``\mathsfbfit``::
251
252 \usepackage{isomath}
253 \DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{}
254 \SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it}
255
256 See also the `isomath-test.tex`_ test document.
257
258
259 How to get upright small Greek letters
260 ''''''''''''''''''''''''''''''''''''''
261
262 Of the following methods, only the first requires `isomath`:
263
264 a) Use `isomath` and the mathdesign_ package::
265
266 \usepackage[utopia]{mathdesign}
267 \usepackage[OMLmathrm,OMLmathbf]{isomath}
268
269 Now, e. g., ``\mathrm{\pi}`` and ``\mathbf{\pi}`` work as
270 expected.
271
272 b) To get upright small Greek letters without affecting other fonts,
273 set the math alphabet manually to one of the three mathdesign_
274 fonts, e. g.::
275
276 \SetMathAlphabet{\mathbf}{normal}{OML}{mdput}{b}{n}
277
278 (check if the letter shapes match with the rest of the document).
279
280 c) Use a package that provides macros for upright Greek letters
281 in math mode:
282
283 .. class:: borderless
284
285 ============= =====================================
286 fourier_ ``\otheralpha ... \otherOmega``
287 kpfonts_ ``\alphaup ... \Omegaup``
288 mathdesign_ ``\alphaup ... \Omegaup``
289 upgreek_ ``\upalpha ... \upOmega``
290 ============= =====================================
291
292 d) Use an upright text character (requires a matching LGR-encoded
293 Greek text font). The following lines redefine ``\pi`` to set
294 the mathematical constant pi upright::
295
296 \usepackage[LGR,T1]{fontenc}
297 \usepackage[greek,british]{babel}
298 \usepackage{amsmath}
299 \let\mathpi\pi
300 \renewcommand{\pi}{\text{\textrm{\greektext p }}}
301
302 e) Use the text character with the `alphabeta` package from the lgrx_
303 bundle::
304
305 \usepackage{amsmath}
306 \usepackage{alphabeta}
307
308 and in the body ::
309
310 $ u = 2 \text{\pi} r $
311
312
313 Related packages
314 ----------------
315
316 Requirements
317 ~~~~~~~~~~~~
318
319 fixmath_
320 by Walter Schmidt defines Greek letters as alphabetic symbols.
321
322 kvoptions_
323 by Heiko Oberdiek facilitates the setup of package options
324 and provides a key=value interface (based on keyval_).
325
326
327 Recommendations
328 ~~~~~~~~~~~~~~~
329
330 cmbright_
331 by Walter Schmidt provides sans serif and sans-serif bold fonts
332 for the ``\mathsfit`` and ``\mathsfbfit`` alphabets that match
333 with Computer Modern and derivatives. Free Type 1 versions of the
334 fonts are provided by hfbright_.
335
336 arev_
337 by Stephen Hartke provides the not-so-light `Arev` sans serif font
338 with letters that are clearly distinguishable from the roman or
339 italic counterparts (important if used to distinguish vectors and
340 tensors).
341
342 `Arev` has a large x-height. For many fonts, either small or capital
343 letters will not match in size.
344
345
346 Alternatives
347 ~~~~~~~~~~~~
348
349 The TUGboat article by Claudio Beccari [becc97]_ discusses tricks and
350 commands for physicists and engineers in order to satisfy the international
351 regulations and to distinguish similar symbols with different meanings.
352
353 See `Table 2`_ for other packages that implement the “ISO” `math style`_ and
354 `Table 6`_ for packages that provide bold italic math fonts.
355
356 `“In-line math versions”`_
357 can be used as ISO-conforming replacement for ``\vec``:
358
359 * ``\bm`` from the `bm`_ package. Combining `bm` and `isomath` may
360 lead to the `too many math alphabets used in version normal`_ error.
361
362 * ``\boldsymbol`` from `amsbsy`_ (part of `amsmath`_, the
363 near-indispensable adjunct to serious mathematical typesetting in
364 LaTeX),
365
366 amsmath_
367 provides the command ``\text``, that can be used to get, e. g., upright or
368 sans-serif bold italic Greek symbols from a text font into a formula (see
369 `How to get upright small Greek letters`_).
370
371 unicode-math_
372 for XeTeX and LuaTeX allows mathematical typesetting using OpenType
373 math fonts. It supports the “ISO” `math style`_ and all mathematical
374 characters in the Unicode standard.
375
376 `unicode-math` cannot be used together with `isomath`. It can, however,
377 replace all of isomath's functionality. See the discussion of `the
378 unicode-math package`_ below.
379
380
381 Conflicts
382 ~~~~~~~~~
383
384 “_`too many math alphabets used in version normal`”
385 This error occurs if the combination of packages tries to load more
386 than 16 fonts into the ``normal`` `math version`_.
387
388 `Isomath` can reduce the number of math alphabet definitions with the
389 reuseMathAlphabets_ option (see there for side-effects).
390
391 Examples for problematic combinations:
392
393 + The `kpfonts`_, `pxfonts`_, and `txfonts`_ packages define many
394 additional math alphabets (`kpfonts` works with `isomath`, if
395 it is loaded with ``\usepackage[nomathscript]{kpfonts}``).
396
397 + The `bm`_ package normally allocates several symbol fonts for bold
398 and heavy fonts. Their number can be customised by defining
399 ``\bmmax`` and ``\hmmax`` before loading the package.
400
401 fourier_
402 provides upright and italic Greek letters, but uses non-standard
403 math font encodings. It cannot be used with `isomath`.
404
405 However, it is possible to use the non-alphanumeric symbols from
406 `fourier`_ together with math alphabets from another package, e.g
407 `mathdesign`_::
408
409 \usepackage{fourier}
410 \usepackage[OMLmathbf,rmdefault=mdput,
411 sfdefault=arev,scaled=0.85]{isomath}
412
413 sansmath_
414 defines a ``sans`` `math version`_ using **text** fonts in OT1 or T1 font
415 encoding. As fixmath/isomath expect math fonts in `OML font encoding`_,
416 Greek letters will not work inside the ``sans`` math version defined by
417 sansmath.
418
419
420 Background
421 ----------
422
423 This section discusses LaTeX `math font selection`_, the `OML font
424 encoding`_, and the relation of LaTeX and `Unicode mathematical
425 typesetting`_.
426
427
428 Math font selection
429 ~~~~~~~~~~~~~~~~~~~
430
431 There are three complementary methods to set font attributes in LaTeX
432 math mode: `LaTeX 2e font selection` [fntguide]_ describes `math
433 alphabets`_ and `math versions`_, several extension packages
434 provide alternative `math styles`_.
435
436 .. _math alphabet:
437
438 Math alphabets
439 ''''''''''''''
440
441 TeX's *math alphabets* correspond to the `mathematical alphanumeric
442 symbols`_ block in Unicode. Both are “to be used for mathematical
443 variables where style variations are important semantically”.
444 The font guide [fntguide]_ defines in
445 section 3:
446
447 Some math fonts are selected explicitly by one-argument commands
448 such as ``\mathsf{max}`` or ``\mathbf{vec}``; such fonts are called
449 *math alphabets*.
450
451 Math fonts [...] have the same five attributes as text fonts:
452 encoding, family, series, shape and size. However, there are no
453 commands that allow the attributes to be individually changed.
454 Instead, the conversion from math fonts to these five attributes is
455 controlled by the `math version`_.
456
457 The _`predefined math alphabets` are:
458
459 .. class:: borderless
460
461 ================= ===============
462 ``\mathnormal`` default [#mathnormal]_
463 ``\mathrm`` roman [#roman]_
464 ``\mathbf`` bold roman
465 ``\mathsf`` sans serif
466 ``\mathit`` text italic
467 ``\mathtt`` typewriter
468 ``\mathcal`` calligraphic
469 ================= ===============
470
471 .. [#mathnormal] ``\mathnormal`` is used by default for alphanumeric
472 characters in math mode. It sets the letter shape according to
473 character class and `math style`_. (`Table 1`_ shows the default
474 letter shapes for common math styles).
475
476 .. [#roman] The specifier “roman” is ambiguous: roman shape
477 stands for *upright*, while roman type stands for *serif* (as
478 opposed to sans serif).
479
480 Many packages define additional math alphabets (cf. `Table 6`_).
481
482 In contrast to the similar named text commands, math alphabets are
483 *not* orthogonal, e. g., the code ``$\mathit{\mathbf{a}}$`` sets the
484 letter ``a`` in **upright** bold type.
485
486
487 .. _math version:
488
489 Math versions
490 '''''''''''''
491
492 *Math versions* specify the mapping from commands for mathematical
493 symbols and `math alphabets`_ to a set of mathematical fonts [#]_.
494 They are intended for mathematical content in a special context like a
495 bold section heading. Selecting a math version resembles
496 the individual selection of text font attributes.
497
498 Example:
499 Some alternatives to set the letter ``a`` in a bold upright sans-serif
500 font:
501
502 .. class:: borderless
503
504 ============================ ===================================
505 Text Math
506 ============================ ===================================
507 ``\textbf{\textsf{a}}`` ``$\bm{\mathsf{a}}$``
508 ``\bfseries \textsf{a}`` ``\mathversion{bold} $\mathsf{a}$``
509 ``\bfseries \sffamily a`` ``$\mathsfbf{a}$``
510 ============================ ===================================
511
512
513 The predefined math versions are ``normal`` and ``bold`` with the
514 following defaults for non-specified font attributes:
515
516 .. class:: borderless
517
518 ========= ========== ========
519 attribute ``normal`` ``bold``
520 ========= ========== ========
521 *type* serif serif
522 *weight* medium bold
523 *shape* upright upright
524 ========= ========== ========
525
526 Packages can define additional math versions, e. g., the kpfonts_ package
527 defines a ``sans`` math version (another ``sans`` math version example is
528 available from a `comp.text.tex post``__) and the wrisym_ package defines a
529 ``mono`` math version.
530
531 __ http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2007-09/msg00181.html
532
533 Math versions can only be changed outside of math mode. The commands
534 ``\boldsymbol`` (amsmath_) and ``\bm`` (bm_) behave like _`“in-line
535 math versions”`: they typeset their argument using the fonts of the
536 ``bold`` math version but can be used inside math mode.
537
538 .. [#] The number of mathematical symbols exceeds the maximal number of
539 characters in a TeX font file by an order of magnitude: Unicode
540 defines about 2500 mathematical characters [tr25]_, font files used by
541 8-bit TeX engines are limited to 256 characters. The standard math
542 fonts adhere to the original limit of 128 characters. Grouping math
543 fonts with common characteristics in math versions simplifies the
544 setting of font attributes for mathematical expressions. TeX limits
545 the number of (symbol + alphanumeric) fonts per math version to 16.
546
547
548 .. _math style:
549
550 Math styles
551 '''''''''''
552
553 A *math style* is a document-level feature that determines the default
554 letter shape in math mode (i. e. the shape attribute of letters in the
555 ``\mathnormal`` `math alphabet`_). [#]_
556 LaTeX defaults to the “TeX” math style (without naming it such).
557 Alternative math styles are introduced by extension packages
558 (`Table 2`_).
559
560 .. [#] The ``math-style`` option of unicode-math_ changes also the shape
561 attribute of other math alphabets (see also section
562 `the unicode-math package`_).
563
564 .. _ Table 1:
565
566 .. table:: Default letter shapes for common math styles
567
568 ============ ======= ======= ======= =======
569 math style latin Latin greek Greek
570 ============ ======= ======= ======= =======
571 TeX it it it up
572 ISO it it it it
573 French it up up up
574 upright up up up up
575 ============ ======= ======= ======= =======
576
577
578 .. _Table 2:
579
580 .. table:: Packages providing alternative math styles
581
582 ============ ============= ==================================
583 math style Package Option(s)
584 ============ ============= ==================================
585 ISO fixmath_
586 .. isomath
587 .. kpfonts_ slantedGreeks
588 .. lucimatx_ math-style=iso
589 .. mathdesign_ greekuppercase=italicized
590 .. mathpazo_ slantedGreek
591 .. mathptmx_ slantedGreek
592 .. unicode-math_ math-style=ISO
593
594 French fourier_ upright
595 .. kpfonts_ frenchstyle (or upright)
596 .. lucimatx_ math-style=french
597 .. mathdesign_ uppercase=upright, greeklowercase=upright
598 .. unicode-math_ math-style=french
599
600 upright eulervm_
601 .. lucimatx_ math-style=upright
602 .. unicode-math_ math-style=upright
603 ============ ============= ==================================
604
605
606 OML font encoding
607 ~~~~~~~~~~~~~~~~~
608
609 The equal treatment of Latin and Greek letters in the `“ISO” math
610 style`_ is best achieved with a font that contains all required
611 letters in one file.
612
613 There is only one established LaTeX font encoding that contains Latin and
614 Greek letters, the `OML font encoding`_. The standard Greek font
615 encoding `T7` is just a “reserved name” and the de-facto standard
616 Greek text font encoding `LGR` has no Latin letters. Unfortunately,
617 `OML support`_ is limited to a few (mostly italic) fonts.
618
619 Discussion
620 ''''''''''
621
622 The `LaTeX font encodings` guide [encguide]_ names the OML encoding
623 `TeX math italic` and defines:
624
625 The OML encoding contains italic Latin and Greek letters for use in
626 mathematical formulae (typically used for variables) together with some
627 symbols.
628
629 The reference to *italic* shape is odd:
630
631 * No other font encoding is specific to a font shape.
632
633 * The different font selection and the semantic of font features in
634 mathematical formulae do not interfere with the font *encoding*: Both,
635 ``\DeclareSymbolFont`` and ``\DeclareMathAlphabet`` require a
636 shape argument. Thus it is possible to set up OML encoded math
637 alphabets in roman {n} as well as italic {it} shape without
638 conflicts.
639
640 This seems to be more a remnant of pre-NFSS times than a necessary
641 restriction – there is only one OML encoded font in Knuth's Computer
642 Modern fonts: `Computer Modern Math Italic` (cmmi).
643
644 Proposals:
645
646 * Drop the *italic* from the definition. Optionally add an explanation:
647
648 The OML encoding contains Latin and Greek letters for use in
649 mathematical formulae (typically used for variables) together with
650 some symbols. It first appeared in the `Computer Modern Math
651 Italic` (cmmi) font.
652
653 * The name `TeX math italic` can be interpreted as “the encoding
654 **of** `Computer Modern Math Italic`” rather than “an encoding
655 **for** math italic” fonts.
656
657 A less confusing name would be `TeX math letters` or `Original/Old
658 Math Letters`. The latter would also explain the acronym OML.
659
660
661 OML Support
662 '''''''''''
663
664 Unfortunately, support for the OML encoding is missing for many font
665 families even if the text font defines Greek letters.
666 Supported font families can be found searching for ``oml*.fd`` files
667 and grepping for ``DeclareFont.*OML`` in ``*.sty`` files.
668
669 `Table 3`_ lists the findings for a selection of TeXLive 2012 + some
670 additionally installed font packages.
671
672 * If there is an alias (substitution) from the text font to a
673 math-variant, only the text font is listed.
674
675 * Many text fonts define substitutions also for upright shape,
676 however mapping to an italic variant of the OML encoded font. These
677 are not listed as supporting ``m/n`` or ``bx/n`` here.
678
679 `Table 4`_ lists some fonts that define ``cmm`` as OML substitution.
680 With `isomath`, a better matching substitution can be set using the
681 rmdefault_ or sfdefault_ options.
682
683 .. _Table 3:
684
685 .. table:: Font families supporting the OML encoding
686
687 ============= ================================= ======= ======== ====== =======
688 Name Family (package) m/it bx/it m/n bx/n
689 ============= ================================= ======= ======== ====== =======
690 antt Antykwa Torunska (anttor_) ✓ ✓
691 cmr Computer Modern ✓ ✓
692 ccr Concrete Roman (concmath_) ✓ ✓
693 cmbr CM Bright (cmbright_) ✓ ✓
694 hlh Lucida ✓ ✓
695 hfor CM with old-style digits ✓ ✓
696 iwona Iwona (sans serif) (iwona_) ✓ ✓
697 iwonal Iwona light ✓ ✓
698 iwonac Iwona condensed ✓ ✓
699 iwonalc Iwona light condensed ✓ ✓
700 jkp Kepler Serif (kpfonts_) ✓ ✓
701 jkpw Kepler Serif wide ✓ ✓
702 jkpvos Kepler Serif oldstyle ✓ ✓
703 jkpvosw Kepler Serif oldstyle wide ✓ ✓
704 jkpl Kepler Serif light ✓ ✓
705 jkplw Kepler Serif light wide ✓ ✓
706 jkplvos Kepler Serif light oldstyle ✓ ✓
707 jkplvosw Kepler Serif light os wide ✓ ✓
708 jkpss Kepler Sans (kpfonts_) ✓ ✓
709 jkpssvos Kepler Sans oldstyle ✓ ✓
710 jtm expanded Times (jamtimes_) ✓ ✓
711 llcmm LX Fonts (sans serif) (lxfonts_) ✓ ✓
712 lmr Latin Modern Roman (lmodern) ✓ ✓
713 mak Kerkis (kerkis_) ✓
714 kurier Kurier (sans serif) (kurier_) ✓ ✓
715 kurierc Kurier condensed ✓ ✓
716 kurierl Kurier light ✓ ✓
717 kurierlc Kurier light condensed ✓ ✓
718 mdbch Math Design Charter (mathdesign_) ✓ ✓ ✓ ✓
719 mdput Math Design Utopia ✓ ✓ ✓ ✓
720 mdugm Math Design Garamond ✓ ✓ ✓ ✓
721 neohellenic Neohellenic (gfsneohellenic_) ✓
722 ntxmi Times (newtx_) ✓ ✓
723 nxlmi Libertine (newtx_) ✓ ✓
724 plcm CM (PLaTeX) ✓
725 ptmom Times (Omega or MB-Times) ✓ ✓
726 ptmomu Times (Omega or MB-Times) ✓ ✓
727 ptmcm Times (mathptmx_) ✓
728 pxr Palatino (pxfonts_) ✓ ✓
729 qpl Palatino/Pagella (qpxmath) ✓ ✓
730 qtm Times/Termes (qtxmath) ✓ ✓
731 txr Times (txfonts_) ✓ ✓
732 udidot Didot (gfsdidot_) ✓
733 ywclm (greektex_) ✓ ✓
734 zavm Arev (Vera Sans-Serif) ✓ ✓
735 zplm Palatino (mathpazo_) ✓ ✓
736 zpple Palatino ✓ ✓
737 ztmcm Times (mathptmx_) ✓
738 zer Computer Modern (zefonts_) ✓ ✓
739 ============= ================================= ======= ======== ====== =======
740
741
742 .. _Table 4:
743
744 .. table:: Non-CM fonts with ``cmm`` as OML substitution
745
746 ============= ===============================
747 Family Name
748 ============= ===============================
749 bch Charter (psnfss)
750 pag Avant Garde (psnfss)
751 pbk Bookman (psnfss)
752 pcr Courier (psnfss)
753 phv Helvetica (psnfss)
754 pnc New Century Schoolbook (psnfss)
755 ppl Palatino (psnfss)
756 ptm Times Roman (psnfss)
757 put Utopia (psnfss)
758 pzc Zapf Chancery (psnfss)
759 uag Avant Garde (avantgar)
760 ubk Bookman (bookman)
761 ucr Courier (courier)
762 ucrs Courier
763 unc New Century Schoolbook (psnfss)
764 uni Universal (universa)
765 uhv Helvetica (helvetic)
766 upl Palatino (palatino)
767 utm Times (times)
768 uzc Zapf Chancery (zapfchan)
769 ============= ===============================
770
771
772 Unicode mathematical typesetting
773 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
774
775 This section compares `math font selection`_ in LaTeX and Unicode. It
776 suggests a set of 14 math alphabet commands that covers all Unicode
777 `mathematical alphanumeric symbols`_ and discusses compatibility issues
778 between math typesetting with traditional (8-bit) TeX engines versus `the
779 unicode-math package`_ for Unicode-enabled TeX engines (XeTeX, LuaTeX).
780
781 The technical report [tr25]_ presents an in-depth discussion of the
782 mathematical character repertoire of the Unicode Standard as well as
783 mathematical notation in general.
784
785 .. _mathematical alphanumeric symbols:
786
787 Unicode mathematical alphabets
788 ''''''''''''''''''''''''''''''
789
790 Chapter 2 `Mathematical Character Repertoire` of [tr25]_ lists 14
791 `Mathematical Alphabets` in Table 2.1. These mathematical alphabets are a
792 superset of the predefined `math alphabets`_ in the LaTeX core.
793
794 Unicode assigns code points to most letters of the mathematical
795 alphabets in the `mathematical alphanumeric symbols Unicode block`_.
796 The plain (upright) letters have been unified with the
797 existing characters in the Basic Latin and Greek blocks.
798
799 `Table 5`_ maps the 14 Unicode mathematical alphabets to LaTeX commands
800 according to the `naming scheme`_ below. `Table 6`_ lists the status of
801 LaTeX support for the mathematical alphanumeric symbols.
802
803 Naming scheme
804 `````````````
805
806 The naming scheme is an extension of the predefined `math alphabet`_
807 commands with the established short-cuts:
808
809 .. class:: borderless
810
811 ===== ================================
812 bf bold
813 it italic
814 cal script (calligraphic)
815 frak fraktur
816 bb double-struck (blackboard bold)
817 sf sans serif
818 ===== ================================
819
820 combined to commands in the form ``\math<type><weight><shape>``.
821
822 The <*type*>, <*weight*>, and <*shape*> specifiers are optional
823 (defaults depend on the `math version`_). Their order matches the
824 names of Unicode `Mathematical Alphanumeric Symbols`_.
825
826 Examples::
827
828 \mathbf{d} % MATHEMATICAL BOLD SMALL D
829 \mathsfbfit{d} % MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D.
830
831 .. _table 5:
832
833 .. table:: Mapping Unicode `mathematical alphanumeric symbols`_ to LaTeX
834 math alphabets.
835
836 ========== ======== ============= ================== ===============
837 serifs weight shape symbols math alphabet
838 ========== ======== ============= ================== ===============
839 *serif* *medium* *upright* Latin/Greek/digits ``\mathrm``
840 [#up]_
841 .. bold Latin/Greek/digits ``\mathbf``
842 .. italic Latin/Greek ``\mathit``
843 .. bold italic Latin/Greek ``\mathbfit``
844 .. script Latin ``\mathcal``
845 .. bold script Latin ``\mathbfcal``
846 .. fraktur Latin ``\mathfrak``
847 .. double-struck Latin/digits ``\mathbb``
848 .. bold fraktur Latin ``\mathbffrak``
849 sans serif Latin/digits ``\mathsf``
850 sans serif bold Latin/Greek/digits ``\mathsfbf``
851 sans serif italic Latin ``\mathsfit``
852 sans serif bold italic Latin/Greek ``\mathsfbfit``
853 .. monospace Latin/digits ``\mathtt``
854 ========== ======== ============= ================== ===============
855
856 .. [#up] plain standard characters outside the
857 `mathematical alphanumeric symbols` Unicode block.
858
859 LaTeX support
860 `````````````
861
862 Most commonly used math alphabets are supported either by the TeX kernel
863 or additional packages. Full support is only provided by `the unicode-math
864 package`_.
865
866
867 .. _Table 6:
868
869 .. table:: LaTeX support for `mathematical alphanumeric symbols`_.
870
871 ============ ========================= ===========================
872 style math alphabet package, comment
873 ============ ========================= ===========================
874 plain [#up]_ ``\mathrm`` predefined [#no-g]_
875 .. ``\mathup`` unicode-math_, kpfonts_
876 bf ``\mathbf`` predefined [#no-g]_
877 it ``\mathit`` predefined [#no-g]_
878 bf it ``\mathbfit`` isomath [#digits]_
879 .. ``\mathbold`` fixmath_, mathpazo_,
880 mathptmx_, tmmath_
881 [#digits]_
882 .. ``\boldsymbol`` amsmath_
883 .. ``\bm`` bm_
884 cal ``\mathcal`` predefined [#script]_
885 .. ``\mathscr`` mathrsfs_, euscript_,
886 mathdesign_
887 bf cal ``\mathbfscr`` unicode-math_
888 frak ``\mathfrak`` amssymb_, amsfonts_, eufrak_
889 bf frak ``\mathbffrak`` unicode-math_
890 bb ``\mathbb`` amssymb_, bbold_,
891 mathbbol_, mbboard_,
892 mathpazo_, sbbm_
893 .. ``\mathbbm`` bbm_
894 .. ``\mathds`` dsfont (doublestoke_)
895 sf ``\mathsf`` predefined [#no-g]_
896 sf bf ``\mathbfsfup`` unicode-math_
897 sf it ``\mathsfit`` isomath [#digits]_
898 sf bf it ``\mathsfbfit`` isomath [#digits]_
899 .. ``\mathbold`` cmbright_, hvmath_
900 .. ``\mathbfsfit`` unicode-math_
901 tt ``\mathtt`` predefined [#no-g]_
902 ============ ========================= ===========================
903
904 .. [#no-g] no small Greek, full Greek with `OMLmath*`_ options and
905 OML-encoded fonts
906 .. [#digits] Some italic math fonts (e. g., cmr, cmbr) have old-style
907 numbers in place of italic digits.
908 .. [#script] formal script with calrsfs_, eucal_, fourier_,
909 small Latin letters only with urwchancal_
910
911
912 The unicode-math package
913 ''''''''''''''''''''''''
914
915 Users of UTF-8 enabled TeX engines (XeTeX, LuaTeX) can typeset
916 mathematics with the experimental unicode-math_ package by Will
917 Robertson. It provides a LaTeX interface to OpenType fonts with math
918 support, e. g., `Asana Math`_, Cambria Math, `New Euler`_ or XITS_, with
919 commands to access the complete mathematical character repertoire of the
920 Unicode Standard.
921
922 LaTeX `math font selection`_ methods with unicode-math:
923
924 * `Math alphabets`_ map to a range of the `mathematical alphanumeric
925 symbols`_ block in the current font (or a substitution defined with the
926 ``range`` math font option).
927
928 Some command names differ from the `predefined math alphabets`_ or the
929 above `naming scheme`_:
930
931 .. class:: borderless
932
933 =============== ===============
934 LaTeX unicode-math
935 =============== ===============
936 ``\mathbf`` ``\mathbfup``
937 ``\mathsf`` ``\mathsfup``
938 ``\mathsfbf`` ``\mathbfsfup``
939 ``\mathsfbfit`` ``\mathbfsfit``
940 =============== ===============
941
942 With unicode-math, ``\mathbf``, ``\mathsf``, and ``\mathsfbf``
943 behave similar to `“in-line math versions”`_: they consider the
944 `math style`_ for upright vs. italic shape. Compatibility can be
945 achieved via the options ``bold-style=upright`` and
946 ``sans-style=upright``.
947
948 ``\mathbfsfit`` reverses the order of the ``sf`` and ``bf`` selectors,
949 so that, e. g., the Unicode character MATHEMATICAL SANS-SERIF BOLD
950 ITALIC CAPITAL A is selected by the non-mnemonic ``\mathbfsfit{A}``.
951
952 * `Math versions`_ can be set up using the syntax
953 ``\setmathfont[version=<version name>,<font features>]{<font name>}``
954
955 * Several `math styles`_ are supported with the ``math-style`` package
956 option that accepts the values ``TeX``, ``ISO``, ``french``, ``upright``,
957 and ``literal``.
958
959
960 Conclusions and outlook
961 ~~~~~~~~~~~~~~~~~~~~~~~
962
963 It is hoped, that in the future more font families will support the
964 OML encoding in normal and bold weight as well as upright and italic
965 shape. This would be a major step towards a LaTeX equivalent of the
966 `mathematical alphanumeric symbols`_ Unicode block.
967
968 This should be (relatively) easy to achieve via virtual fonts when the
969 glyphs for the Greek letters already exist. Examples are Latin Modern,
970 Kerkis, GFS Neohellenic, LX Fonts and KP-Serif.
971
972 Upright small Greek letters in ``\mathrm`` would enable the
973 specification of the constant pi, Myons, Pions, alpha-particles,
974 photons, and neutrinos with `math alphabets`_. (With mathdesign_
975 fonts, this is already possible today.)
976
977 With the development of the unicode-math_ package, an interesting
978 alternative for ISO-conforming math typesetting became available to
979 users of Unicode-enabled TeX engines (XeTeX or LuaTeX).
980
981
982 References
983 ----------
984
985 .. [ISO-80000-2] `Quantities and units – Part 2: Mathematical signs
986 and symbols to be used in the natural sciences and technology`:
987 http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=31887.
988
989 .. [ISO-31] `Quantities and units`, Superseded by [ISO-80000].
990
991 .. [typefaces] National Institute of Standards and Technology (NIST_),
992 `Typefaces for Symbols in Scientific Manuscripts`:
993 http://physics.nist.gov/cuu/pdf/typefaces.pdf.
994
995 .. [checklist] National Institute of Standards and Technology (NIST_),
996 `SI Unit rules and style conventions`
997 Check List for Reviewing Manuscripts:
998 http://physics.nist.gov/cuu/Units/checklist.html.
999
1000 .. [fonts_for_symbols] International Union of Pure and Applied
1001 Chemistry (IUPAC_), `On the use of italic and roman fonts for symbols
1002 in scientific text`, (Revised December 1999):
1003 http://old.iupac.org/standing/idcns/fonts_for_symbols.html.
1004
1005 .. [SI] Bureau international des poids et mesures (BIPM_),
1006 `The International System of Units (SI)`:
1007 http://www.bipm.org/en/si/si_brochure/.
1008
1009 .. [Green-Book] International Union of Pure and Applied Chemistry (IUPAC_),
1010 `Quantities, Units and Symbols in Physical Chemistry`,
1011 3rd edition, RSC Publishing, Cambridge 2007:
1012 [ISBN 0 85404 433 7; ISBN-13 978 0 85404 433 7].
1013
1014 .. [Red-Book] International Union of Pure and Applied Physics (IUPAP_),
1015 `Symbols, Units, Nomenclature and Fundamental Constants in Physics`:
1016 http://metrology.wordpress.com/measurement-process-index/iupap-red-book/index-iupap-red-book/.
1017
1018 .. [becc97] Claudio Beccari, `Typesetting mathematics for science and
1019 technology according to ISO 31 XI`, TUGboat, Volume 18, 1997, No. 1:
1020 http://www.tug.org/TUGboat/tb18-1/tb54becc.pdf.
1021
1022 .. [encguide] Frank Mittelbach, Robin Fairbairns, Werner Lemberg,
1023 LaTeX3 Project Team, `LaTeX font encodings`:
1024 http://mirror.ctan.org/macros/latex/doc/encguide.pdf.
1025
1026 .. [fntguide] LaTeX3 Project Team, `LaTeX 2e font selection`:
1027 http://mirror.ctan.org/macros/latex/doc/fntguide.pdf.
1028
1029 .. [tr25] Barbara Beeton, Asmus Freytag, Murray Sargent III,
1030 `Unicode Support for Mathematics`, Unicode Technical Report #25:
1031 http://www.unicode.org/reports/tr25/.
1032
1033 .. [beeton:2000] Barbara Beeton:
1034 `Unicode and math, a combination whose time has come – Finally!`,
1035 TUGBoat, 21#3, 2000:
1036 http://www.tug.org/TUGboat/Articles/tb21-3/tb68beet.pdf.
1037
1038 .. see also
1039 [koma-mail] Custom font substitution: http://www.komascript.de/node/823.
1040
1041
1042 .. Links
1043 =====
1044
1045 .. _BIPM: http://www.bipm.org/
1046 .. _IUPAC: http://iupac.org/
1047 .. _IUPAP: http://www.iupap.org/
1048 .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
1049 .. _Jens-Peer Kuska: http://phong.informatik.uni-leipzig.de/~kuska/
1050 .. _NIST: http://physics.nist.gov/
1051 .. _mathematical alphanumeric symbols unicode block:
1052 http://www.unicode.org/charts/PDF/U1D400.pdf
1053 .. _amsbsy: http://mirror.ctan.org/help/Catalogue/entries/amsbsy.html
1054 .. _amsfonts: http://mirror.ctan.org/help/Catalogue/entries/amsfonts.html
1055 .. _amsmath: http://mirror.ctan.org/help/Catalogue/entries/amsmath.html
1056 .. _amssymb: http://mirror.ctan.org/help/Catalogue/entries/amssymb.html
1057 .. _anttor: http://mirror.ctan.org/help/Catalogue/entries/anttor.html
1058 .. _arev: http://mirror.ctan.org/help/Catalogue/entries/arev.html
1059 .. _Asana Math: http://mirror.ctan.org/help/Catalogue/entries/asana-math.html
1060 .. _bm: http://mirror.ctan.org/help/Catalogue/entries/bm.html
1061 .. _bbm: http://mirror.ctan.org/help/Catalogue/entries/bbm.html
1062 .. _bbold: http://mirror.ctan.org/help/Catalogue/entries/bbold.html
1063 .. _calrsfs: http://mirror.ctan.org/help/Catalogue/entries/calrsfs.html
1064 .. _cmbright: http://mirror.ctan.org/help/Catalogue/entries/cmbright.html
1065 .. _concmath: http://mirror.ctan.org/help/Catalogue/entries/concmath.html
1066 .. _doublestoke: http://mirror.ctan.org/help/Catalogue/entries/doublestoke.html
1067 .. _efont: http://mirror.ctan.org/help/Catalogue/entries/efont.html
1068 .. _eucal: http://mirror.ctan.org/help/Catalogue/entries/eucal.html
1069 .. _eufrak: http://mirror.ctan.org/help/Catalogue/entries/eufrak.html
1070 .. _eulervm: http://mirror.ctan.org/help/Catalogue/entries/eulervm.html
1071 .. _euscript: http://mirror.ctan.org/help/Catalogue/entries/euscript.html
1072 .. _fixmath: http://mirror.ctan.org/help/Catalogue/entries/fixmath.html
1073 .. _fix-cm: http://mirror.ctan.org/help/Catalogue/entries/fix-cm.html
1074 .. _fourier: http://mirror.ctan.org/help/Catalogue/entries/fourier.html
1075 .. _fontspec: http://mirror.ctan.org/help/Catalogue/entries/fontspec.html
1076 .. _gfsdidot: http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html
1077 .. _gfsneohellenic: http://mirror.ctan.org/help/Catalogue/entries/gfsneohellenic.html
1078 .. _greektex: http://mirror.ctan.org/help/Catalogue/entries/greektex.html
1079 .. _hvmath: http://mirror.ctan.org/help/Catalogue/entries/hvmath.html
1080 .. _hfbright: http://mirror.ctan.org/help/Catalogue/entries/hfbright.html
1081 .. _ifthen: http://mirror.ctan.org/help/Catalogue/entries/ifthen.html
1082 .. _iwona: http://mirror.ctan.org/help/Catalogue/entries/iwona.html
1083 .. _jamtimes: http://mirror.ctan.org/help/Catalogue/entries/jamtimes.html
1084 .. _kerkis: http://mirror.ctan.org/help/Catalogue/entries/kerkis.html
1085 .. _keyval: http://mirror.ctan.org/help/Catalogue/entries/keyval.html
1086 .. _kpfonts: http://mirror.ctan.org/help/Catalogue/entries/kpfonts.html
1087 .. _kurier: http://mirror.ctan.org/help/Catalogue/entries/kurier.html
1088 .. _kvoptions: http://mirror.ctan.org/help/Catalogue/entries/kvoptions.html
1089 .. _lgrx: http://mirror.ctan.org/help/Catalogue/entries/lgrx.html
1090 .. _lxfonts: http://mirror.ctan.org/help/Catalogue/entries/lxfonts.html
1091 .. _lucimatx: http://pctex.com/files/managed/b/bf/lucimatxAbbrev.pdf
1092 .. _mathbbol: http://mirror.ctan.org/help/Catalogue/entries/mathbbol.html
1093 .. _mbboard: http://mirror.ctan.org/help/Catalogue/entries/mbboard.html
1094 .. _mathdesign: http://mirror.ctan.org/help/Catalogue/entries/mathdesign.html
1095 .. _mathpazo: http://mirror.ctan.org/help/Catalogue/entries/mathpazo.html
1096 .. _mathptmx: http://mirror.ctan.org/help/Catalogue/entries/mathptmx.html
1097 .. _mathptmv: http://mirror.ctan.org/help/Catalogue/entries/mathptmv.html
1098 .. _mathrsfs: http://mirror.ctan.org/help/Catalogue/entries/mathrsfs.html
1099 .. _newtx: http://mirror.ctan.org/help/Catalogue/entries/newtx.html
1100 .. _New Euler: https://github.com/khaledhosny/euler-otf
1101 .. _pxfonts: http://mirror.ctan.org/help/Catalogue/entries/pxfonts.html
1102 .. _sansmath: http://mirror.ctan.org/help/Catalogue/entries/sansmath.html
1103 .. _sbbm: http://mirror.ctan.org/help/Catalogue/entries/sbbm.html
1104 .. _sfmath: http://dtrx.de/od/tex/sfmath.html
1105 .. _tmmath: http://mirror.ctan.org/help/Catalogue/entries/tmmath.html
1106 .. _txfonts: http://mirror.ctan.org/help/Catalogue/entries/txfonts.html
1107 .. _unicode-math:
1108 http://mirror.ctan.org/help/Catalogue/entries/unicode-math.html
1109 .. _upgreek: http://mirror.ctan.org/help/Catalogue/entries/upgreek.html
1110 .. _urwchancal: http://mirror.ctan.org/help/Catalogue/entries/urwchancal.html
1111 .. _wrisym: http://phong.informatik.uni-leipzig.de/~kuska/wri_texmf_4.2.zip
1112 .. _XITS: http://mirror.ctan.org/help/Catalogue/entries/xits.html
1113 .. _zefonts: http://mirror.ctan.org/help/Catalogue/entries/zefonts.html