Skip to content

Instantly share code, notes, and snippets.

@fredokun
Last active December 19, 2023 10:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredokun/5a1bae6e46910638fa1524a17bd0f5dd to your computer and use it in GitHub Desktop.
Save fredokun/5a1bae6e46910638fa1524a17bd0f5dd to your computer and use it in GitHub Desktop.
Unicode characters in latex documents
Instead of using:
\usepackage[utf8]{inputenc}
\usepackage{babel}
use:
\usepackage{fontspec}
\usepackage{polyglossia}
which are more recent implementations. You also need to set a font that
has all the characters you want to use. For example:
\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase]
and use lualatex or xelatex to compile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment