unverbuggt / mkdocs-encryptcontent-plugin

A MkDocs plugin that encrypt/decrypt markdown content with AES

Home Page:https://unverbuggt.github.io/mkdocs-encryptcontent-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to render math formula on the protected page

luzai opened this issue · comments

commented

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?

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.

commented

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.

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.

commented

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

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

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

I opening new issue for this : #14

Need to keep issue tracking clear as i can :)