Moodle

Tex Filter Problem in 1.9.7???

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.7
  • Fix Version/s: None
  • Component/s: Maths filters
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

Some tex filter formats are not converted correct. See the demo glossary at http://moodle.org/mod/glossary/view.php?id=2190. In the first entry "Absolute Schriftgrössen" the font sizes are not converted correct. See column 'results'

It seems that other signs are also not correct.

Activity

Hide
Helen Foster added a comment -

Ralf, thanks for your report. Please could you confirm whether the problem affects moodle.org only or whether all 1.9.7 sites are affected.

Show
Helen Foster added a comment - Ralf, thanks for your report. Please could you confirm whether the problem affects moodle.org only or whether all 1.9.7 sites are affected.
Hide
Ralf Hilgenstock added a comment -

Helen,

seems to be a general problem. Tried it on other systems and at demo.moodle.org with same results.

Show
Ralf Hilgenstock added a comment - Helen, seems to be a general problem. Tried it on other systems and at demo.moodle.org with same results.
Hide
Helen Foster added a comment -

Thanks Ralf,

As it's a general problem, I'm going to convert this MDLSITE issue into an MDL issue.

If you've chance, perhaps you could post about the issue in the Mathematics Tools forum in Using Moodle to see if anyone has any ideas.

Show
Helen Foster added a comment - Thanks Ralf, As it's a general problem, I'm going to convert this MDLSITE issue into an MDL issue. If you've chance, perhaps you could post about the issue in the Mathematics Tools forum in Using Moodle to see if anyone has any ideas.
Hide
Mauno Korpelainen added a comment -

Font sizes \tiny, \small, \normalsize, \large, \Large and \LARGE are not common Latex or TeX commands - they work only in Mimetex.

There are a lot of such differences in different distributions of Latex - MathTran is using mostly original TeX, Mimetex has many custom tags that other distros do not understand at all and for example full version of Tex Live with all packages can use most of the commands and 5913 symbols mentioned in ftp://tug.ctan.org/pub/tex-archive/info/symbols/comprehensive/symbols-letter.pdf but none of these font sizes mentioned by Ralf.

Not a bug in TeX filter - it's a question of selecting "Language" for rendering Maths

Show
Mauno Korpelainen added a comment - Font sizes \tiny, \small, \normalsize, \large, \Large and \LARGE are not common Latex or TeX commands - they work only in Mimetex. There are a lot of such differences in different distributions of Latex - MathTran is using mostly original TeX, Mimetex has many custom tags that other distros do not understand at all and for example full version of Tex Live with all packages can use most of the commands and 5913 symbols mentioned in ftp://tug.ctan.org/pub/tex-archive/info/symbols/comprehensive/symbols-letter.pdf but none of these font sizes mentioned by Ralf. Not a bug in TeX filter - it's a question of selecting "Language" for rendering Maths
Hide
Mauno Korpelainen added a comment -

Moodle.org is using TeTeX so the examples used on moodle.org or demo.moodle.org should use TeTeX syntax.

Show
Mauno Korpelainen added a comment - Moodle.org is using TeTeX so the examples used on moodle.org or demo.moodle.org should use TeTeX syntax.
Hide
Mauno Korpelainen added a comment -

And fs0-fs7 are also pure mimetex fontsizes so examples like

$$(\begin{array}a_{\fs{0}1}\fs{3},&a_{\fs{0}2}\fs{3},&a_{\fs{0}3}\end{array})$$

can't work elsewhere than on sites using Mimetex to render TeX.

Show
Mauno Korpelainen added a comment - And fs0-fs7 are also pure mimetex fontsizes so examples like $$(\begin{array}a_{\fs{0}1}\fs{3},&a_{\fs{0}2}\fs{3},&a_{\fs{0}3}\end{array})$$ can't work elsewhere than on sites using Mimetex to render TeX.
Hide
Ralf Hilgenstock added a comment -

Hi Mauno

its confusing because they worked on the same servers before update to 1.9.7. We didn't cahnge anything on this system. What happend on http://moodle.org I don't know.

Ralf

Show
Ralf Hilgenstock added a comment - Hi Mauno its confusing because they worked on the same servers before update to 1.9.7. We didn't cahnge anything on this system. What happend on http://moodle.org I don't know. Ralf
Hide
Mauno Korpelainen added a comment -

