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

Support KaTeX in help page viewer #1213

Merged
merged 5 commits into from
Oct 8, 2022

Conversation

renkun-ken
Copy link
Member

What problem did you solve?

Closes #1207

In the HTML of R help pages, the katex JS/CSS resource urls are transformed so that they can be properly loaded in the webview:

<link rel="stylesheet" href="/doc/html/katex/katex.css">
<script type="text/javascript" src="/doc/html/katex-config.js"></script>
<script defer="" src="/doc/html/katex/katex.js" onload="processMathHTML();"></script>

these are replaced with

<link rel="stylesheet" href="http://localhost:<port>/doc/html/katex/katex.css">
<script type="text/javascript" src="http://localhost:<port>/doc/html/katex-config.js"></script>
<script defer="" src="http://localhost:<port>/doc/html/katex/katex.js" onload="processMathHTML();"></script>

where http://localhost:<port> is provided by the R help server running in the background.

(If you have)Screenshot

image

(If you do not have screenshot) How can I check this pull request?

Open a help page and see if the katex formulas are properly rendered.

?dt

@renkun-ken renkun-ken merged commit 161e16a into REditorSupport:master Oct 8, 2022
@renkun-ken
Copy link
Member Author

renkun-ken commented Oct 8, 2022

Looks like it does not work under remote development yet.

image

I'll take a closer look at this later.

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.

Equation rendering in HTML Help pages
1 participant