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

_ doesn't render inside \text #141

Closed
ForNeVeR opened this issue Jul 15, 2018 · 10 comments · Fixed by #185
Closed

_ doesn't render inside \text #141

ForNeVeR opened this issue Jul 15, 2018 · 10 comments · Fixed by #185
Assignees
Labels

Comments

@ForNeVeR
Copy link
Owner

default
default

@ForNeVeR ForNeVeR self-assigned this Jul 15, 2018
@B3zaleel
Copy link
Contributor

Do you mean to say that, everything in a text group should be strictly normal text? As in, escape characters, underscores should come as they are.

@ForNeVeR
Copy link
Owner Author

I think that \text{\_} should render an underscore. For now I have absolutely no way to render an underscore inside of \text.

@B3zaleel
Copy link
Contributor

B3zaleel commented Sep 13, 2018

Maybe you could include a Unicode command(\uni) which works only if the text style is "text" ,the next non-whitespace character is plus. After the plus sign and the hexcode, there should be a whitespace to signal the end of the code. Try to convert the hex code to an integer and convert the integer to a character. Return a character atom based on the converted character if the character is less than thppthe maximum value of an unsigned short. I believe that would work, along with the other code points that aren't on a standard keyboard. So if that's done, \uni+5f should return an underscore.

@Happypig375
Copy link

@B3zaleel
Note: Supporting arbitrary codepoints would need you to look out for Combining Marks and Variation Sequences.

@ForNeVeR
Copy link
Owner Author

Any kind of "Unicode" command looks like a separate feature, please file another issue about that. Also we'd need to find out if any standard LaTeX distribution already supports that kind of command.

@B3zaleel
Copy link
Contributor

They can't support all the possible kinds of commands, that's why we can define new commands to do new things. Although there is the "\DeclareUnicodeCharacter{code point}{\name}" in XeLatex,it's obvious to see why that is inconvenient(especially if you are going to use the command once).

@ForNeVeR
Copy link
Owner Author

Yes, we can define new commands if we feel that our users will use WPF-Math's TeX dialect in some uncommon ways (e.g. we could add transparency support etc.). Although, I can't yet see the issue you're trying to solve with your "Unicode" command.

@B3zaleel
Copy link
Contributor

TeX has the command \char{character code in decimal notation}. Which can be used if one needs a special symbol that hasn't been defined.

@Happypig375
Copy link

The \char command takes a Glyph Index, not a codepoint.. It is used for where some glyphs cannot otherwise be obtained. However, with your unicode command, it will be very easy to get a codepoint without a corresponding glyph in the current font. How will you deal with that?

@ForNeVeR
Copy link
Owner Author

A side note: \text{_} should just work without any kind of magic commands: http://www.texpaste.com/n/twxhpxfl

B3zaleel added a commit to B3zaleel/xaml-math that referenced this issue Sep 24, 2018
Now sup and/or superscript characters can be rendered in a text group without any issue.
gsomix added a commit to gsomix/wpf-math that referenced this issue Mar 12, 2019
gsomix added a commit to gsomix/wpf-math that referenced this issue Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants