Skip to content

Commit

Permalink
Tutorial: in PDF version of tutorial, better backtick typesetting
Browse files Browse the repository at this point in the history
The PDF version of the tutorial, typeset using TeX, shows backticks (`)
by default as curved quote characters. In code samples, those are
ugly and confusing for readers. This patch uses the "upquote" style to
fix that (just in verbatim environments, namely code samples).

After this patch, a user who wants to build a PDF tutorial (ninja
doc/tutorial.pdf) needs the "upquote" TeX package, which should be
easy to install on modern Linux distributions - e.g., in Fedora, just
do "yum install texlive-upquote". I could have made the use of this
package optional, but I don't want to: I think without it the resulting
PDF looks bad, and the user should get an error if this package is
missing and go and install it.

Signed-off-by: Nadav Har'El <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
nyh authored and avikivity committed Apr 29, 2018
1 parent 83f0ac7 commit c4833bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
\usepackage{lmodern}
\usepackage{microtype}

% In code snippets, show backtick (`, grave accent) as a short straight line,
% not a curved quote. I could have used \IfFileExists{upquote.sty}{...}{}
% to make this package optional, but I really think it's important, and
% the user in a modern Linux distribution should be able to get it easily.
\usepackage{upquote}

% Nice header with document's name and section name, and footer
% with page number.
\usepackage{fancyhdr}
Expand Down

0 comments on commit c4833bf

Please sign in to comment.