Moodle.org did use Mimetex about half year ago but as far as I have understood they use TeTeX now - I might be wrong too...

Do you mean that those fontsize examples worked on moodle.org before or do you mean that they worked on your site before upgarde to moodle 1.9.7?

Show
Mauno Korpelainen added a comment - Moodle.org did use Mimetex about half year ago but as far as I have understood they use TeTeX now - I might be wrong too... Do you mean that those fontsize examples worked on moodle.org before or do you mean that they worked on your site before upgarde to moodle 1.9.7?
Hide
Mauno Korpelainen added a comment -

All moodles have mimetex in folder filter/tex and if they don't use local distribution of latex (MikTex, Tetex, Tex Live...) moodle should basicly use mimetex but only if site has given permission to execute mimetex executable file.

So basicly if rendering latex fails with local distribution...moodle could use also mimetex but most likely files of mimetex are not executable and they would be used only if executable files of local version of latex was not found...now when moodle.org is using TeTeX it uses only TeTeX syntax to render maths and TeTeX does not understand those font sizes...

Show
Mauno Korpelainen added a comment - All moodles have mimetex in folder filter/tex and if they don't use local distribution of latex (MikTex, Tetex, Tex Live...) moodle should basicly use mimetex but only if site has given permission to execute mimetex executable file. So basicly if rendering latex fails with local distribution...moodle could use also mimetex but most likely files of mimetex are not executable and they would be used only if executable files of local version of latex was not found...now when moodle.org is using TeTeX it uses only TeTeX syntax to render maths and TeTeX does not understand those font sizes...
Hide
Ralf Hilgenstock added a comment -

The examples are from a Moodle glossary built years ago to demonstrate Tex use in Moodle and also as reference. It worked at Moodle.org in German Moodle Course and also at our own systems since years.

I got a first information about problems from users ten days ago.

Show
Ralf Hilgenstock added a comment - The examples are from a Moodle glossary built years ago to demonstrate Tex use in Moodle and also as reference. It worked at Moodle.org in German Moodle Course and also at our own systems since years. I got a first information about problems from users ten days ago.
Hide
Mauno Korpelainen added a comment -

http://docs.moodle.org/en/Development:MediaWiki_TeX_test has some examples that probably work also elsewhere here (demo.moodle.org or moodle.org with TeX filter - Docs have a little different way to use Latex...

I may be wrong with these \tiny, \small, \normalsize, \large, \Large and \LARGE - mimetex is probably not the only distribution that can use them. These font sizes work also with mathTex http://www.forkosh.dreamhost.com/source_mathtex.html#fontsizedirective but not in the same notation. At least fs0-fs7 can't be used without mimetex.

Anyway tex filter does not change (La)TeX unless some symbols or commands are blacklisted - it only passes tex to renderer and what we see depend on the renderer (Mimetex, TeTeX, Tex Live, MikTex, macTex...)

Show
Mauno Korpelainen added a comment - http://docs.moodle.org/en/Development:MediaWiki_TeX_test has some examples that probably work also elsewhere here (demo.moodle.org or moodle.org with TeX filter - Docs have a little different way to use Latex... I may be wrong with these \tiny, \small, \normalsize, \large, \Large and \LARGE - mimetex is probably not the only distribution that can use them. These font sizes work also with mathTex http://www.forkosh.dreamhost.com/source_mathtex.html#fontsizedirective but not in the same notation. At least fs0-fs7 can't be used without mimetex. Anyway tex filter does not change (La)TeX unless some symbols or commands are blacklisted - it only passes tex to renderer and what we see depend on the renderer (Mimetex, TeTeX, Tex Live, MikTex, macTex...)
Hide
Mauno Korpelainen added a comment -

And I am sure that current moodle.org does not use Mimetex anymore ...

( It was used for years)

Show
Mauno Korpelainen added a comment - And I am sure that current moodle.org does not use Mimetex anymore ... ( It was used for years)
Hide
Mauno Korpelainen added a comment -

But I am not sure if for example Docs use TeTeX or Tex Live - Eloy might know for sure because he (and Jordan?) originally installed the new distribution of Latex to Docs and moodle.org elsewhere.

Show
Mauno Korpelainen added a comment - But I am not sure if for example Docs use TeTeX or Tex Live - Eloy might know for sure because he (and Jordan?) originally installed the new distribution of Latex to Docs and moodle.org elsewhere.
Hide
Ralf Krause added a comment -

