Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-04

Math expressions in wiki

22 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Werner Pamler

Does anybody know how to write mathematical expressions in the wiki? I would like to write an article on fpc's NumLib, but I would only want to begin this activity when I know how to enter complex mathematical formulas like integrals etc such that they are displayed decently.

Reply by email

ListMember
to Werner Pamler

Apparently, the FPC wiki uses the same software as Wikipedia; if so, the following links may be useful.

https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Mathematics#Using_HTML

https://en.wikipedia.org/wiki/Wikipedia:Mathematical_symbols https://en.wikipedia.org/wiki/List_of_mathematical_symbols

Werner Pamler wrote 7 lines
Does anybody know how to write mathematical expressions in the wiki? I would like to write an article on fpc's NumLib, but I would only want to begin this activity when I know how to enter complex mathematical formulas like integrals etc such that they are displayed decently. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Werner Pamler
to ListMember
ListMember wrote 8 lines

Yes I had found similar references myself, but neither they nor those above do work: If I insert

{{math|''x'' {{=}} −(''y''<sup>2</sup> + 2)}}

(copied from the first link above) into a wiki article and press "Show preview" it just displays Template:math in red. How do I activate this template?
|
|

Reply by email

Werner Pamler
to Giuliano Colla
Giuliano Colla wrote
Hope that it helps.

Not really... What I was seeking is a working example for something like

<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>

My naive assumption is that I'd just have to type this phrase into the wiki text to get this formula in perfect math notation. This example is taken from http://wiki.lazarus.freepascal.org/Help:Editing#emph, i.e. from the Lazarus/FPC wiki. I thought that this example should work. But it does not, the left column on this site should the code line again, not the correctly drawn mathematical formula, unlike the other examples
- see for example "Math characters" a few boxes higher.

It looks to me that something (the math template?) is missing from the Lazarus/FPC wiki infrastructure. If this is right, is there anybody I could contact?

Reply by email

Giuliano Colla
to Werner Pamler

Il 14/04/2017 22:08, Werner Pamler ha scritto:

It looks to me that something (the math template?) is missing from the Lazarus/FPC wiki infrastructure. If this is right, is there anybody I could contact?

Maybe I'm wrong, but I believe that you can either load the template from the infrastructure, or add it somehow in your page. That's what I gathered from a quick reading of the wiki Template reference.

Giuliano

Reply by email

Denis Kozlov
to Werner Pamler: Does anybody know how to write mathematical expressions in the wiki? I would like to…
Werner Pamler wrote
Does anybody know how to write mathematical expressions in the wiki? I would like to write an article on fpc's NumLib, but I would only want to begin this activity when I know how to enter complex mathematical formulas like integrals etc such that they are displayed decently.

MediaWiki requires a math rendering extension, such as: https://www.mediawiki.org/wiki/Extension:Math
https://www.mediawiki.org/wiki/Extension:SimpleMathJax

FPC/Lazarus wiki has no math rendering extensions installed, as you can see here:
http://wiki.freepascal.org/Special:Version

Installing Math extension is a bit of a pain because it usually requires a local rendering engine to be installed on the server.

I think you have 2 options:
1) Write your formulates using the wiki's standard notation <math>LaTeX</math>, and once a Math extension is installed (if ever), your formulas will be automatically rendered.
2) Generate visual rendering of your LaTeX formulates yourself, for example using http://latex2png.com/, and upload them as images with associated LaTeX code in comments.

Denis

Reply by email

Werner Pamler
to Denis Kozlov
Denis Kozlov wrote 7 lines
I think you have 2 options: 1) Write your formulates using the wiki's standard notation <math>LaTeX</math>, and once a Math extension is installed (if ever), your formulas will be automatically rendered. 2) Generate visual rendering of your LaTeX formulates yourself, for example using http://latex2png.com/, and upload them as images with associated LaTeX code in comments.

Thanks. Application of #2 is a bit complicated, but the results are very nice - see
http://wiki.lazarus.freepascal.org/NumLib_Documentation#Gamma_function. Which resolution would you recommend?

Reply by email

Vincent Snijders
to Denis Kozlov: MediaWiki requires a math rendering extension, such as:…

2017-04-15 18:59 GMT+02:00 Denis Kozlov :

Show quoted text 17 lines
On 14/04/2017 11:25, Werner Pamler wrote: > Does anybody know how to write mathematical expressions in the wiki? I > would like to write an article on fpc's NumLib, but I would only want to > begin this activity when I know how to enter complex mathematical formulas > like integrals etc such that they are displayed decently. > MediaWiki requires a math rendering extension, such as: https://www.mediawiki.org/wiki/Extension:Math https://www.mediawiki.org/wiki/Extension:SimpleMathJax FPC/Lazarus wiki has no math rendering extensions installed, as you can see here: http://wiki.freepascal.org/Special:Version

