### This thread is resolved. Here is a description of the problem and solution.

Problem:

WP-KaTeX plugin - backward slashes in $shortcodes are removed in the translation. Solution: This issue is fixed with the current version of WPML version 4.2.8. Tagged: This topic contains 16 replies, has 2 voices. Last updated by Itamar 8 months, 2 weeks ago. Assigned support staff: Itamar. Author Posts July 21, 2019 at 8:29 am #4251663 amielR I am trying to: translate hidden link Link to a page where the issue can be seen: hidden link I expected to see: equations like on the original page: hidden link Instead, I got: symbol / removed from all latex code and the equations are all wrong July 21, 2019 at 1:46 pm #4252335 Itamar Supporter Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) Hi. Is this the plugin (WP-Katex) that you are using? https://wordpress.org/plugins/wp-katex/ If I understand correctly the problem is on the English page which is a translation of the Hebrew page. Is this correct? I'm not sure where I can see the problem of the missing forward-slash (/) symbol. Could you please attach a screenshot and explain to me exactly where the problem is? Thanks, Itamar. July 22, 2019 at 4:44 am #4253873 amielR Hi Itamar! Yes, this is the plugin I am using - https://wordpress.org/plugins/wp-katex/ and the problem is on the English page is it possible to ignore latex tags on translation? July 22, 2019 at 8:16 am #4254779 Itamar Supporter Languages: English (English ) Hebrew (עברית ) Timezone: Asia/Jerusalem (GMT+03:00) Hi. It seems that this is a compatibility issue with the WP-KaTeX plugin. This plugin is not officially compatible with WPML. You can check the full list of our compatible plugins here. https://wpml.org/documentation/plugins-compatibility/ Not being on this list does not mean that it is not compatible; it just means we do not know yet if it is. As for now, we can see that there is an issue with the LaTex tags. Can you please elaborate on what is the LaTex tags? I think that you are using shortcodes to insert those tags so maybe the issue is with the shortcodes. Are you using shortcodes for this? The way to handle compatibility issues with new plugins is to replicate the issue on a clean WordPress installation. After replicating this issue on a clean installation, I'll be able to consult and escalated, if needed, the issue to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link: hidden link Through this link, you will be automatically logged in. (If nobody logs in the test site will be available for one week from today.) Could you please install the WP-KaTeX plugin and see if the issue is replicable on a clean WordPress installation? Please configures WPML as it is configured on your site. Please also make sure that you are installing the latest version of the plugin. When done, please let me know what the results and where I can see them are. Thanks, Itamar. July 23, 2019 at 12:53 pm #4266051 amielR latex tags come at the beginning and the end of every math equation and it looks like that on the backend of every post: [latex display="true"]y=\frac{x}{2}+3, x=2-y^2$

and it looks like the attached image on the frontend.

i also did what you asked but i gor an error message trying to configure wpml as it is configured on my site

July 23, 2019 at 12:59 pm #4266151

amielR

i chose the classic wpml editor and made the english version just to see if the latex is working and it is not.

is it possible to ignore latex tags and the content between them as they are?
we need to translate all other text only

July 23, 2019 at 5:18 pm #4268383

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for trying my suggestions.

The issue indeed seems to be the removal of the backward slash (\) in the Translation Editor.
I have found a workaround for this. After you complete the translation in the Translation Editor, you need to manually edit the English translation and add the backward slash (\) before 'frac'. I've tried it here and it works.
What you need to do is to switch the language on the editing screen of the Hebrew post to English. Then you need to press 'ערוך בכל זאת' and you will be able to edit the English translation and add the (\). Then update the page.
Is this the only problem with 'latex' tags?
I ask it because now I want to escalate this issue to our compatibility team.

Regards,
Itamar.

July 25, 2019 at 9:32 am #4281323

amielR

all backward slashed were removed. not only before 'frac'.
they are required inside all latex tags

July 25, 2019 at 1:52 pm #4283819

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks.

I've now escalated this issue to our compatibility team and they will try to find a fix for this issue. I'll keep you updated here with any news regarding this issue.

Itamar.

July 25, 2019 at 4:31 pm #4285175

amielR

Thanks!
please make sure everything between latex tags stays the same

[latex display="true"] DO NOT CHANGE [/latex]

July 25, 2019 at 4:37 pm #4285193

amielR

because there are also problems with { and } and other signs

July 28, 2019 at 12:21 pm #4295475

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Thanks.

I've sent this additional information to our compatibility team.
I'll keep you updated here.

Best Regards,
Itamar.

July 29, 2019 at 2:40 pm #4300971

amielR

please let me know the estimated time for fixing this issue.
thanks! Amiel

July 30, 2019 at 1:37 pm #4308095

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Amiel.

Our second tier supporter came back to me regarding this issue. It seems that the issue of the backslash that is being removed in the Translation Editor is known to us and is escalated to our developers. The issue will be addressed in future versions of WPML. I have no ETA for when it will be ready.

Fortunately, our has a workaround for this issue. Here is what you need to do. When translating the posts that contain the $shortcode with a backslash (\) add another backslash in the translation side in the Translation Editor. For example, like so: [latex display="true"]y=\\frac{x}{2}+3, x=2-y^2$


This solves the problem on the front-end. Please note that if you update the post and then the translation, you would need to add a double backslash (\\) again.
Can you please try this workaround and tell me if it works for you?

Thanks,
Itamar.

August 13, 2019 at 3:04 pm #4389077

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Changing status to Escalated to developers.