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

\char renders `\~ as space #2924

Closed
pdmosses opened this issue Apr 11, 2021 · 1 comment · Fixed by #2949
Closed

\char renders `\~ as space #2924

pdmosses opened this issue Apr 11, 2021 · 1 comment · Fixed by #2949

Comments

@pdmosses
Copy link

This looks similar to #1262, where \verb rendered ~ as space.

Describe the bug:
KaTeX renders \char`\~ as a space.

(La)TeX code:
The code of (La)TeX you tried to render:

\text{\char`\~}

Expected behavior:
LaTeX renders the same input as as a (raised) tilde.

Screenshots:
QuickLaTeX renders !\text{\char`\~}! as:
Screenshot

Environment (please complete the following information):

Additional context:
The same happens in math mode. \char`\c works correctly for all other characters c that I've tried.

@pdmosses pdmosses added the bug label Apr 11, 2021
edemaine added a commit that referenced this issue Apr 21, 2021
Support single characters having a catcode of 13 (active) or 12 (other),
and expand a macro defined for the character only if it's active.
This enables defining `~` as a macro, but avoiding expansion in URLs.

Fix #2924
edemaine added a commit that referenced this issue Apr 21, 2021
Support single characters having a catcode of 13 (active) or 12 (other),
and expand a macro defined for the character only if it's active.
This enables defining `~` as a macro, but avoiding expansion in URLs.

Fix #2924
ylemkimon added a commit that referenced this issue Apr 24, 2021
…#2949)

Support single characters having a catcode of 13 (active) or 12 (other),
and expand a macro defined for the character only if it's active.
This enables defining `~` as a macro, but avoiding expansion in URLs.

Fix #2924

Co-authored-by: ylemkimon <y@ylem.kim>
KaTeX-bot added a commit that referenced this issue Apr 24, 2021
## [0.13.3](v0.13.2...v0.13.3) (2021-04-24)

### Bug Fixes

* Respect catcode in macro expansion and set ~'s catcode correctly ([#2949](#2949)) ([01ae7f8](01ae7f8)), closes [#2924](#2924)
* **array:** Keep single empty row in AMS environments ([#2947](#2947)) ([24332e0](24332e0)), closes [#2944](#2944)
@KaTeX-bot
Copy link
Member

🎉 This issue has been resolved in version 0.13.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants