Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Rendering LaTeX Expressions with Alphabets Inside Braces in MathJax

  • modernity4r
  • modernity4r's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 months 3 weeks ago - 9 months 3 weeks ago #255179 by modernity4r
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.4.4+
Own server or LimeSurvey hosting: Both
Survey theme/template: Fruity
==================I'm encountering an issue while trying to render LaTeX expressions in MathJax, specifically when alphabets are enclosed within braces. For instance, expressions like
Code:
\(\overline{A}\)
or
Code:
\(\sqrt[3]{B}\)
are not displaying correctly. Expressions with numbers that do not use braces are rendered correctly. I've made sure that the MathJax script is properly loaded and my code seems syntactically correct. Here’s an example of the LaTeX expression I’m trying to render:

<script>
MathJax = {
  tex: {
    inlineMath: '$', '$'], ['\\(', '\\)'
  }
};
</script><script id="MathJax-script" async
  src=" cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js ">

<p>\(\overline{AP}\)</p>

 This expression is supposed to display the letter 'AP' with an overline, but it's not showing up as expected in the web page. Similar issues occur with other expressions where alphabets are placed inside braces.Any help or pointers would be greatly appreciated. Thank you in advance!
Last edit: 9 months 3 weeks ago by modernity4r.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
9 months 3 weeks ago #255186 by DenisChenu
{ } is used by Expression manager : then [AP} break : you can see it in red in logic file.
 

You have to add new line or a space to deactivate expression manager. Hoipefully seems js si OK with a space ?
 

 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: modernity4r

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago - 9 months 3 weeks ago #255220 by tpartner

Hoipefully seems js si OK with a space ?

Yep, I have done many surveys using MathJax (university math quizzes). The spaces are ignored.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 months 3 weeks ago by tpartner.
The following user(s) said Thank You: DenisChenu, modernity4r

Please Log in to join the conversation.

  • modernity4r
  • modernity4r's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 months 2 weeks ago #255269 by modernity4r
I am grateful to both Denis and Tony. I will remember it well.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose