• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Additional language for [code=...] bbcode

Additional language for [code=...] bbcode

Andy.N

Well-known member
#2
Great tutorial. This will be handy as i want to add latex and c++ to my site.
Questions.
How come latex does not render and just color? Im using mathjax js to render them.
What do i need to do to get the code bbcode to default to c++ and the rest needs to specify?
 

Andy.N

Well-known member
#5
Thanks for the great guide. We are probably among few that use latex.
I guess you need to prohibit MathJax to render LaTeX code in pre.bbCodeCode code elements. This can be done vie configuration .js file.
Just to clarify, I have mathjax on XF 1.5 and plan to remove them when moving to XF 2. i have a test site with xf2 and try to see how it will render. It appears from your example that prism will not render latex. Can you confirm?
 

CMTV

Active member
#6
It seems you are right. MathJax do not touch the code inside pre code elements. No need to edit it's config file!
math_jax_code.png
 

CMTV

Active member
#9
MathJax renders math: LaTeX code -> Fancy math
PrismJS simply highlights the code (including LaTeX code). No render work. It serves a different purpose.