What math rendering extension do you recommend?

Show quoted text 12 lines
Installing Math extension is a bit of a pain because it usually requires a local rendering engine to be installed on the server. I think you have 2 options: 1) Write your formulates using the wiki's standard notation <math>LaTeX</math>, and once a Math extension is installed (if ever), your formulas will be automatically rendered. 2) Generate visual rendering of your LaTeX formulates yourself, for example using http://latex2png.com/, and upload them as images with associated LaTeX code in comments.

Vincent

Reply by email

Vincent Snijders
to Denis Kozlov: I recommend *SimpleMathJax* extension for its simplicity. It uses an external resource…

2017-04-17 18:17 GMT+02:00 Denis Kozlov :

Show quoted text 12 lines
On 15/04/2017 20:43, Vincent Snijders wrote: What math rendering extension do you recommend? I recommend *SimpleMathJax* extension for its simplicity. It uses an external resource (mathjax.org) and doesn't require a local rendering engine. https://www.mediawiki.org/wiki/Extension:SimpleMathJax

I will try to find time this week to install that extension.

With kind regards,
Vincent

Reply by email

Marco van de Voort
to Werner Pamler: Does anybody know how to write mathematical expressions in the wiki? I would like to…

In our previous episode, Werner Pamler said:

Does anybody know how to write mathematical expressions in the wiki? I would like to write an article on fpc's NumLib, but I would only want to begin this activity when I know how to enter complex mathematical formulas like integrals etc such that they are displayed decently.

Note that there is documentation, it is just Dutch and TeX (not latex but straight tex). Also, for some units the documentation sources are older than the pascal source.

See http://www.stack.nl/~marcov/numlib/

Reply by email

Werner Pamler
to Marco van de Voort
Marco van de Voort wrote
Note that there is documentation, it is just Dutch and TeX (not latex but straight tex). Also, for some units the documentation sources are older than the pascal source.

I know this source, I think you once had posted it in the German forum. Yes, I am a heavy user of "google.translate" at the moment...

Reply by email

Vincent Snijders
to Vincent Snijders: 2017-04-17 18:17 GMT+02:00 Denis Kozlov : I will try to find time this week to install…

2017-04-18 11:17 GMT+02:00 Vincent Snijders :

Show quoted text 20 lines
2017-04-17 18:17 GMT+02:00 Denis Kozlov : > On 15/04/2017 20:43, Vincent Snijders wrote: > > What math rendering extension do you recommend? > > > I recommend *SimpleMathJax* extension for its simplicity. It uses an > external resource (mathjax.org) and doesn't require a local rendering > engine. > > https://www.mediawiki.org/wiki/Extension:SimpleMathJax > > I will try to find time this week to install that extension.

I installed this extension with the default settings for size. See http://wiki.lazarus.freepascal.org/SANDBOX#Math.

Please, test if this is OK.

Vincent

Reply by email

Tomas Hajny
to Werner Pamler
Werner Pamler wrote 6 lines
Am 18.04.2017 um 21:42 schrieb Vincent Snijders: > I installed this extension with the default settings for size. See > http://wiki.lazarus.freepascal.org/SANDBOX#Math. Thank you. Works fine in Chrome, but when I open this page in Firefox I don't see the formula, only the header "Math" :-(

Which Firefox version? SeaMonkey shows it correctly (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46)...

Tomas

Reply by email

Werner Pamler
to Tomas Hajny
Tomas Hajny wrote 8 lines
On Tue, April 18, 2017 23:16, Werner Pamler wrote: > Am 18.04.2017 um 21:42 schrieb Vincent Snijders: >> I installed this extension with the default settings for size. See >> http://wiki.lazarus.freepascal.org/SANDBOX#Math. > Thank you. Works fine in Chrome, but when I open this page in Firefox I > don't see the formula, only the header "Math" :-( Which Firefox version? SeaMonkey shows it correctly (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46)...

v52.0.2 (Win10-64bit, Firefix is 32-bit). Any extensions needed?

Reply by email

Werner Pamler
to Tomas Hajny: Which Firefox version? SeaMonkey shows it correctly (Mozilla/5.0 (Windows NT 6.1; WOW64;…
Tomas Hajny wrote
Which Firefox version? SeaMonkey shows it correctly (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46)...

OK - found it: I have NoScript installed; if I remove the restrictions from the site the formulas show up (after some time).

There's a problem with Microsoft Edge: It wraps the inline formulas into new lines. But I think I can avoid inline formulas...

Reply by email