How to compile the book? #329

Closed
opened 2026-03-22 15:36:50 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @BravoBaldo on GitHub (Feb 6, 2025).

I haven't been able to recompile the book for at least a week.
It would be appropriate to indicate which sw to install.
It seems that Quarto is no longer enough.
Furthermore, the .tex files are called even when compiling only the HTML part.

[ 7/51] contents\core\introduction\introduction.qmd
The call
lualatex
failed with error code 1. Output:
This is LuaHBTeX, Version 1.16.0 (TeX Live 2023)
 restricted system commands enabled.
! Undefined control sequence.
<*> "C:\Users
          ......\AppData\Local\Temp\tikz-c4fd212a1d804530/tikz-image.tex"
! Undefined control sequence.
Originally created by @BravoBaldo on GitHub (Feb 6, 2025). I haven't been able to recompile the book for at least a week. It would be appropriate to indicate which sw to install. It seems that Quarto is no longer enough. Furthermore, the .tex files are called even when compiling only the HTML part. ``` [ 7/51] contents\core\introduction\introduction.qmd The call lualatex failed with error code 1. Output: This is LuaHBTeX, Version 1.16.0 (TeX Live 2023) restricted system commands enabled. ! Undefined control sequence. <*> "C:\Users ......\AppData\Local\Temp\tikz-c4fd212a1d804530/tikz-image.tex" ! Undefined control sequence. ```
GiteaMirror added the area: tools label 2026-03-22 15:36:51 -05:00
Author
Owner

@profvjreddi commented on GitHub (Feb 6, 2025):

Hi, yea, we have had to upgrade the compiler and use LuaTex, etc., cause of redrawing the images in this so that everything is more self-contained cause when we tried to render images to the PDF, etc., the resolution of the original image was becoming an issue. So, we are trying to streamline everything. Apologies for the headache, we also faced that.

  1. You will need R and after you install R you will need to do Rscript install_packages.R.
  2. Google Chrome broke Quarto. So you have to download the latest build of Quarto -- https://quarto.org/docs/download/prerelease.html -- you have to get the pre-release as they issued a quick fix.
  3. I would recommend just trying to build index.qmd first since it is the simplest after you do the above.

I will try to add a build instruction file.

@profvjreddi commented on GitHub (Feb 6, 2025): Hi, yea, we have had to upgrade the compiler and use LuaTex, etc., cause of redrawing the images in this so that everything is more self-contained cause when we tried to render images to the PDF, etc., the resolution of the original image was becoming an issue. So, we are trying to streamline everything. Apologies for the headache, we also faced that. 1. You will need R and after you install R you will need to do `Rscript install_packages.R`. 2. Google Chrome broke Quarto. So you have to download the latest build of Quarto -- https://quarto.org/docs/download/prerelease.html -- you have to get the pre-release as they issued a quick fix. 3. I would recommend just trying to build index.qmd first since it is the simplest after you do the above. I will try to add a build instruction file.
Author
Owner

@profvjreddi commented on GitHub (Feb 9, 2025):

Hi @BravoBaldo please see https://github.com/harvard-edge/cs249r_book?tab=readme-ov-file#-want-to-build-the-book-locally

I hope these instructions work for you. Let me know.

@profvjreddi commented on GitHub (Feb 9, 2025): Hi @BravoBaldo please see https://github.com/harvard-edge/cs249r_book?tab=readme-ov-file#-want-to-build-the-book-locally I hope these instructions work for you. Let me know.
Author
Owner

@profvjreddi commented on GitHub (Feb 12, 2025):

Ah, sorry I actually meant to share this detailed link for you -- https://github.com/harvard-edge/cs249r_book/blob/dev/BUILD.md

@profvjreddi commented on GitHub (Feb 12, 2025): Ah, sorry I actually meant to share this detailed link for you -- https://github.com/harvard-edge/cs249r_book/blob/dev/BUILD.md
Author
Owner

@BravoBaldo commented on GitHub (Feb 12, 2025):

On a fresh installation of Windows:
with quarto render --to html there are 2 types of warnings

	** (org.inkscape.Inkscape:??????): WARNING **: 12:42:53.382: No pages selected, getting first page only.
       ?: In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  :
       font family not found in Windows font database​

  **Without any indication of the font family!**

In the end, however, the html is produced

with quarto render --to pdf:

ERROR:
compilation failed- error
LaTeX Error: Environment lstlisting undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.1883 \begin{lstlisting}

No PDF produced

@BravoBaldo commented on GitHub (Feb 12, 2025): On a fresh installation of Windows: **with `quarto render --to html` there are 2 types of **warnings**** ``` ** (org.inkscape.Inkscape:??????): WARNING **: 12:42:53.382: No pages selected, getting first page only. ``` ``` ?: In grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font family not found in Windows font database​ ``` **Without any indication of the font family!** **In the end, however, the html is produced** **with `quarto render --to pdf`:** ``` ERROR: compilation failed- error LaTeX Error: Environment lstlisting undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1883 \begin{lstlisting} ``` **No PDF produced**
Author
Owner

@profvjreddi commented on GitHub (Feb 12, 2025):

Could you please make sure tlmgr install listings says that the package is installed?

Are you using MiKTeX on Windows?

If using MiKTeX, could you make sure "Install missing packages on the fly" is enabled:

