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

User-defined macros can't print to html correctly #579

Closed
bluethon opened this issue Dec 17, 2019 · 3 comments
Closed

User-defined macros can't print to html correctly #579

bluethon opened this issue Dec 17, 2019 · 3 comments
Labels
Issue: Bug Needs Tag fix Does not meet label requirements.

Comments

@bluethon
Copy link

What is the problem?

I have defined some macros in my user config, it preview in editor well, but when I print the file to HTML, it can't convert correctly, I have read #426, I have test it's code, but have the same issue

How can I reproduce it?

set the macro

    "markdown.extension.katex.macros": {
        "\\ci": "\\raisebox{.5pt}{\\textcircled{\\raisebox{-.9pt} {#1}}}",
    },

in markdown input

$$
\ci{1} \\
\raisebox{.5pt}{\textcircled{\raisebox{-.9pt} {1}}}
$$

in preview
image
but in browser
image

Is there any error message in the console?

No

yzhang-gh pushed a commit that referenced this issue Dec 17, 2019
@yzhang-gh
Copy link
Owner

Good catch. This is caused by a stupid mistake (the same as #473).

It should be fixed in the dev build now.

@PaperCube
Copy link

By the way, \global\def doesn't persist between math expressions as described in Katex Official Documentation unless at least one macro is defined in Settings, which I guess is a bug as well.

@yzhang-gh
Copy link
Owner

@PaperCube It doesn't look like a similar bug. Can you open a new issue and also provide a minimal working example? (A possible reason is we are still using KaTeX 0.10.0.)

@Lemmingh Lemmingh added the Needs Tag fix Does not meet label requirements. label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Bug Needs Tag fix Does not meet label requirements.
Projects
None yet
Development

No branches or pull requests

4 participants