Skip to content

Don't hardcode unicode-symbols - #1673

Merged
rocky merged 2 commits into
improve_latex_formfrom
improve_latex_form-using-named-characters
Feb 3, 2026
Merged

Don't hardcode unicode-symbols#1673
rocky merged 2 commits into
improve_latex_formfrom
improve_latex_form-using-named-characters

Conversation

@rocky

@rocky rocky commented Feb 3, 2026

Copy link
Copy Markdown
Member

Don't hardcode unicode-symbols. Also, op-tables.json -> character-tables.json since that's what it is.

Also op-tables.json -> character-tables.json since that's what it is.
@rocky
rocky requested a review from mmatera February 3, 2026 02:29
Comment thread mathics/format/render/latex.py Outdated
sup_string = self.superindex.get_string_value()
# Handle derivatives
if sup_string == "\u2032":
if sup_string == named_characters["LeftDoubleBracket"]:

@mmatera mmatera Feb 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not "\[LeftDoubleBracket]" but "\[Prime]" (the derivative, see comment above)

(
String("\u301A"),
String("\u301B"),
String(named_characters["LeftDoubleBracket"]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes a lot of sense, thanks!

Comment thread mathics/format/render/latex.py Outdated
if sup_string == named_characters["LeftDoubleBracket"]:
return "%s'" % tex1
if sup_string == "\u2032\u2032":
if sup_string == named_characters["LeftDoubleBracket"] * 2:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is This is not "\[LeftDoubleBracket]\[LeftDoubleBracket]" but "\[Prime]\[Prime]" (the derivative, see comment above)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmatera, thanks for the correction. Is this correct now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, thanks!

@mmatera mmatera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the two wrong names, LGTM

@rocky
rocky merged commit 7d33b83 into improve_latex_form Feb 3, 2026
16 checks passed
@rocky
rocky deleted the improve_latex_form-using-named-characters branch February 3, 2026 10:53
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

Successfully merging this pull request may close these issues.

2 participants