Skip to content

Commit 15e3f29

Browse files
committed
Improved font treatment + explanation.
1 parent 45a26d2 commit 15e3f29

File tree

4 files changed

+53
-8
lines changed

4 files changed

+53
-8
lines changed

md_version/fonts/Symbola.ttf

2.14 MB
Binary file not shown.

md_version/main.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,18 @@ Markdown only
135135
You can insert [hyperlinks](https://pandoc.org/MANUAL.html#links-1) in different ways, including hyperlinks to this document^[You may note that the footnote number is itself a link.] using e.g.\ the [link automatically added to all chapters](#introduction), following the convention described [in pandoc's manual](https://pandoc.org/MANUAL.html#heading-identifiers).
136136

137137

138-
# Writing Mathematics
138+
# Writing Mathematics{#writing-mathematics}
139139

140140
\LaTeX can be used to render [complex mathematics expressions](https://en.m.wikibooks.org/wiki/LaTeX/Mathematics) in a relatively simple manner.
141141
Note that thanks to XeLaTeX, you can insert mathematical symbols directly [in unicode](https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode), as follows: $∀ y ∈ ℕ, ∃ x ∈ ℕ, y = x²$, but of course you can always fall back to usual \LaTeX{} notation, using e.g. `\forall` to produce $\forall$.
142142

143143
You can add additional unicode symbols that may not be supported by this template or its font using the model
144144

145-
\newunicodechar{<unicode symbol>}{\ensuremath{<latex command>}}
145+
```latex
146+
\newunicodechar{<unicode symbol>}{\ensuremath{<latex command>}}
147+
```
146148

147-
(in `head_a.tex` in the markdown version), in this case additionally forcing the symbol `<unicode symbol>` to be rendered in math mode using `\ensuremath`.
149+
(in `head_c.tex` in the markdown version), in this case additionally forcing the symbol `<unicode symbol>` to be rendered in math mode using `\ensuremath`.
148150

149151

150152
## Theorem, Proof, and Others Environments
@@ -313,13 +315,30 @@ Please, do not change those values.
313315

314316
## Fonts
315317

316-
The font used is the font ["TeX Gyre Termes Font Family"](http://www.gust.org.pl/projects/e-foundry/tex-gyre/termes), which is an extension of the standard Times New Roman that is free for commercial use, and can be [freely distributed](https://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt).
318+
### Body
319+
320+
The font used in the body of the document is ["TeX Gyre Termes Font Family"](http://www.gust.org.pl/projects/e-foundry/tex-gyre/termes), which is an extension of the standard Times New Roman that is free for commercial use, and can be [freely distributed](https://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt).
317321
It is set to 12pt in all of the document, and adjusted when needed to the appropriate size (particularly in the cover page, where most attributes need to be set at 16pts).
318322

319323
The "usual" correspondence between points and \LaTeX commands is as follows:
320324

321325
\getfontsize
322326

327+
### Symbols
328+
329+
For better unicode support, the Symbola font is also used.
330+
Starting [with version 11](http://web.archive.org/web/20181228102842/http://users.teilar.gr/%7Eg1951d/Symbola.pdf), the licence of this font is too restrictive for non-personal use.
331+
As a consequence, users are asked to make sure they do not use a version greater than v.10.24, which is "free for any use" and [archived on-line](http://web.archive.org/web/20180307012615/http://users.teilar.gr/~g1951d/Symbola.zip).
332+
333+
By default, the following symbols, not available in the TeX Gyre Termes Font Family, are displayed using Symbola: 🔒, ✘, ⚠, ❓, 🔜, ℕ, ℤ, ✔, ↵, ↲, 🛡, ℝ □.
334+
To declare other unicode symbols as having to be displayed using the Symbola font, use
335+
336+
```latex
337+
\newunicodechar{<unicode symbol>}{\symb <unicode symbol>}
338+
```
339+
340+
(in `head_c.tex` in the markdown version), so that `<unicode symbol>` will be rendered using the Symbola font.
341+
323342
<!--
324343
⚠ Do not edit ⚠
325344
the three lines below.

md_version/templates/head_c.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
% List of symbols supported by Symbola at
4646
% https://www.fileformat.info/info/unicode/font/symbola/list.htm
47-
47+
\defaultfontfeatures[Symbola]{Path=fonts/, Extension={.ttf}, UprightFont={*}}
4848
\newfontfamily\sym{Symbola}
4949
\DeclareTextFontCommand{\symb}{\sym}
5050

tex_version/main.tex

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,11 +894,11 @@ \chapter{Writing Mathematics}\label{writing-mathematics}
894894
You can add additional unicode symbols that may not be supported by this
895895
template or its font using the model
896896

897-
\begin{lstlisting}
897+
\begin{lstlisting}[language=TeX]
898898
\newunicodechar{<unicode symbol>}{\ensuremath{<latex command>}}
899899
\end{lstlisting}
900900

901-
(in \passthrough{\lstinline!head\_a.tex!} in the markdown version), in
901+
(in \passthrough{\lstinline!head\_c.tex!} in the markdown version), in
902902
this case additionally forcing the symbol
903903
\passthrough{\lstinline!<unicode symbol>!} to be rendered in math mode
904904
using \passthrough{\lstinline!\\ensuremath!}.
@@ -1184,7 +1184,9 @@ \section{Margins}\label{margins}
11841184

11851185
\section{Fonts}\label{fonts}
11861186

1187-
The font used is the font
1187+
\subsection{Body}\label{body}
1188+
1189+
The font used in the body of the document is
11881190
\href{http://www.gust.org.pl/projects/e-foundry/tex-gyre/termes}{``TeX
11891191
Gyre Termes Font Family''}, which is an extension of the standard Times
11901192
New Roman that is free for commercial use, and can be
@@ -1198,6 +1200,30 @@ \section{Fonts}\label{fonts}
11981200

11991201
\getfontsize
12001202

1203+
\subsection{Symbols}\label{symbols}
1204+
1205+
For better unicode support, the Symbola font is also used. Starting
1206+
\href{http://web.archive.org/web/20181228102842/http://users.teilar.gr/\%7Eg1951d/Symbola.pdf}{with
1207+
version 11}, the licence of this font is too restrictive for
1208+
non-personal use. As a consequence, users are asked to make sure they do
1209+
not use a version greater than v.10.24, which is ``free for any use''
1210+
and
1211+
\href{http://web.archive.org/web/20180307012615/http://users.teilar.gr/~g1951d/Symbola.zip}{archived
1212+
on-line}.
1213+
1214+
By default, the following symbols, not available in the TeX Gyre Termes
1215+
Font Family, are displayed using Symbola: 🔒, ✘, ⚠, ❓, 🔜, ℕ, ℤ, ✔, ↵,
1216+
↲, 🛡, ℝ □. To declare other unicode symbols as having to be displayed
1217+
using the Symbola font, use
1218+
1219+
\begin{lstlisting}[language=TeX]
1220+
\newunicodechar{<unicode symbol>}{\symb <unicode symbol>}
1221+
\end{lstlisting}
1222+
1223+
(in \passthrough{\lstinline!head\_c.tex!} in the markdown version), so
1224+
that \passthrough{\lstinline!<unicode symbol>!} will be rendered using
1225+
the Symbola font.
1226+
12011227
\clearpage
12021228
\printbibliography[label=chap:references, title=References]
12031229
\let\printbibliography\relax

0 commit comments

Comments
 (0)