Latex rendering errors in ROS Wiki

Hello,
Tex rendering seems to be not working in the wiki
For example:
http://wiki.ros.org/urdf/XML/joint

or

http://wiki.ros.org/physics_ode/ODE

"latex error! exitcode was 2 (signal 0), transscript follows:

[Tue May 03 07:24:51.587258 2022] [:error] [pid 16279] failed to exec() latex"

Checking this in the internet archive shows that it might have stopped working some where in March/April 2019:
https://web.archive.org/web/20190310061608/http://wiki.ros.org/urdf/XML/joint
https://web.archive.org/web/20190409183806/http://wiki.ros.org/urdf/XML/joint

This is expected. We chose not to add back Latex support due to the performance hit of the plugin and minimal usage. See Issue rendering Latex · Issue #301 · ros-infrastructure/roswiki · GitHub for the thread.

And please consider contributing a fix for the few remaining wiki pages

It looks like we’re down to 12 pages using it.

cat /tmp/latex_instances.txt | awk -F: '{print $1}' | uniq
rcpdf(2f)XML(2f)Contact(20)elements
urdf(2f)XML(2f)sensor(2f)proposals
pr2_gazebo_plugins(2f)RosStereoCamera
filters(2f)IncrementFilter
urdf(2f)XML(2f)joint
urdf(2f)XML(2f)sensor
pr2_mechanism_model(2f)pr2_gripper_transmission
physics_ode(2f)ODE
tf2(2f)Tutorials(2f)Introduction(20)to(20)tf2
usdf(2f)Reviews(2f)scene_state
ja(2f)tf(2f)Tutorials(2f)Introduction(20)to(20)tf
cn(2f)urdf(2f)XML(2f)joint

I just cleared filters/IncrementFilter it generally only takes a minute or two.

How much control do we have over the site? Would we be able to add something to the html head? If so then we could probably use KaTeX which runs in the browser, so no dependency on the hosting machine.

We have control of the site. It’s definitely possible. However even doing that will require another plugin for the site to allow you to set the syntax and activate the KaTeX parser.

The site is currently at 17033 pages and Moin Moin is designed for about one 17th of that. As we are looking to be able to continue to scale up we are moving to new technologies for ROS 2 and so we’re not looking to add functionality to wiki.ros.org, but more to maintain it as it is and encourage new contributions elsewhere.

That’s not entirely correct. KaTeX auto-renders any latex code it finds on the page on page-load.

Happy to help with that if I can get access.

Unfortunately in the wiki you have to have markup to tell the moin moin engine to ignore it, otherwise wiki rendering will be applied to your LaTeX markup first and that’s not going to work well. You can use some forms of raw entry, but then there might be any of the special characters in raw code that might accidentally trigger the KaTeX engine. Such as potentially embedded content. And or content that you want to show the unrendered markup potentially, for example in the documentation of how to use LaTeX in your documentation, showing both the input and output. Moin Moin has a nice robust way to indicate languages and we should keep that user experience if we’re going to add this. In general I’d rather do it correctly or not do it at all, and not go half way.

You’re welcome to take a look at it. The wiki source is all here: GitHub - ros-infrastructure/roswiki: Plugins and configurations for wiki.ros.org However, I think that the value added of allowing LaTeX has been show to be quite low. In over 10 years we only had 18 usages out of thousands of pages when we triaged #301 and I personally wrote a non-trivial number of them.

The vagrant sandbox hasn’t been used much recently and may need some updating.
Note that you’ll also need to make sure it embeds properly in the exports for mirrors.