Open MiKTeX Console.
Go to Settings → General.
Set "Install missing packages on the fly" to "Yes".
Then try rendering again.

I don't build on windows, but these are pretty standard.

@profvjreddi commented on GitHub (Feb 12, 2025): Could you please make sure `tlmgr install listings` says that the package is installed? Are you using MiKTeX on Windows? If using MiKTeX, could you make sure "Install missing packages on the fly" is enabled: Open MiKTeX Console. Go to Settings → General. Set "Install missing packages on the fly" to "Yes". Then try rendering again. I don't build on windows, but these are pretty standard.
Author
Owner

@profvjreddi commented on GitHub (Feb 12, 2025):

As for the warnings, I myself haven't quite figured out how to get rid of them. They are coming from Inkscape, which is needed to render tikz drawings.

@profvjreddi commented on GitHub (Feb 12, 2025): As for the warnings, I myself haven't quite figured out how to get rid of them. They are coming from Inkscape, which is needed to render tikz drawings.
Author
Owner

@profvjreddi commented on GitHub (Feb 16, 2025):

@BravoBaldo did this help you with building on Windows?

@profvjreddi commented on GitHub (Feb 16, 2025): @BravoBaldo did this help you with building on Windows?
Author
Owner

@BravoBaldo commented on GitHub (Feb 17, 2025):

The answer to your question is no, it does not affect the build.

OmegaT parser complains!

In any case these are the only places where there are single backslashes.

I'm continuing to investigate Windows.
I discovered that the font warnings are for the Helvetica font that was specifically required.

The other warnings will take some time.

Baldo

Il 16/02/2025 18:00 CET Vijay Janapa Reddi @.***> ha scritto:

@BravoBaldo https://github.com/BravoBaldo did this help you with building on Windows?


Reply to this email directly, view it on GitHub https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH2TQNTCQ5OASDHTU2IJWD2QC7Z5AVCNFSM6AAAAABWUQODVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUZDKMBRGM.
You are receiving this because you were mentioned.Message ID: @.***>

[profvjreddi]profvjreddi left a comment (harvard-edge/cs249r_book#687) https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013

@BravoBaldo https://github.com/BravoBaldo did this help you with building on Windows?


Reply to this email directly, view it on GitHub https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH2TQNTCQ5OASDHTU2IJWD2QC7Z5AVCNFSM6AAAAABWUQODVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUZDKMBRGM.
You are receiving this because you were mentioned.Message ID: @.***>

@BravoBaldo commented on GitHub (Feb 17, 2025): The answer to your question is no, it does not affect the build. OmegaT parser complains! In any case these are the only places where there are single backslashes. I'm continuing to investigate Windows. I discovered that the font warnings are for the Helvetica font that was specifically required. The other warnings will take some time. Baldo > Il 16/02/2025 18:00 CET Vijay Janapa Reddi ***@***.***> ha scritto: > > > > @BravoBaldo https://github.com/BravoBaldo did this help you with building on Windows? > > — > Reply to this email directly, view it on GitHub https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH2TQNTCQ5OASDHTU2IJWD2QC7Z5AVCNFSM6AAAAABWUQODVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUZDKMBRGM. > You are receiving this because you were mentioned.Message ID: ***@***.***> > > [profvjreddi]profvjreddi left a comment (harvard-edge/cs249r_book#687) https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013 > > @BravoBaldo https://github.com/BravoBaldo did this help you with building on Windows? > > — > Reply to this email directly, view it on GitHub https://github.com/harvard-edge/cs249r_book/issues/687#issuecomment-2661525013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACH2TQNTCQ5OASDHTU2IJWD2QC7Z5AVCNFSM6AAAAABWUQODVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRRGUZDKMBRGM. > You are receiving this because you were mentioned.Message ID: ***@***.***> >
Author
Owner

@profvjreddi commented on GitHub (Feb 17, 2025):

OK, keep me posted.

Yes, we started using Helvetica fonts for the figures, so that's something new.

I do have a version that builds on Windows and you can see the Quarto yml workflow file for it here - https://github.com/harvard-edge/cs249r_book/blob/dev/.github/workflows/quarto-build.yml - it builds for both Linux and Windows, but that version passes the build check.

It looks like OmegaT is some translator. I haven't used it before. If you think its useful to put into the build flow, we can look into that to see if the changes we are making are compliant with that workflow you are using for translating.

Can you take a look at the yml file above and let me know if it helps you. Sorry for this headache, but as I continue to improve the book, we are just having to use more tools to bring the book closer to publishing shape. Thank you for your patience 🙏

@profvjreddi commented on GitHub (Feb 17, 2025): OK, keep me posted. Yes, we started using Helvetica fonts for the figures, so that's something new. I do have a version that builds on Windows and you can see the Quarto yml workflow file for it here - https://github.com/harvard-edge/cs249r_book/blob/dev/.github/workflows/quarto-build.yml - it builds for both Linux and Windows, but that version passes the build check. It looks like OmegaT is some translator. I haven't used it before. If you think its useful to put into the build flow, we can look into that to see if the changes we are making are compliant with that workflow you are using for translating. Can you take a look at the `yml` file above and let me know if it helps you. Sorry for this headache, but as I continue to improve the book, we are just having to use more tools to bring the book closer to publishing shape. Thank you for your patience 🙏
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#329