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

XeLaTeX, set mono font after loading unicode-math and modify \parfillskip leads to big whitespace in \texttt #632

Open
Jinwen-XU opened this issue Feb 25, 2024 · 2 comments

Comments

@Jinwen-XU
Copy link

Description

With XeLaTeX, if one \setmonofont after loading unicode-math, and then modify the \parfillskip, there would be issue with the spacing in \texttt.

This problem does not happen with LuaLaTeX.

See https://tex.stackexchange.com/q/711456.

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmonofont{NewCMMono10-Regular.otf} % any other typewriter font would do

\begin{document}

\setlength{\parfillskip}{0pt plus 10pt}

\texttt{some text with whitespaces}

\texttt{some-text-with-whitespaces}

\end{document}
@wspr
Copy link
Collaborator

wspr commented Feb 25, 2024 via email

@davidcarlisle
Copy link
Member

@wspr Ulrike commented at tex.sx that you can reproduce with just fontspec by declaring the font twice
https://tex.stackexchange.com/questions/711456/xelatex-set-mono-font-after-loading-unicode-math-and-modify-parfillskip-leads#comment1767977_711456

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