This site is supported by donations to The OEIS Foundation.

Typesetting systems

From OeisWiki
Jump to: navigation, search


This article page is a stub, please help by expanding it.


Typesetting is the composition of text by means of [mechanical or digital] types.

Typesetting requires the prior process of designing a font (i.e. a font-face with given font-size, font-weight (e.g. light, normal, bold) and font-style (e.g. regular, italic)) and storing it in some manner. Typesetting is the retrieval of the stored letters (called sorts in mechanical systems and glyphs in digital systems) and the ordering of them according to a language's orthography for visual display. Mathematical typesetting poses some particular challenges due to the two-dimensional presentational aspect of mathematical equations.

Mechanical typesetting systems

See letterpress printing and phototypesetting on Wikipedia.

Digital typesetting systems

SGML and XML systems

Main article page: XML

The Standard Generalized Markup Language (SGML) was based upon IBM Generalized Markup Language (GML). GML, a set of macros on top of IBM Script, was developed in the 1960s. The arrival of SGML/XML as the document model made other typesetting engines popular.[1]

MathML

Main article page: MathML

The Mathematical Markup Language (MathML) is an XML application for mathematical typesetting.

MathML has two halves:

With MathML, users are responsible for installing the appropriate fonts.

Troff and successors

Main article page: Troff

During the mid-1970s, Joseph Ossanna, working at Bell Laboratories, wrote the troff typesetting program to drive a Wang C/A/T phototypesetter owned by the Labs; it was later enhanced by Brian Kernighan to support output to different equipment, such as laser printers and the like. While its use has fallen off, it is still included with a number of Unix and Unix-like (e.g. Linux, Mac OS X) systems, and has been used to typeset a number of high-profile technical and computer books. Some versions, as well as a GNU work-alike called groff, are now open source.

TeX and LaTeX

Main article page: LaTeX

The TeX system, developed by Donald E. Knuth at the end of the 1970s, is another widespread and powerful automated typesetting system that has set high standards, especially for mathematical typesetting. TeX is considered fairly difficult to learn on its own, and deals more with appearance than structure. The LaTeX macro package written by Leslie Lamport at the beginning of the 1980s offered a simpler interface, and an easier way to systematically encode the structure of a document. LaTeX markup is very widely used in academic circles for published papers and even books. Although standard TeX does not provide an interface of any sort, there are programs that do. These programs include Scientific Workplace, TeXmacs and LyX, which are graphical/interactive editors.

AMS-LaTeX is a collection of LaTeX document classes and packages developed for the American Mathematical Society (AMS). Its additions to LaTeX include the typesetting of multi-line and other mathematical statements, document classes, and fonts containing numerous mathematical symbols.

An example of LaTeX with text-mode macros, where \[ ... \] invokes display style, is

Mathematical text typeset using TeX and the AMS Euler font rendered as PNG.
Mathematical text typeset using TeX and the AMS Euler font rendered as SVG.


obtained with the text-mode LaTeX code


\documentclass{article}
\usepackage{euler}
\begin{document}
 
\[
  AMS\ Euler
\]
 
\[
  \int_0^3 9x^2 + 2x + 4\, dx = 3x^3 + x^2 + 4x + C \Big\rbrack_0^3 = 102
\]
 
\[
  e^{x+iy} = e^x(\cos y + i\sin y)
\]
 
\[
  x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]
 
\end{document}

Online TeX and LaTeX

The math processor (server-side) for the MediaWiki server, e.g. used by Wikipedia and OEIS Wiki, is a program called texvc, which generates PNG raster (bitmap) images for complex expressions but outputs HTML for simple ones. (The program texvc (TeX validator and converter) validates (AMS) LaTeX mathematical expressions and converts them to HTML, MathML, or PNG graphics.)

The best known mathematical browser (client-side) plug-in is techexplorerWikipedia.org..

An example of LaTeX with math-mode macros only, where a PNG image rendered by the texvc math processor (server-side) for the MediaWiki server used by OEIS Wiki, is (we cannot use \usepackage{euler} in math-mode to get Euler font, so we get the default LaTeX font for OEIS Wiki)

obtained with the math-mode LaTeX code


<math>
 
\begin{align}
  
  {\rm AMS\ Euler} \\
 
  \int_0^3 9x^2 + 2x + 4\, dx &= 3x^3 + x^2 + 4x + C \Big\rbrack_0^3 = 102 \\
 
  e^{x+iy} &= e^x(\cos y + i\sin y) \\
 
  x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

\end{align}
 
</math>

jsMath

jsMath.js is an Ajax-based math rendering system developed by Davide Cervone in 2004. (MathJax grew out of the popular jsMath project.)

TeX fonts

jsMath.js uses TeX fonts.

MathJax
Main article page: MathJax

MathJax.js is an open-source JavaScript display engine for LaTeX and MathML that works in all modern browsers. MathJax grew out of the popular jsMath project, an earlier Ajax-based math rendering system developed by Davide Cervone in 2004. It requires no setup on the part of the user (no plugins to download or software to install). MathJax uses [scalable] web-based fonts. With MathJax, mathematics is text-based (equations can be searchable) rather than image-based. Note that the TeX input processor implements only the math-mode macros of TeX and LaTeX, not the text-mode macros. MathJax v2.0-beta introduced SVG rendering. MathJax can be installed on various web server platforms, including MediaWiki, Drupal, WordPress, and Joomla.

Support for TeX/LaTeX and MathML in MathJax:

  • The support for TeX and LaTeX in MathJax consists of two parts: the tex2jax.js preprocessor, and the TeX input processor (converts into MathJax’s internal format, which is essentially MathML).
  • The support for MathML in MathJax consists of two parts: the mml2jax.js preprocessor, and the TeX input processor (converts into MathJax’s internal format, which is essentially MathML).

For examples of how nice MathJax's generated HTML-CSS (from the LaTeX code) looks in your browser (unfortunately, after an admittedly horribly long Flash Of Unstyled Content, see

The user may choose among three rendering options from the contextual menu "Math Settings > Math Renderer"

Web fonts

MathJax uses Web fonts. Web fonts allow Web designers to use fonts that are not installed on the viewer's computer.

See also

  • How to write math on a typewriter
  • {{Math}} OEIS Wiki utility template (an attempt to implement a tiny subset of the functionality of MathJax, using templates instead of JavaScript)
  • MathJax (successor of jsMath, client-side mathematical typesetting via either XHTML/CSS or SVG using JavaScript)
  • MathJax in Use — the complete list
  • jsMath (predecessor of MathJax, client-side mathematical typesetting via XHTML/CSS using JavaScript)

Notes

  1. Such engines include RenderX's XEP, Datalogics Pager, Penta, Miles 33's OASYS, Xyvision's XML Professional Publisher (XPP), FrameMaker, Arbortext, YesLogic's Prince XML, QuarkXPress and Adobe InDesign. These products allow users to program their typesetting process around the SGML/XML with the help of scripting languages. Some of them, such as Arbortext Editor and XMetaL Author, provide attractive WYSIWYG-ish interfaces with support for XML standards and Unicode to attract a wider spectrum of users.

External links