mml-book / mml-book.github.io

Companion webpage to the book "Mathematics For Machine Learning"
13.23k stars 2.44k forks source link

Back matter with information about typesetting #297

Closed nhubbard closed 7 months ago

nhubbard commented 5 years ago

Is your feature request related to a problem? Please describe. I would like there to be a page after the references and index that shows information about what font the book was typeset in, what graphing system was used, etc. to help those who want to use a style similar to the book to typeset their own documents.

Describe the solution you'd like A page describing the graph styles and fonts used in the document. Even better would be the source frontmatter used in LaTeX for the font, graphing settings, bibliography, index, table of contents, etc.

Describe alternatives you've considered I've tried to guess at what font and graphing settings this book uses for my own project, but I can't exactly figure them out.

Additional context Not much additional context necessary.

hayesall commented 5 years ago

I like this. It could probably work in the front matter, back matter, or even a "how this book was produced" section on the website.

vitorsr commented 3 years ago

Hi,

I've noticed this went unanswered for nearly two years now, so I'll chime in.

Issue #584 was closed by referring users to tufte-latex classes. That helps regarding general formatting and whatnot but does not provide any information regarding the fonts. Because, you see, tufte-latex uses Palatino clones for Roman typesetting (see [1], [2]) whereas the book is clearly not typeset in Palatino.

To find out what were the actual fonts used, we may inspect the PDF itself using pdffonts [3].

I'll enclose the output of executing pdffonts below.

My best guess is that:

Charter and Helvetica are included in all TeX distributions via the psnfss package [4]. Include them as follows.

\usepackage{charter}
\usepackage{helvet}

Regarding mathematics, you're probably using it already, Computer Modern is the default TeX font.

Doublestroke is available via dsfont [5].

\usepackage{dsfont}

And it suffices amssymb [6] for Euler Fraktur (formerly eufrak) and AMS symbol fonts (amssymb requires amsfonts).

\usepackage{amssymb}

Last, Univers is available in CTAN via the bitstrea package, but the unusual weight/spacing, type, and encoding (LightUltraCondensed; Type 1C; WinAnsi) leads me to believe the that the cover page was done separately.

For brevity I am not including package-specific options, do check them for completeness.

You can find this kind of information in the package documentation on CTAN.

[1] https://github.com/Tufte-LaTeX/tufte-latex/blob/master/tufte-common.def#L305-L311
[2] https://github.com/Tufte-LaTeX/tufte-latex/blob/master/tufte-common.def#L1407-L1413
[3] https://manpages.ubuntu.com/manpages/focal/man1/pdffonts.1.html
[4] https://ctan.org/pkg/psnfss
[5] https://ctan.org/pkg/doublestroke
[6] https://ctan.org/pkg/amsfonts


$ pdffonts mml-book.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
Univers-LightUltraCondensed          Type 1C           WinAnsi          yes no  no     466  0
Univers-CondensedBold                Type 1C           Custom           yes no  no     467  0
Univers-Condensed                    Type 1C           WinAnsi          yes no  no     468  0
WBUWFX+CharterBT-Roman               Type 1            Custom           yes yes no     522  0
WQRKVE+CharterBT-Italic              Type 1            Custom           yes yes no     523  0
HVESJX+CharterBT-Bold                Type 1            Custom           yes yes no     524  0
DTPNLE+CMSY8                         Type 1            Builtin          yes yes no     525  0
OHLZWX+CMTT8                         Type 1            Builtin          yes yes no     526  0
JPIIZZ+CMTT10                        Type 1            Builtin          yes yes no     679  0
DXQGZE+CMMI10                        Type 1            Builtin          yes yes no     693  0
EYUVZO+CMMIB10                       Type 1            Builtin          yes yes no     694  0
SOISIN+CMSY7                         Type 1            Builtin          yes yes no     695  0
MSGGQM+CMR7                          Type 1            Builtin          yes yes no     696  0
YUTRNV+CMSY10                        Type 1            Builtin          yes yes no     697  0
VKZMRM+CMR10                         Type 1            Builtin          yes yes no     698  0
XJOACZ+dsrom10                       Type 1            Builtin          yes yes no     699  0
BSFIZJ+CMMI7                         Type 1            Builtin          yes yes no     700  0
RACIKO+CMBX10                        Type 1            Builtin          yes yes no     701  0
TQFJUQ+CMEX10                        Type 1            Builtin          yes yes no     707  0
ZDZTST+EUFM10                        Type 1            Builtin          yes yes no     708  0
Helvetica                            CID TrueType      Identity-H       yes no  yes    780  0
Helvetica                            CID TrueType      Identity-H       yes no  yes    781  0
Helvetica                            CID TrueType      Identity-H       yes no  yes    782  0
Helvetica                            CID TrueType      Identity-H       yes no  yes    783  0
LKGNRA+CMSY6                         Type 1            Builtin          yes yes no     848  0
CCRIKS+CMMIB9                        Type 1            Builtin          yes yes no     849  0
MZKVDC+CMR9                          Type 1            Builtin          yes yes no     850  0
YUTRNV+CMSY10                        Type 1            Custom           yes yes no     863  0
JPKIFH+CMR17                         Type 1            Custom           yes yes no     866  0
WKEZSL+CMMI12                        Type 1            Custom           yes yes no     869  0
SPDIMT+CMR12                         Type 1            Builtin          yes yes no     922  0
BZGHXZ+CMR10                         Type 1            Builtin          yes yes no     967  0
MHOLNP+CMMI10                        Type 1            Builtin          yes yes no     968  0
FYGEPU+CMR7                          Type 1            Builtin          yes yes no     969  0
FXXUVH+CMSY10                        Type 1            Builtin          yes yes no     970  0
WSLNBA+CMMIB8                        Type 1            Builtin          yes yes no     997  0
PFLDVP+CharterBT-BoldItalic          Type 1            Custom           yes yes no     999  0
...
JQCDLX+MSAM7                         Type 1            Builtin          yes yes no    5759  0
...