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

Snippets with utf8 characters #113

Open
Casteran opened this issue Jan 12, 2022 · 11 comments
Open

Snippets with utf8 characters #113

Casteran opened this issue Jan 12, 2022 · 11 comments

Comments

@Casteran
Copy link
Member

On branch utf8 I added a snippet utf8tryat the end of gaia/T1Bridge.v with the utf8 character for omega. The file movies/snippets/T1Bridge.tex looks to be OK,
but in hydras.pdf all the occurrences of the greek letter are missing (page 206).

Is there a standard way to use utf8 characters all along the toolchain ?

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 13, 2022

Cc @cpitclaudel

@cpitclaudel
Copy link
Contributor

Probably a font issue? The log will say something like this:

Missing character: There is no λ (U+03BB) in font [lmmono10-regular]:!
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}
Missing character: There is no α (U+03B1) in font [lmmono10-regular]:!
] (./test.aux))

Can you check?

@Casteran
Copy link
Member Author

Casteran commented Jan 13, 2022

Yes !
Missing character: There is no ω (U+03C9) in font [lmmono10-regular]:!

I've got also some similar messages in the addition-chains chapter:
(./movies/snippets/Addition_Chains/parametricDef.tex) [249
Missing character: There is no ₁ (U+2081) in font [lmmono9-regular]:!
Missing character: There is no ₂ (U+2082) in font [lmmono9-regular]:!
Missing character: There is no ₁ (U+2081) in font [lmmono9-regular]:!
Missing character: There is no ₂ (U+2082) in font [lmmono9-regular]:!

I desperately looked for a tutorial on "how to simply select a font with enough utf8 characters (with lualatex) "

@Casteran
Copy link
Member Author

@cpitclaudel
Indeed, the issue happens only inside the snippets. If I type an utf8 omega in the
main tex, it is correctly displayed.

@cpitclaudel
Copy link
Contributor

If you're OK with changing the font, it could be as simple as \setmonofont{Fira Code}[Scale=MatchLowercase] after the line that loads fontspec (you can install that font from https://github.com/tonsky/FiraCode).

@cpitclaudel
Copy link
Contributor

IIRC \setmonofont{Liberation Mono} would work as well.

@Casteran
Copy link
Member Author

Casteran commented Jan 13, 2022

@cpitclaudel Thanks a lot !
I installed FiraCode on my machine, at least "Check ω." works!
@Zimmi48 @palmskog Do we have to install this font somewhere for the CI/CD?

Indeed, if we include snippets with Coq+utf8 in the documentation, we would also have to update the INSTALL directives in the README.

@Casteran
Copy link
Member Author

Casteran commented Jan 15, 2022

\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase] looks good too.
And it doesn't cause errors on CI !

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 16, 2022

Sorry for not responding earlier. I have done a precise listing of the LaTeX packages that are needed to compile the book in:

(if withTex then
[ (texlive.combine {
inherit (texlive)
# With lualatex
scheme-small
# Extra packages
caption
doublestroke
draftwatermark
environ
fancyvrb
float
fontspec
lkproof
mathdots
mathtools
mdframed
needspace
newunicodechar
placeins
synttree
tcolorbox
texments
threeparttable
tikzsymbols
xcolor
zref;
}) ]

The advantage is that this represents less to download in CI, but the drawback of course is that this list needs to be kept up-to-date if we add dependencies on new LaTeX packages...

@Casteran
Copy link
Member Author

Thanks @Zimmi48 !
Do we have to include this list in the installation directives for the users (as well as the specific fonts needed for compiling the utf8 snippets) ?

@Zimmi48
Copy link
Member

Zimmi48 commented Jan 16, 2022

Do we have to include this list in the installation directives for the users (as well as the specific fonts needed for compiling the utf8 snippets) ?

Sure, that could make sense, although lots of users will just have a "full TeXLive" distribution, which is always sufficient.

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

No branches or pull requests

3 participants