Skip to content
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

Add workarounds for minted bugs #91

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

marcin-serwin
Copy link
Contributor

@marcin-serwin marcin-serwin commented Apr 18, 2023

Since version 2.7 minted is using new input processing macros which are not entirely backwards compatible. This breaks our CI since we were relying on some old behaviors. This PR adds workarounds for two bugs that prevented the book from building with the newest minted.

Fixes #90

@escape0707
Copy link

Thanks for your work for fixing the build issue.

May I greedily ask one more question for myself?

For me I find it harder to read serif fonts on PC monitors, and I wish to follow this book's content with sans-serif font. I've read that I can use /renewcommand{\familydefault}{\sfdefault} to do that, but this project is convoluted for me. I'm not sure whether it will do, and if it will, where to put that command.

@escape0707
Copy link

I'm trying out your patch but still got this error:

! LaTeX Error: File `pdfbuild/example_cache/F05647A8A9F6B61512F218265D478277' n
ot found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.252 \end{example}
                 
 25090 words of node memory still in use:
   161 hlist, 13 vlist, 26 rule, 105 disc, 19 local_par, 3 dir, 10 math, 570 gl
ue, 165 kern, 84 penalty, 11 margin_kern, 1780 glyph, 718 attribute, 123 glue_s
pec, 718 attribute_list, 4 temp, 5 if_stack, 1 shape, 14 write, 18 pdf_literal,
 1 pdf_start_link, 1 pdf_end_link, 2 pdf_dest, 7 pdf_action, 153 pdf_colorstack
, 1 pdf_setmatrix, 1 pdf_save, 1 pdf_restore nodes
   avail lists: 1:41,2:4699,3:614,4:1201,5:1927,6:81,7:7300,8:264,9:3639,10:46,
11:402,12:11
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on lshort.log.
make: *** [Makefile:35: lshort.pdf] Error 1

@oetiker
Copy link
Owner

oetiker commented Apr 19, 2023

Check LaTeX is failing

@marcin-serwin
Copy link
Contributor Author

@escape0707

I'm trying out your patch but still got this error:

I can't reproduce it. Could you try removing pdfbuild directory from the repo and build again?

For me I find it harder to read serif fonts on PC monitors, and I wish to follow this book's content with sans-serif font. I've read that I can use /renewcommand{\familydefault}{\sfdefault} to do that, but this project is convoluted for me. I'm not sure whether it will do, and if it will, where to put that command.

The main font of the document is declared here:

lshort/src/lshort.sty

Lines 35 to 39 in 7ccacc2

\setmainfont[
SlantedFont=Latin Modern Roman Slanted,
UprightFeatures={SmallCapsFont={Latin Modern Roman Caps}},
ItalicFeatures={SmallCapsFont={LM Roman Caps 10 Oblique}},
]{Latin Modern Roman}

If you replace these lines with \setmainfont{Latin Modern Sans} (or use other font of your liking) then most of the document will be written in sans serif. Keep in mind that some examples will still produce serif output and that there may be some issues with layout.

Copy link
Owner

@oetiker oetiker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go

@oetiker oetiker merged commit aa5d0e6 into oetiker:master Aug 22, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not make lshort.pdf
3 participants