Code LateX in courses (front-end)

Home Forums Legacy Support Support queries Other issues Code LateX in courses (front-end)

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #70159
    MPR1
    Participant
    Hi, I want to use LateX code for math courses, I'm using jetpack beautiful. When i edit in admin, it's working fine, but edit in front-end courses with ajax remove all backslash :(. Do you have a solution ?
    #70201
    Anshuman Sahu
    Keymaster
    Please try adding the latex shortcodes in text mode of wp-editor : http://prntscr.com/ch3vll
    #70210
    MPR1
    Participant
    Hi alex, Alredy try, it's doesn't work :(. I write [latex]d = \frac{1} {2}gt^2,d \;\text{in meters}[/latex], and after saving, in database i have => d = frac{1} {2}gt^2,d ;text{in meters}. :(
    #70353
    Anshuman Sahu
    Keymaster
    I was not able to replicate the issue at my test site please refer : http://screencast-o-matic.com/watch/cDQIlajl2t Can you please try deactivating third party plugins and check again . If above does not helps then please share your site url and admin credentials to check the issue at your end .
    #70366
    MPR1
    Participant
    Hi Alex, In your test, you obtain d = frac{1} {2}gt^2,d ;text{in meters} But you should have d = \frac{1}{2}gt^2,d \;\text{in meters}. In front-end, the ajax removes backslahes.   Result with backslahes =>  Result without backslahes =>  Best regards, MPR
    #70486
    Anshuman Sahu
    Keymaster
    I guess this is an issue related to the wordpress itself coz we do not make any changes while saving the contents .Can you please check this on wordpress default 2015 theme in from end editor just like  that of the bbpress ?
    #71266
    MPR1
    Participant
    Hi Alex, It's the same on wordpress default 2015. But I noticed that i write 4 backslahes (\\\\) I get one \ . (only with ajax validation courses process) MPR
    #71420
    Anshuman Sahu
    Keymaster
    Ok I was able to replicate the issue on my test site . YEs the backslash was stripping in front end course creation . And also you observation is correct for putting four backslashes to make the shortcode to work. The problem is in front end editor post content is sent in the form of json data and it adds double slashes instead of one slash in it for which to handle we need to use the php stripslashes function to strip the slashes . Now we cannot remove this stripslashes coz if we do that ,then all the slashes will be saved that is added in the json data forcefully. So I would recommend to use the back end editor for the latex or use four slashes if using front end editor .
    #71738
    MPR1
    Participant
    Ok thanks Alex :(
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Code LateX in courses (front-end)’ is closed to new replies.