• Resolved ThomasGrafikus

    (@walkingon)


    I’m sorry I need a little help on a very basic level, but I would be very grateful if someone could give me a little hand with the setup. I’m graphic designer, trying to set it up for a math teacher website.
    For a test, the teacher gave me an equation in .tex, which I assume is correct.

    After activating the plugin, I introduced the equation in the code with a shortcode between [katex].. [/katex]

    Like this:

    [katex]
    \documentclass{article}
    \usepackage[french]{babel}

    \begin{document}

    \begin{eqnarray*}
    \sum_{m = 1}^{^{\infty} _{} } & \sum_{m = n}^{^{m = \infty}} \frac{1}{m^2 }
    & _{_{}}
    \end{eqnarray*}

    \end{document}
    [/katex]

    I get an error message saying “Can’t find variable: katex”

    The test is in this link. The equation that shows is an image exported from the same .tex (that’s why I assume the .tex is correct.. )
    http://thomasgrafikus.com/equations

    I’m trying to figure out what is missing, or what is wrong.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Thomas Churchman

    (@beskhue)

    Hi,

    I’m sorry to hear about your troubles.

    There seem to be three issues here, one of which is causing the immediate error you’re seeing.

    1. The theme used on the page you linked is not including the KaTeX resources. The resources are enqueued by the plugin using normal WordPress hooks, so this seems to be an issue with this specific theme. This causes the error you’re seeing.

    Once you have fixed that, there’d be two other issues:

    2. The text given to KaTeX for rendering is a LaTeX document. KaTeX only supports TeX equations, not full LaTeX.
    3. eqnarray is not available in KaTeX. The equation could be rendered as desired with e.g. the following

    
    \begin{aligned}
    \sum_{m = 1}^{^{\infty} _{} } & \sum_{m = n}^{^{m = \infty}} \frac{1}{m^2}
    \end{aligned}
    

    Hope this helps!

    Thread Starter ThomasGrafikus

    (@walkingon)

    Hi,

    This helps a lot. I have rendered successfully the equation with your script using the normal wordpress.

    I was doing the test in a Blank page template of Thrive Architect (https://thrivethemes.com), which is the same family product than Elementor.

    They are interested in checking why it’s not compatible. I transmitted what you said about the KaTeX resources. I will let you know.

    Thank you very much!

    Thread Starter ThomasGrafikus

    (@walkingon)

    Hi,

    Regarding the theme and the Katex resources, Thrivetheme support answered it’s due to the fact that their “Landing page template” does not refer to any code from within the theme. So they ask if you could provide the code they should include into the Landing page.

    I copy here his as is (you are de developer he is referring to):
    “It seems that this is only happening within a landing page template. The developer is correct, everything is stripped when we are using Landing page template, it will not be referring to any codes from within the theme. Due to that, could you ask the developer if they can provide us some snippet of code that we can add within the header/footer of the specific landing page template for the shortcode to work?
    If they can provide one, we can try to add it within the custom code settings of the landing page, like so – https://share.getcloudapp.com/KourYx8A

    I hope this is usual for you!

    Thread Starter ThomasGrafikus

    (@walkingon)

    Regarding the equation itself, thanks to your feedback we could understand we where not editing it with the adequate tool. So now we did it with a simple Tex online editor and it’s fine. Thank you

    Plugin Author Thomas Churchman

    (@beskhue)

    I believe all that’s necessary is wp_head() in the head section and wp_footer() before the closing tags.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin setup’ is closed to new replies.