How to Integrate WP LaTeX into Anspress

5.29K viewsWordPress
1

Greetings to all.

We are running an educational platform and so would like to enable users to enter mathematical or scientific symbols correctly while posting a question or writing an answer. We have installed WP LaTeX and tested it with Anspress but it’s not working. Inserting, for example, [latex]e^{\i \pi} + 1 = 0[/latex] which is supposed to work, does not work. Would be grateful if someone here can point us to the right direction on how to use this please. Thanks.

1

I guess you could either enable shortcodes in anspress (I have maybe seen something like that in this Q&A forum) or look what latex does when [latex] is called and call it manually in anspress.

In case you will spend a day or two trying to implement that and failing, I’d be willing to learn what you have found, what obstacles you can’t overcome, and help you.

It should probably be as easy as few lines of code, though.
Please share your results with us anyway.

Keep in mind that enabling shortcodes for anspress could mean security issues. Any user could execute any shortcode available for your site.

@Dima…as always…cherish your response and perspectives. Will let you know as we progress please. I think the code thing is what we will go for eventually if enabling shortcodes pose security issues for my site. It’s a multi educational site running LMS, Anspress, and lots of other plugins with tones of shortcodes so it may not be safe to allow shortcodes execution from front end in that manner. Will revert. Thanks.

I am thinking to add white list shortcode in AnsPress, Admin can select which shortcode should be rendered.

0

Shortcode is disabled in question and answer. You need to ask the author if there is any option for perg_match in contents.

@Rahul…thanks for replying. But…you meant preg_match, right? ‘Cos that’s what I find people talking about and not perg_match. Will revert as soon as I confirm from the author. Thanks.

Can somebody help here please. Confused. Somebody had this https://anspress.io/questions/question/equation-editor-latex-new-feature/ to say and yet it’s not working on my own site. Installed WP Latex as well. What do I need to do please. WP Latex working if I enter code in the normal wordpress text editor in the create new pages but not with AnsPress…