nmfs-opensci / quarto_titlepages

A Quarto extension for making title and cover pages for PDF output.
https://nmfs-opensci.github.io/quarto_titlepages/
Creative Commons Zero v1.0 Universal
115 stars 20 forks source link

Error trying to reproduce example.qmd on windows #27

Closed yannickmorvan closed 1 year ago

yannickmorvan commented 1 year ago

Hi,

First, thank you very much for the valuable work you are doing with this extension.

I had trouble generating the PDF example with Windows following your tutorial on https://www.youtube.com/watch?v=SZ0WJMHGDps

Found the issue and thought this might be helpful (first time suggesting help on Github, hope I am not out of scope)

Best,

Yannick

Description

Followed the tutorial https://www.youtube.com/watch?v=SZ0WJMHGDps and click RENDER on Windows.

  1. ERROR MESSAGE

    luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "Palatino" not found. luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate. updating tlmgr

updating existing packages finding package for Palatino(-(Bold|Italic|Regular).*)?.

compilation failed- no matching packages Package fontspec Error: The font "Palatino" cannot be found.

For immediate help type H . ...

l.183 \usepackage {fontspec}

  1. FOUND ON STACKOVERFLOW

https://stackoverflow.com/questions/57829865/unable-to-knit-pdf-receiving-tinytex-error-with-failed-tlmgr-search

"it looks like you got the template from a Mac user while you are on Windows. The fontnames are different there. Instead of Palatino you could use Palatino Linotype."

  1. SOLUTION STEP 1

in _extensions\nmfs-opensci\titlepage Opened coverpage-theme.lua Replace line 235 ["title-fontfamily"] = "Palatino" & ["footer-fontfamily"] = "Palatino" BY ["title-fontfamily"] = "Palatino Linotype" & ["footer-fontfamily"] = "Palatino Linotype"

  1. NEW ERROR MESSAGE

updating existing packages finding package for tex/copyright.tex

compilation failed- no matching packages LaTeX Error: File `tex/copyright.tex' not found.

l.269 \input{tex/copyright.tex}

  1. SOLUTION STEP 2

Delete from example.qmd line 45 to 48

coverpage-include-file:
  - tex/copyright.tex
titlepage-include-file:
  - tex/dedication.tex

AND IT WORKS !

Environment

R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale: [1] LC_COLLATE=French_France.utf8 LC_CTYPE=French_France.utf8 LC_MONETARY=French_France.utf8 [4] LC_NUMERIC=C LC_TIME=French_France.utf8

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.2.1 fastmap_1.1.0 cli_3.4.1 htmltools_0.5.3 tools_4.2.1 rstudioapi_0.14 rmarkdown_2.17 [8] knitr_1.40 xfun_0.34 digest_0.6.30 rlang_1.0.6 evaluate_0.17

tex --version TeX 3.141592653 (TeX Live 2022) kpathsea version 6.3.4

eeholmes commented 1 year ago

Thank you!

Fonts will be the death of me. I think may need to include a font file in order to ensure that any fonts I use in demos will actually work across operating systems.

Regarding error 2. I will add a note to example qmd that the user should delete this if they don't have these tex files.

yannickmorvan commented 1 year ago

You're more than welcome! Looking forward to try titlepage within a project ( _quarto.yml and multiple .qmd files). Again many thanks for this very nice extension !