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

report unsupported macros by katex and expand user-define commands #99

Merged
merged 16 commits into from
Jun 12, 2024

Conversation

renee-k
Copy link
Contributor

@renee-k renee-k commented May 26, 2024

The reportMacrosUnsupportedByKatex function will return a list of all macros in math mode that aren't supported by Katex within the AST passed in as input. The ExpandUserDefinedMacros function will expand user-defined commands such as from \newcommand, \renewcommand, etc., modifying the AST passed in as input.

@renee-k renee-k changed the title WIP: report unsupported macros by katex and expand user-define commands [WIP] report unsupported macros by katex and expand user-define commands May 26, 2024
@renee-k renee-k changed the title [WIP] report unsupported macros by katex and expand user-define commands report unsupported macros by katex and expand user-define commands Jun 9, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

The code visits all the nodes and returns a list of macros' content which are not supported by katex in math mode.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the unsupported macro which is being pushed to the list, is it just the name of the macro or as well as its parameters?

Copy link
Contributor

Choose a reason for hiding this comment

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

The code returns macros that is newly defined by the user and expands them. macroInfo collects the information of the anything that is of new commends, which is implmented as part of the "../uified-latex-util-macros". is Object.fromEntries used to integrate everything into a string? The needToExpand function visits all the nodes and checks if it has nodes and if the content match, why is that?

@siefkenj siefkenj merged commit d5cbad9 into siefkenj:pretext Jun 12, 2024
2 checks passed
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.

3 participants