Code Monkey home page Code Monkey logo

typographydefaults's Introduction

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.

typographydefaults's People

Contributors

kerscher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ptati

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.