Skip to content

kerscher/typographydefaults

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

typographydefaults

BSD3 license

This is a LuaLaTeX and XeLaTeX package that makes selecting quality open-source font family defaults easy and painless. Instead of fiddling with multiple options or doing things by trial and error, an author using this package can just choose a “period”, loosely based around British standards for type classification. Currently supported are:

Period Type family Parameter
Medieval Junicode medieval
Humanist Coelacanth humanist
Garalde EB Garamond garalde
Realist PT Serif realist
Didone CMU Serif didone
Mechanistic CMU Concrete mechanistic
Lineal Humanist Source Sans Pro linealhumanist
Grotesque HK Grotesk grotesque
Geometric Orkney geometric

The alternative realist term was chosen for what are now commonly called transitional faces. Likewise, despite grotesques and geometrics being lineals, it only makes sense to distinguish humanist from its lineal counterpart due to ambiguity.

There are four styles to choose for monospaced text sections:

“Period” Font parameter
Typewriter CMU Typewriter Text typewriter
Programmer Slender Iosevka slender
Programmer Wide Monoid wide
Symbolic typesetting GNU Unifont symbolic

Such monospaced styles have no correspondence in classification that I'm aware of. Typewriter are graphic faces that resemble imprinting ink on paper through a mechanical typewriter. Programmer faces have: a combination of differentiation between similar symbols, such as between 0 and O; contrast and shapes suitable for use in “inverted” colours of light text over dark backgrounds; and in some specimens ligatures for common glyph combinations that occur in computer code. Lastly, a symbolic monospaced has high coverage of Unicode code points, making it suitable for typesetting scientific material with unusual glyphs.

I recommend typewriter for technical document citations, programmer on either option for source code sections and symbolic for Unicode-heavy typesetting such as Agda proofs.

Requirements

  • LuaTeX and LuaLaTeX, or XeTeX and XeLaTeX
  • CTAN packages:
    • pdftexcmds
    • kvoptions
    • fontspec
    • unicode-math
    • microtype

For font downloads use the links provided on the table above.

Installation instructions

If you have a recent distribution of TeX Live, you most likely have all needed CTAN packages, as well as LuaTeX, LuaLaTeX, XeTeX and XeLaTeX. If you don't, check you operating system package manager, or install manually those first.

Installing fonts on every major operating system can be done easily by opening the archives provided by foundry or distributors and simply double-clicking on each font to add it. There are better ways, but this is easy and compatible across most environments.

Once requirements are in place and assuming you're using TeX Live on Linux, you can install by:

cd ~/texmf/tex/latex
git clone git://github.com/kerscher/typographydefaults ./typographydefaults
texhash

If you're using other TeX distribution, check on its documentation how to install packages or read more about it here.

How to use it

On your preamble, add this package and declare its options. For example:

\usepackage[ text = mechanistic
           , mono = typewriter
           ]{typographydefaults}

Valid options for text and mono are listed on the table above. Order of parameters is irrelevant.

Licence

This package uses a 2-clause BSD-like licence. You can check it here.

About

Better typographic defaults for LuaLaTeX and XeLaTeX authors.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages