yihui/bookdown-crc

LaTeX Error: Command \href undefined when building pdf book in CRC style

drkamarul opened this issue · 1 comments

Hi,

I received this error LaTeX Error: Command \href undefined when building my book using bookdown::pdf_book today.

image

Previously, it was not a problem - and I managed to generate pdf book (CRC style) from the same source many times. The latex error could be due to the CRC style or the css, but I was unable to confirm this. I also tried to build the pdf books using the sources

  1. from bookdown-demo. Outcome: there is no error and the pdf book is generated
  2. from bookdown-crc. Outcome: I got the same error and no pdf book generated

I have reinstalled tinytex, but still did not work. And even after I have installed Tex Live 2022, I still receive the error.

Update:

Today, I successfully built the book using my other computer. This computer however uses Miktex. Perhaps, the error is related to TinyTex or Tex Live?

Appreciate any help and guidance.

yihui commented

Thanks for the report! It should be fixed by explicitly loading the hyperref package (as done in #16).