In our MoodleTreff.de I get the correct sizes ... you may see it with a guest account.
http://www.moodletreff.de/course/view.php?id=40&topic=0#section-2

Show
Ralf Krause added a comment - In our MoodleTreff.de I get the correct sizes ... you may see it with a guest account. http://www.moodletreff.de/course/view.php?id=40&topic=0#section-2
Hide
Mauno Korpelainen added a comment -

http://www.moodletreff.de/course/view.php?id=40&topic=0#section-2 shows correct sizes for mimetex syntax because it uses mimetex syntax

In my opinion there are a couple possible ways to solve this glossary problem in German forum of moodle.org:

a) All examples in this Glossary could be changed to use such syntax that is similar on all environments - no matter if people use Mimetex, TeTeX, MikTex, MacTex or Tex Live.

Examples using f0, f1, f2, f3, f4, f5, f6 or f7 simply can't work with any other renderer than Mimetex because they are compiled only to mimetex. Other distributions of Latex or original TeX don't know such "language"

b) You could use plain images with image tags instead of tex filter for those tags in glossary that work only with Mimetex. You can for example go to http://www.forkosh.dreamhost.com/source_mimetex.html#preview - enter there the notation and save with mouse right click over image the problematic images and get them back to Glossary with editor image plugin.

c) It is possible to use scripts like our asciimath javascripts to force some delimiters render different image fallbacks using different external latex renderers - including cgi mimetex. But I don't believe that this is possible in moodle.org - for security policy.

Show
Mauno Korpelainen added a comment - http://www.moodletreff.de/course/view.php?id=40&topic=0#section-2 shows correct sizes for mimetex syntax because it uses mimetex syntax In my opinion there are a couple possible ways to solve this glossary problem in German forum of moodle.org: a) All examples in this Glossary could be changed to use such syntax that is similar on all environments - no matter if people use Mimetex, TeTeX, MikTex, MacTex or Tex Live. Examples using f0, f1, f2, f3, f4, f5, f6 or f7 simply can't work with any other renderer than Mimetex because they are compiled only to mimetex. Other distributions of Latex or original TeX don't know such "language" b) You could use plain images with image tags instead of tex filter for those tags in glossary that work only with Mimetex. You can for example go to http://www.forkosh.dreamhost.com/source_mimetex.html#preview - enter there the notation and save with mouse right click over image the problematic images and get them back to Glossary with editor image plugin. c) It is possible to use scripts like our asciimath javascripts to force some delimiters render different image fallbacks using different external latex renderers - including cgi mimetex. But I don't believe that this is possible in moodle.org - for security policy.
Hide
Mauno Korpelainen added a comment -

Attached for example the gif image created by Mimetex from notation

(\begin{array}a_{\fs{0}1}\fs{3},&a_{\fs{0}2}\fs{3},&a_{\fs{0}3}\end{array})

from that Glossary.

Note that you don't always need to define some font sizes - you could as well use for example

(\begin{array}a_{\!_1},&a_{\!_2},&a_{\!_3}\end{array})

to create almost the same result (subindex of tiny space and subindex for this) if normal subindex is too big

Show
Mauno Korpelainen added a comment - Attached for example the gif image created by Mimetex from notation (\begin{array}a_{\fs{0}1}\fs{3},&a_{\fs{0}2}\fs{3},&a_{\fs{0}3}\end{array}) from that Glossary. Note that you don't always need to define some font sizes - you could as well use for example (\begin{array}a_{\!_1},&a_{\!_2},&a_{\!_3}\end{array}) to create almost the same result (subindex of tiny space and subindex for this) if normal subindex is too big
Hide
Mauno Korpelainen added a comment -

Note 2: here in bug tracker you need to click that attachment to show it in browser without the black background...

Show
Mauno Korpelainen added a comment - Note 2: here in bug tracker you need to click that attachment to show it in browser without the black background...
Hide
Eloy Lafuente (stronk7) added a comment -

Just for confirmation, yup, Moodle Docs is using Tex Live full stack (MDLSITE-649)

Show
Eloy Lafuente (stronk7) added a comment - Just for confirmation, yup, Moodle Docs is using Tex Live full stack (MDLSITE-649)
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: