Home>Support>Pagebuidler and mathjax (latex)

Pagebuidler and mathjax (latex)

I am exploring using pagebuilder for a web site but have run into a problem. I want to display mathematics, written using LaTeX and using the MathJAX plugin (http://www.mathjax.org/ ). The is written in stadnard ASCII test but uses a lot of ‘escape characters to activate special display code:

[latex] i hbar frac {partial} {partial t} left| Psi(t) right>=H left| Psi(t) right> [/latex]

The problem I am having is that Pagebuilder strips off all of the ” characters. This breaks the math display code.

I have tried cut-and-paste as well as manually entering the code and the same thing happens. The only way I can get this text to display is to convert from Pagebuilder back to HTML code and then enter the math code. This removes most of the advantages of using PageBuilder.

Is there any way to stop Pagebuilder from removing the ” characters?

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi Nicholas

    Thanks for reaching out. Not something we’ve tested yet. Can you perhaps try the Latext Jetpack module and use that in conjunction with the Visual Editor widget.

    http://jetpack.me/support/beautiful-math-with-latex/

    Let me know how that goes.

  2. 9 years, 9 months ago Nicholas Birkett

    The issue isn’t with the display module. It is to do with the editing applied by Pagebuilder to the text which I input. It removes the ‘back-slash’ characters from my typing. I see that your forum box also removed them (replacing my quote-back-slash-quote typing with a single double-quote. It is that behaviour which I need to change.

    No LateX plugin will work if the editor removes the key character (the back-slash) which is needed to define the function to be applied.

    What I need is someway to prevent the Pagebuilder editor from removing the back-slashes from the typing.

  3. 9 years, 9 months ago Nicholas Birkett

    To be a bit clearer:
    1) Define a text box using Pagebuilder.
    2) Type in the following text: [latex] \dot{x} = \sigma(y-x) {/latex] {There is a back-slash before the words ‘dot’ and ‘sigma’}
    3) Save the text box.
    4) Click the ‘pen’ to edit the text box.
    5) The ‘back-slash ‘ has been removed from the typing

    Even if I put my text between ‘

     and 

    tags the back-slashes are removed. And, for some of the text, I need two back-slashes in a row. These are replaced by one back-slash.

    I tried putting two back-slashes in a row. This leaves one back-slash when I re-edit the text box the first time. But, if I re-edit it a second time, the back-slashes are all removed.

    As I said, this is a function of the editing box which needs a work-around.
    Nick

  4. 9 years, 9 months ago Nicholas Birkett

    That middle line should read: [ c o d e ] and [ / c o d e ]

    Clearly, your editor is interpreting attempts to type text as being commands which it is interpreting. While useful in some settings, we need a way to disable it in other setting.

  5. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the feedback. I did some more digging now. The challenge is using LaTeX in widgets in general. So for example, the Jetpack module works great in posts or pages but not in a regular Text widget in my sidebar. We can troubleshoot Page Builder widget issues by first checking, can we get this to work in a widget in a regular widget area first? If we’re not winning there then we won’t win in Page Builder.

    Here is a thread on the problem: http://en.forums.wordpress.com/topic/latex-equation-in-text-widget-1?replies=10.

  6. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    So to confirm, the Text widget or the Visual Editor widget – Page Builder isn’t handling those, the same problems occur outside of Page Builder within those widgets.

  7. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Win! I have one for you. Please try:

    https://wordpress.org/plugins/wp-latex/

    Then use the Visual Editor widget or the Text widget to insert your code in the following format:

    [latex]e^{\i \pi} + 1 = 0[/latex]
    

    Hope that helps. Works on my side.

  8. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    In regular widget areas like the sidebar or footer, only the Visual Editor widget works. But in Page Builder, both the Visual Editor and Text widgets work.

  9. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Also works with the original equation you asked about:

    [latex] i hbar frac {partial} {partial t} left| Psi(t) right>=H left| Psi(t) right> [/latex]
    
  10. 9 years, 9 months ago Nicholas Birkett

    Thank for the additional information but I’m not sure that fixes my problem.

    If I type my equation into the standard WordPress editor (visual or text), it display correctly on my site.

    If I then click the Pagebuilder icon, it creates a text box. However, when I open the box, the back-slash characters have all been deleted.

    BTW, I am using WordPress 4.1 if that matters.

  11. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    For sure.

    Ok, so to confirm, have you installed the following plugin?

    https://wordpress.org/plugins/wp-latex/

    And are using it’s shortcode?

    [latex] [/latex]

  12. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Ahh right, I see what you’re saying. What’s most likely happening here is you’re automatically copying content across. It won’t have the shortcode in that case. Please try starting from scratch in Page Builder and run through the steps I outlined above.

    Thanks.

  13. 9 years, 9 months ago Nicholas Birkett

    Yes and yes (to the plugin question). But, I prefer the display from the other plugin.

    I did start a new page from scratch. Typed in the equation code to the WordPress editot before activating Pagebuilder. That worked fine. Then, when I active Pagebuilder, the back-slashes are removed and the equation won’t display properly, even with wp-latex. I typed nothing into the pagebuilder text field – it just convert the standrad WP text into its field.

    BTW, this works fine with Visual Composer.

    All I want is a way to stop the back-slashes from being removed.

  14. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Unfortunately right now all I can offer is handling it from scratch using the plugin I suggested. Getting the migration process from Visual into Page Builder would be a longer term request. Since I’ve worked with SiteOrigin this is the first request we’ve looked at with LaTeX so it’s unfortunately, unlikely this would become a priority request. Don’t mean to shoot it down at all, just that development requests mostly get weighted on the popularity of their uptake.

    Let me make you a quick video just to quickly confirm the method I’m using for this.

  15. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Just out of interest. This plugin I’ve suggested is converting the equations into images. In Vantage Premium you can turn off Image Shadow and Rounding under Appearance > Customize > Page. In Vantage Free you can disable Image Shadow and Rounding by inserting the following into a Custom CSS module/plugin:

    /* Vantage Remove Image Shadow and Rounding */
    
    .entry-content img { -webkit-border-radius: 0 !important; -moz-border-radius: 0 !important; border-radius: 0 !important; -webkit-box-shadow: none !important; -moz-box-shadow: none !important; box-shadow: none !important }
    
  16. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Sorry for jumping around so much here. I’m doing more than I should at once.

    Mathjax plugin works nicely with Visual Editor and Text widget, just not on copy. I’ve logged your bug. Thanks again for reporting!

    Phew, less multi-tasking for me! My bad.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More