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

unicode characters in strings #904

Open
Alex-Jordan opened this issue Aug 11, 2023 · 1 comment
Open

unicode characters in strings #904

Alex-Jordan opened this issue Aug 11, 2023 · 1 comment

Comments

@Alex-Jordan
Copy link
Contributor

This line causes a string to be wrapped in \verb if it has any characters at all other than those prescribed here.

return $self->verb($s) unless $s =~ m/^[-a-z0-9 ,.;:+=?()\[\]]*$/i;

I would like to use more unicode strings like say μ₁ here and there, notably in popup/dropdown answers where math content is not going to work. Since I use xelatex as the tex engine, in principle I can do this. But because of this wrapping in \verb, these end up in monospace font (once I've chosen a font that even has a monospace versions of, say, μ₁).

Can we rethink this line and make it more targeted for when it uses \verb? Would it work to only use \verb when the string has a special LaTeX character among [#$%&~_^{}\\]?

@dpvc
Copy link
Member

dpvc commented Aug 11, 2023

You would also need <, >, and |, at least, as these produce other characters when used in \text{}.

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

2 participants