Open yd278 opened 1 year ago
Thanks for the feedback. Could you provide a minimal reproduction example?
example.zip Hi, just realized I accidentally typed "printing to pdf" in the title as I meant to say "printing to html", hope that doesn't cause any misunderstanding.
As for the example, the ".vscode" folder contains my macro configuration, problems concurred on line 114 (and below) as it described previously.
Thank you for your reply
Thanks. Will try to have a look this weekend.
Which VS Code and extension versions are you using? The exported HTML looks alright on my machine.
Hi. the extension version is v3.5.1 and vscode version is 1.78.1
Since I had this issue on both my pc and mac, could that be a KaTeX issue as you may set some extra configurations so it works well on your machine?
I probably know the reason. Can you open https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css in your browser? Some network resources may not be correctly loaded.
May be related: #1127
Hi, Yes I can open it.
May I know is there a debug mode so I can print out logs on my machine? That may help.
You can press F12 to open the console of the browser, and see whether there is any error.
Hi,
The browser console doesn't give any error.
I directly open the html file in a text editor and see the ParseError
hence I believe that should be static.
Is there any way I can check the log of the plugin? Especially when generating the html file.
It is menubar > help > toggle developer tools
Since the original author stopped commenting, I will take it from here.
I made the following tiny example: macros.zip
When I use the command directly, it works. When I use it via a macro, it errors out. That would suggest it can't be a CDN fault. The error is already present in the generated HTML.
still works well on my machine.
I checked my settings and guess that might be because you have the VS Code's built-in math support enabled.
That works. Thank you for your time!
@.***
From: Yu Zhang Date: 2023-07-02 07:23 To: yzhang-gh/vscode-markdown CC: Y. Ding; Comment Subject: Re: [yzhang-gh/vscode-markdown] katex macros not correctly rendered when printing to pdf (Issue #1274) still works well on my machine. I checked my settings and guess that might be because you have the VS Code's built-in math support enabled. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
I checked my settings and guess that might be because you have the VS Code's built-in math support enabled.
Yes, this was the cause. It works now, thanks!
Hi all. If I've understood correctly, a fix has been found?
I've tried disabling markdown.math.enabled
and markdown.extension.math.enabled
, but my HTML outputs still don't render some symbols properly.
F12 in the browser provides the following information.
The math symbols render properly in the VSCode previewer, as per other people's experiences.
I've tried disabling
markdown.math.enabled
andmarkdown.extension.math.enabled
, but my HTML outputs still don't render some symbols properly.
Only set markdown.math.enabled
to false. Leave markdown.extension.math.enabled
set to true (the default).
I've made a mistake, I've been confusing Markdown+Math rendering with this extension, and have been previewing my KaTeX renders in VSCode without issues, but have been using this extension's HTML exporting, expecting the KaTeX renders.
Markdown+Math provides the option of setting KateX macros in a .json
file, which suits my use case, and I just realised they have a HTML exporting option as well, I'll use theirs.
Thanks for getting back to me.
What's the problem
I set costumed katex macros and it works perfectly fine when I preview it in vscode. However when I print that to html it says
What's the expected result
The html file should be rendered as the same as the preview in vsc
How to reproduce
Other information
I encountered this issue on both mac and pc
plugin version : v3.5.1 vscode version: 1.78.1 (user setup)