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

How to render math formula on the protected page #12

Closed
luzai opened this issue Nov 19, 2020 · 7 comments
Closed

How to render math formula on the protected page #12

luzai opened this issue Nov 19, 2020 · 7 comments
Assignees

Comments

@luzai
Copy link

luzai commented Nov 19, 2020

Hi, thank you very much for this plugin!

I would like to use it to protect some technical reports with math formulas, however, after entering the password, the formula cannot be rendered and is shown as raw text. Without password protection, the formula can be rendered. May I ask how to render math formula on the protected page?

@CoinK0in CoinK0in self-assigned this Nov 19, 2020
@CoinK0in
Copy link
Collaborator

CoinK0in commented Nov 19, 2020

Thanks for your feedback.

This plugin encrypts the content of a page after the Markdown text is rendered to HTML.
The HTML before and after decryption must be the same, so maybe you use some JavaScript to render your formula ?
If this assumption is correct, there is no way in the current version, but i can try to do something in decrypt-form.tpl.html

Could you give me other information on how the rendering of formulas works on your site ?
Maybe some examples that I can reproduce on my side to work on it.
Thanks.

@luzai
Copy link
Author

luzai commented Nov 20, 2020

Thank you very much for your reply!

I prepare a simple example here https://luzai.github.io/test-encrypted/, the password is 123456. The corresponding repo is https://github.com/luzai/test-encrypted.

Thank you.

@CoinK0in
Copy link
Collaborator

I added a detection of the Arithmatex module which, if present, should relaunch the rendering of the math equations.
No additional configuration is needed for Arithmatex support.

Version 0.0.13 improve math equation rendering.
All comments, improvements, corrections are welcome because I only validate the operation on the generic part of Arithmatex.

@luzai
Copy link
Author

luzai commented Nov 20, 2020

Thank you very much! I tested the new version with Arithmatex support, it renders the math equation successfully!

@CoinK0in
Copy link
Collaborator

CoinK0in commented Nov 20, 2020

I close this issue but feel free to reopen it or open an other one, if you have any trouble with this extension :)

@TQuantX
Copy link

TQuantX commented Jul 17, 2021

Hi,
sorry to bother you. I have tried to use it too, which seems to work. However, no updates, the lateX formulas stay in their lateX form, and the python file using pyodide do not appear, after the password is entered.
For instance

Could you help me ? I tried to do as you say in the readme.md file

@CoinK0in
Copy link
Collaborator

CoinK0in commented Jul 18, 2021

I opening new issue for this : #14

Need to keep issue tracking clear as i can :)

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

No branches or pull requests

3 participants