Skip to content

Commit

Permalink
Fix missing images and Arabic fonts in course PDFs (#2544)
Browse files Browse the repository at this point in the history
Let's give #2531 another try
- Fixes missing images in PDFs (those specified as <img> elements)
- Configures Arabic fonts

[The
fix](https://github.com/max-heller/mdbook-pandoc/pull/144/files#diff-b17b0f99aa22ee1ccf99778ca74c3c7a27af87f41544194cc95f82c012e8a507)
for the Persian translation issue, if you're curious.
  • Loading branch information
max-heller authored Jan 14, 2025
1 parent 0c91136 commit 9493a8d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/install-mdbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ runs:

- name: Install mdbook-pandoc and related dependencies
run: |
cargo install mdbook-pandoc --locked --version 0.7.0
cargo install mdbook-pandoc --locked --version 0.9.0
sudo apt-get update
sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk librsvg2-bin fonts-noto
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.2.1/pandoc-3.2.1-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.2.1/bin" >> $GITHUB_PATH
sudo apt-get install -y texlive texlive-luatex texlive-lang-cjk texlive-lang-arabic librsvg2-bin fonts-noto
curl -LsSf https://github.com/jgm/pandoc/releases/download/3.6.2/pandoc-3.6.2-linux-amd64.tar.gz | tar zxf -
echo "$PWD/pandoc-3.6.2/bin" >> $GITHUB_PATH
shell: bash

- name: Install mdbook-i18n-helpers
Expand Down
9 changes: 8 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ pdf-engine = "lualatex"
mainfont = "Noto Serif"
sansfont = "Noto Sans"
monofont = "Noto Sans Mono"
mainfontfallback = ["NotoColorEmoji:mode=harf"]
mainfontfallback = [
"NotoColorEmoji:mode=harf",
"NotoNaskhArabic:",
]
sansfontfallback = [
"NotoSansArabic:",
]
monofontfallback = [
"NotoColorEmoji:mode=harf",
"NotoSansMath:",
"NotoSansMonoCJKSC:",
"NotoSansArabic:",
]
geometry = ["margin=1.25in"]
linkcolor = "blue"
Expand Down

0 comments on commit 9493a8d

Please sign in to comment.