Moodle Community Sites

TeX filter not working correctly on moodle.org forums

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Component/s: moodle.org
  • Labels:
    None

Description

I posted a TeX notation formula ($$ sqrt( x + y ) $$) on Finnish Moodle (http://moodle.org/mod/forum/discuss.php?d=111435&parent=489223#p489512).

The sqrt was not converted to the graphical square root sign, it is still shown as text. On my test Moodle sites this same equation works. It is also the first example at http://docs.moodle.org/en/TeX_filter.

Activity

Hide
Helen Foster added a comment -

Samuli, thanks for your report. Just wondering whether Mauno provided an answer in the discussion http://moodle.org/mod/forum/discuss.php?d=111435&parent=489223#p489512 ?

Show
Helen Foster added a comment - Samuli, thanks for your report. Just wondering whether Mauno provided an answer in the discussion http://moodle.org/mod/forum/discuss.php?d=111435&parent=489223#p489512 ?
Hide
Samuli Karevaara added a comment -

Basically he/we noticed that $$ \sqrt{x-\sqrt{x}} $$ works but the example cited at http://docs.moodle.org/en/TeX_filter ($$ sqrt( x + y ) $$) doesn't work on moodle.org, but works on my local Moodle. I'm a bit puzzled about the different TeX notations.

Show
Samuli Karevaara added a comment - Basically he/we noticed that $$ \sqrt{x-\sqrt{x}} $$ works but the example cited at http://docs.moodle.org/en/TeX_filter ($$ sqrt( x + y ) $$) doesn't work on moodle.org, but works on my local Moodle. I'm a bit puzzled about the different TeX notations.
Hide
Helen Foster added a comment -

Thanks Samuli, I'm just adding Mauno as a watcher...

Mauno, hope you don't mind being added as a watcher in case you have any further comments.

Show
Helen Foster added a comment - Thanks Samuli, I'm just adding Mauno as a watcher... Mauno, hope you don't mind being added as a watcher in case you have any further comments.
Hide
Helen Foster added a comment -

Reassigning to filters expert Eloy for investigation.

Show
Helen Foster added a comment - Reassigning to filters expert Eloy for investigation.
Hide
Mauno Korpelainen added a comment -

Well this is not really a bug - the correct way to write that formula is

$$ \sqrt{x + y} $$ with slash and if you want to have (x+y) inside squareroot it should be $$\sqrt{(x+y)}$$

We discussed this on Finnsh moodle forum with Samuli and Mimetex can in some cases parse sqrt also without slash \ but it is not a common rule.

For example in Tex Live sqrt never works without slash and in http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf the only correct syntax given for LATEX is \sqrt

Show
Mauno Korpelainen added a comment - Well this is not really a bug - the correct way to write that formula is $$ \sqrt{x + y} $$ with slash and if you want to have (x+y) inside squareroot it should be $$\sqrt{(x+y)}$$ We discussed this on Finnsh moodle forum with Samuli and Mimetex can in some cases parse sqrt also without slash \ but it is not a common rule. For example in Tex Live sqrt never works without slash and in http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf the only correct syntax given for LATEX is \sqrt
Hide
Mauno Korpelainen added a comment -

... and Mimetex has some other custom features that do not work the same way as in other versions of Latex - and all versions of Latex have some custom dialects

The example in http://docs.moodle.org/en/TeX_filter should probably be changed from $$ sqrt( x + y ) $$ to $$ \sqrt{x + y} $$ to avoid confusion.

Show
Mauno Korpelainen added a comment - ... and Mimetex has some other custom features that do not work the same way as in other versions of Latex - and all versions of Latex have some custom dialects The example in http://docs.moodle.org/en/TeX_filter should probably be changed from $$ sqrt( x + y ) $$ to $$ \sqrt{x + y} $$ to avoid confusion.
Hide
Mauno Korpelainen added a comment -

I changed the confusing example in documentation to correct syntax.

Show
Mauno Korpelainen added a comment - I changed the confusing example in documentation to correct syntax.
Hide
Samuli Karevaara added a comment -

This can probably be closed then. Thanks Mauno! The fact that the (slightly) incorrect example worked in our Moodle confused me further.

Show
Samuli Karevaara added a comment - This can probably be closed then. Thanks Mauno! The fact that the (slightly) incorrect example worked in our Moodle confused me further.
Hide
Eloy Lafuente (stronk7) added a comment -

Closing as suggested. Thanks!

Show
Eloy Lafuente (stronk7) added a comment - Closing as suggested. Thanks!

Dates

  • Created:
    Updated:
    Resolved: