Skip to content

Commit 3b987d4

Browse files
authored
fix issue with italic math font (#76)
Switch to TEX Gyre for italic support, and enlarge the draft watermark so it doesn't interfere with selection ever.
1 parent 89d8a46 commit 3b987d4

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ RUN tlmgr update --self && tlmgr install \
2323
newunicodechar \
2424
pagecolor \
2525
ragged2e \
26+
tex-gyre \
2627
textpos \
2728
titling \
2829
transparent \
2930
unicode-math \
30-
xits \
3131
zref
3232

3333
RUN apk upgrade && apk add --no-cache \

guide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,19 @@ REQUIRED.
230230

231231
#### version
232232

233-
REQUIRED.
233+
REQUIRED unless you're using [`--gitversion`](#git-version-parsing)
234234

235235
`version` is the version of the document.
236236

237237
#### revision
238238

239-
REQUIRED.
239+
OPTIONAL.
240240

241-
`revision` is the revision of the document.
241+
`revision` is the revision of the document. If not provided, the revision is not printed.
242242

243243
#### date
244244

245-
REQUIRED.
245+
REQUIRED unless you're using [`--gitversion`](#git-version-parsing).
246246

247247
`date` is the full date of the document, in YYYY/MM/DD form.
248248

@@ -254,7 +254,7 @@ REQUIRED.
254254

255255
#### status
256256

257-
REQUIRED.
257+
REQUIRED unless you're using [`--gitstatus`](#git-status-parsing).
258258

259259
`status` should be one of: "Draft", "Review", or "Published".
260260

@@ -735,20 +735,20 @@ Sometimes, you just need a little inline math in the middle of a sentence, like
735735
## Words in equations
736736

737737
To typeset complex equations with multi-character identifiers (such as the function "HMAC" or the word "OPAD") in @eq:hmac-iso,
738-
we recommend using the functions `\symbf` (for functions) and `\symit` (for identifiers).
738+
we recommend using the functions `\mathbf` (for functions) and `\mathit` (for identifiers).
739739
This avoids strange kerning issues where a string is treated as a product of single-character symbols, like in @eq:hmac-iso-bad-kerning:
740740

741741
```md
742-
$$ \symbf{HMAC}(K, \symit{"text"}) \coloneq H((\bar{K} \oplus \symit{OPAD}) \Vert H((\bar{K} \oplus \symit{IPAD}) \Vert \symit{"text"})) $$ {#eq:hmac-iso}
742+
$$ \mathbf{HMAC}(K, \mathit{someTEXT}) \coloneq H((\bar{K} \oplus \mathit{OPAD}) \Vert H((\bar{K} \oplus \mathit{IPAD}) \Vert \mathit{someTEXT})) $$ {#eq:hmac-iso}
743743
```
744744

745-
$$ \symbf{HMAC}(K, \symit{"text"}) \coloneq H((\bar{K} \oplus \symit{OPAD}) \Vert H((\bar{K} \oplus \symit{IPAD}) \Vert \symit{"text"})) $$ {#eq:hmac-iso}
745+
$$ \mathbf{HMAC}(K, \mathit{someTEXT}) \coloneq H((\bar{K} \oplus \mathit{OPAD}) \Vert H((\bar{K} \oplus \mathit{IPAD}) \Vert \mathit{someTEXT})) $$ {#eq:hmac-iso}
746746

747747
```md
748-
$$ HMAC(K, "text") \coloneq H((\bar{K} \oplus OPAD) \Vert H((\bar{K} \oplus IPAD) \Vert "text")) $$ {#eq:hmac-iso-bad-kerning}
748+
$$ HMAC(K, someTEXT) \coloneq H((\bar{K} \oplus OPAD) \Vert H((\bar{K} \oplus IPAD) \Vert someTEXT)) $$ {#eq:hmac-iso-bad-kerning}
749749
```
750750

751-
$$ HMAC(K, "text") \coloneq H((\bar{K} \oplus OPAD) \Vert H((\bar{K} \oplus IPAD) \Vert "text")) $$ {#eq:hmac-iso-bad-kerning}
751+
$$ HMAC(K, someTEXT) \coloneq H((\bar{K} \oplus OPAD) \Vert H((\bar{K} \oplus IPAD) \Vert someTEXT)) $$ {#eq:hmac-iso-bad-kerning}
752752

753753
# Advanced Features
754754

template/eisvogel.latex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ $endif$
320320
\newunicodechar{™}{\textfallback{™}}
321321
\newunicodechar{→}{\textfallback{→}}
322322

323-
\usepackage[mathit=sym]{unicode-math}
324-
\setmathfont{XITS Math}
323+
\usepackage{unicode-math}
324+
\setmathfont{TeX Gyre Schola} % For math mode in equations
325+
\setmathrm{TeX Gyre Schola} % For text mode in equations
325326

326327
% Customize the spacing for math to relax it a bit.
327328
\thinmuskip=6mu
@@ -646,7 +647,7 @@ $endif$
646647
{
647648
\usepackage[angle=0]{draftwatermark}
648649
% use an image for the watermark so it doesn't interfere with selection
649-
\SetWatermarkText{\includegraphics{/resources/img/draft.pdf}}
650+
\SetWatermarkText{\includegraphics[width=8.5in, height=11in]{/resources/img/draft.pdf}}
650651
}
651652

652653
\begin{document}

0 commit comments

Comments
 (0)