ros-infrastructure / roswiki

Plugins and configurations for wiki.ros.org
wiki.ros.org
24 stars 19 forks source link

Issue rendering Latex #301

Closed kscottz closed 3 years ago

kscottz commented 4 years ago

From Discourse:

Hello, guys. Seems like http://wiki.ros.org/ have a problem with latex. For example http://wiki.ros.org/urdf/XML/link

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

[Thu May 21 13:47:31.879340 2020] [:error] [pid 27586] failed to exec() latex

I don’t know how to contact admin of this site. Please, help me

tfoote commented 4 years ago

When we migrated hosting I think that LaTeX wasn't installed on the new host. As part of our process for moving the wiki forward we're trying to slowly trim away. I'd like to suggest that we consider replacing the few instances of the use of this plugin so that we don't need to support it in the future. There appear to be only 86 instances used at the moment which is a reasonable amount to consider replacing.

I collected a search of the wiki text and here's the results: https://gist.github.com/tfoote/86bbfcec99e66b7487a255ba28ac3a07

Which filters down to just 18 pages of which several are translations which can get the same changes.

And many of the usages are just using the pretty text rendering of things like (x, y, x) urdf(2f)XML(2f)link:50: . Represents the <<latex($$x,y,z$$)>> offset.

$ wc -l /tmp/latex_instances.txt 
86 
$ grep -v XML /tmp/latex_instances.txt | wc -l
70
$ grep -v XML /tmp/latex_instances.txt | grep -v ODE | wc -l
45
$ grep -v XML /tmp/latex_instances.txt | grep -v ODE | grep -v pr2_mechan | wc -l
17
$ grep -v XML /tmp/latex_instances.txt | grep -v ODE | grep -v pr2_mechan | grep -v filters | wc -l
8
$ cat /tmp/latex_instances.txt | awk -F: '{print $1}' | uniq 
rcpdf(2f)XML(2f)Contact(20)elements
filters(2f)TransferFunctionFilter
filters(2f)MedianFilter
urdf(2f)XML(2f)sensor(2f)proposals
pr2_gazebo_plugins(2f)RosStereoCamera
pr2_mechanism_model(2f)pr2_gripper_transmission
filters(2f)IncrementFilter
urdf(2f)XML(2f)joint
tf(2f)Tutorials(2f)Introduction(20)to(20)tf
urdf(2f)XML(2f)sensor
laser_filters
physics_ode(2f)ODE
tf2(2f)Tutorials(2f)Introduction(20)to(20)tf2
urdf(2f)XML(2f)link
filters(2f)MeanFilter
usdf(2f)Reviews(2f)scene_state
ja(2f)tf(2f)Tutorials(2f)Introduction(20)to(20)tf
cn(2f)urdf(2f)XML(2f)joint
$ cat /tmp/latex_instances.txt | awk -F: '{print $1}' | uniq | wc -l
18
marcelino-pensa commented 3 years ago

@tfoote what is the suggested alternative? Should we just not use latex anymore? Is there a workaround? The wiki on how to write a wiki still documents the usage of latex, even though it is no longer usable. Should that section be deleted? Maybe we should add some comments there explaining that it isn't supported anymore, with guidelines on how to substitute it with something else... suggestions?

tfoote commented 3 years ago

I removed the documentation of the content http://wiki.ros.org/action/diff/WritingTutorials?action=diff&rev1=123&rev2=124

Yes unfortunately with the low usage I'm going to recommend that we not use latex anymore. You can write it out in text or otherwise. The wiki is mostly for developer documentation and as such we don't need highly complicated math markup. If necessary you could make an image of the results of latex. But in general I think you should be able to describe things without it maybe slightly more verbosely. But if we currently only have something like 0.18% of pages using it and they're for moderately simple things.

I've closed out several of them. 1 2 3 4 5

With that taking out a non-trivial amount of the changes. Hopefully people will contribute fixes to the existing documentation to use alternative rendering. I'm going to close this out for now finalizing that we don't support Latex.

ros-discourse commented 2 years ago

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/latex-rendering-errors-in-ros-wiki/25404/2