JeSuisCharlie Raif Badawi
A LaTeX package: mathastext
Copyright © 2011-2019 Jean-François Burnol.
Current version is 1.3w (2019/11/16)
README, README (html),, pdf, sty, dtx,, showcase page.

Optimal typographical results for documents containing mathematical symbols can only be hoped for with math fonts specifically designed to match a given text typeface. Although the list of freely available math fonts for (PDF)LaTeX is slowly expanding (Computer Modern, AMS fonts, PX fonts, TX fonts, Fourier-GUTenberg, Math Design, Kepler Project, newtx, mathabx, others ... ; and ([2012/10/27]) on the Unicode side (XeTeX/LuaTeX): Asana-Math, XITS, Latin Modern Math, TeX Gyre Pagella Math, TeX Gyre Termes Math) it remains limited. Chances are you will not find a math font which fits well with your favorite text font. Try out mathastext: it will simply use the text font also for the math! (additionally to Latin letters, digits, punctuation signs, a few math symbols available in the ascii set, such as +,–,<,>,=, will also be picked up from the text font.) Often this gives quite satisfying results especially if, like the author, you aim at a very unified look for the document, and in particular prefer upright to slanted shapes for math (mathastext does have an option to maintain the usual slanted shape).

The package originates in some (even worse) macros I had been using many years ago to produce handouts as if done on a typewriter, or better said, to produce documents with a somewhat rough, but unified look, done by a real human and meaning to convey some message to real humans. The hope was to coerce the reader into making a real effort at assimilating the entirety of the material, text and math, not knowing in advance which piece would prove to be more important than the others. In a well-crafted mathematical document, every single part is as important as any other one, or, rather, it is up to the reader to uncover the web of links between atoms.

The example on the side uses a typewriter font which well illustrates the purpose. But mathastext will work with all kinds of fonts and can produce less militant math: see the examples (be patient, this page with its embedded png images weighs circa 5 Mo!) A notable feature of mathastext is to give a simple interface to using many distinct math fonts in the same document: special example.

Current version is 1.3w (2019/11/16)
  • README (html)
  • Download from the CTAN portal or the TeX catalogue.
  • PDF Documentation
  • Package file: mathastext.sty
  • Documented source: dtx.
  • Installation:
    1. easiest is with unzip -d <foo> where foo is the TDS compliant destination folder.
    2. or download mathastext.sty and move it to the suitable TDS/source/latex/mathastext/ location (or alternatively to the working repertory of your current project).
    3. for customized compilation: all files may get extracted from mathastext.dtx via tex mathastext.dtx. This includes mathastext.sty, some test files (illustrating some package features), and also, and mathastext.tex. The latter can customize the global font size or paper dimensions of the pdf documentation: then latex mathastext.tex (thrice) and dvipdfmx mathastext.dvi. It is also possible to run directly pdflatex mathastext.dtx. Move the various files to the correct TDS locations.
Examples (be patient, the page with its embedded png images weighs circa 5 Mo! It contains about 70 examples, as png images and/or as pdf files.)

Valid HTML 4.01 Transitional