+1 vote
in CMS Tips by (63.7k points)

I am using the Jetpack plugin of WordPress to write LaTeX codes in my WordPress post. Per the syntax, I am supposed to write my LaTeX codes between '$latex' and '$'. 

$latex your-latex-code-here$

If I want to split LaTeX code between multiple lines between '$latex' and '$', it does not work. 

E.g.

$latex 

y = x^2 \\

z= k^2

$

does not work, whereas the following works.

$latex y = x^2 \\ z= k^2$

Is there any way to split the code into multiple lines?

1 Answer

+3 votes
by (13.2k points)
edited by
 
Best answer
It seems that you are using "paragraph" block to write LaTeX codes. When you use "paragraph" block and multiple lines, the syntax becomes broken. Jetpack understands that your code is between '' and '$' or '$latex' and '' and hence it does not render and convert code into your desired equation.

I would recommend to use Code block or Custom HTML block to write any LaTeX code in a post. This way, you can split your LaTeX codes into multiple lines and it will work. Try Code block and let me know if it worked.
by (63.7k points)
It worked in the Code block. Thanks

Related questions

+1 vote
1 answer
+1 vote
1 answer
+5 votes
1 answer

...