Skip to content

Instantly share code, notes, and snippets.

@jiyometrik
Last active April 24, 2022 04:35
Show Gist options
  • Save jiyometrik/d5bc75fa121797e4f620add59579ebd4 to your computer and use it in GitHub Desktop.
Save jiyometrik/d5bc75fa121797e4f620add59579ebd4 to your computer and use it in GitHub Desktop.
a short LaTeX file demonstrating common fonts used when writing in LaTeX and how to apply them.
\documentclass[11pt]{article}
\usepackage{blindtext}
\usepackage[parfill]{parskip}
% baskervaldx
\usepackage[lf]{Baskervaldx} % lining figures
\usepackage[bigdelims,vvarbb]{newtxmath} % math italic letters from Nimbus Roman
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit
\renewcommand*\oldstylenums[1]{\textosf{#1}}
% charter
% \usepackage[charter]{mathdesign}
% fourier
% \usepackage{fourier}
% kp family
% \usepackage{kpfonts}
% libertinus fonts
% \usepackage{libertinus}
% new century schoolbook
% \usepackage{fouriernc}
% palatino
% \usepackage{mathpazo} % or pxfonts
% times new roman
% \usepackage{mathptmx} % or txfonts
% urw-garamond
% \usepackage[urw-garamond]{mathdesign} % use install-getnonfreefonts for this
% garamond math
% \usepackage[math-style=ISO, bold-style=ISO]{unicode-math}
% \setmainfont{EB Garamond} % use the package on the AUR
% \setmathfont{Garamond-Math.otf}[StylisticSet={6,7,9}]
% dejavu / bitsream-style sans font
% \usepackage{arev}
% computer modern bright
% \usepackage{cmbright}
% dejavu (otf) - only available with xelatex
% \usepackage[DefaultFeatures={Ligatures=TeX}]{dejavu-otf}
% noto
% \usepackage{notomath, notomono}
% minion pro / myriad pro
% \usepackage{MyriadPro, MinionPro} % remove MyriadPro for serif
% \renewcommand{\familydefault}{\sfdefault}
% ** fonts that DO NOT come with math font
% ** for these few examples, i'll use fourier-otf as the math font (be sure to load the math font before the main font)
% \usepackage{fourier-otf}
% \usepackage{eulervm} % alternative math font
% source sans/serif/code pro
% \renewcommand\familydefault\sfdefault
% \usepackage[scale=0.96]{sourceserifpro} % there's also sourcesanspro and sourcecodepro
% roboto
% \usepackage{roboto}
% ibm plex (xelatex only)
% \usepackage{plex-otf}
\begin{document}
% ** use with `dejavu-otf` package
% \DejaVuSansCondensed % to use condensed version
% \DejaVuSerifCondensed % to use condensed version
\section{A Section}
\subsection{A Sub-Section}
\subsection{A Sub-sub-section}
\blindmathpaper%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment