Skip to content

fix issue with italic math font #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ RUN tlmgr update --self && tlmgr install \
newunicodechar \
pagecolor \
ragged2e \
tex-gyre \
textpos \
titling \
transparent \
unicode-math \
xits \
zref

RUN apk upgrade && apk add --no-cache \
Expand Down
20 changes: 10 additions & 10 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,19 @@ REQUIRED.

#### version

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

`version` is the version of the document.

#### revision

REQUIRED.
OPTIONAL.

`revision` is the revision of the document.
`revision` is the revision of the document. If not provided, the revision is not printed.

#### date

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

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

Expand All @@ -254,7 +254,7 @@ REQUIRED.

#### status

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

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

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

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

```md
$$ \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}
$$ \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}
```

$$ \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}
$$ \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}

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

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

# Advanced Features

Expand Down
7 changes: 4 additions & 3 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ $endif$
\newunicodechar{™}{\textfallback{™}}
\newunicodechar{→}{\textfallback{→}}

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

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

\begin{document}
Expand Down