Doing Math in Discourse with Latex

@abhishek has kindly agreed to enable the math plugin for our itsFOSS forum posts. There is a description here

I think we have the default MathJax renderer. It based on Latex, but it is only the math rendering part of Latex, not a full Latex.

It is not as if we need to use equations in our replies, but it could be useful occasionally for simple bits of algebra

Example 1:
If I type in

The area of a circle is $\pi r{^2}$

I get
The area of a circle is $\pi r{^2}$

That is the way to do math in the middle of a sentence… enclose it in $ symbols.

Example2:
Suppose I want a block of equations.
If I type

$$
x = \frac{y + z/2}{y^{2}+1
z = \sqrt{x + y}
$$

I get
$$
x = \frac{y + z/2}{y^{2}+1} \
z = \sqrt{x + y}
$$

For those not familiar with Latex math cheat sheet here

and the fullLatex documentation is the classic book

I

Do not expect to be able to do non-math Latex commands such as tables. It does not work.

6 Likes

Thanks to you both for that option.

Dont think i will ever need it, i only do simple calculations… take my shoes and socks off and i can count to 37 !

2 Likes

You can use it with numbers instead of symbols

so 37/2 = 18.5 is the answer

That came from

so $37/2 = 18.5$ is the answer

Notice the numbers are a different font compared to

so 37/2 = 18.5 is the answer

1 Like

Does it do all the currency symbols as well £€ etc

\pounds 24

Yep, it works

\texteuro 345
\euro does not work ?

According to this
https://docs.mathjax.org/en/latest/input/tex/macros/index.html
\texteuro should work
but it does not work for me here

1 Like

The symbols available in MathJax are summarised here

1 Like

Haha, counting to 37 is already a pretty useful skill! At least you’ve got a built-in calculator whenever you need one.

2 Likes

I kinda hate maths - but - I’m curious why you wrote “math” instead of “maths” as most people in Australia and the UK describe it - or “mathematics” or “arithmetic”?

Did you choose “math” because that’s commonly what North Americans call “maths”?

2 Likes

Reported for generating a headache. :sweat_smile:

2 Likes

I do ralt+5 to get €

1 Like

As far as I know, US people say and write Math.

They always need to do things differently.

However: Let’s try this plugin! Can you prove that:

\prod_{n=2}^{\infty} \frac{1}{1-(\frac{1}{n})^2} = 2
2 Likes

Welcome back mina long time no see.

1 Like

Hi Paul!

Nice to see you still around.

Actually, I had pretty much forgotten about the forum (despite still reading the Newsletter), but I just happened to stumble about a Social Media post where somebody was stating that they hated the site for “promoting OmarchySLOP” (whatever this means), and I thought:

Why not do as I did before and keep the forum tab open?

There’s always something interesting to read.

2 Likes

Hi Mina,
Nice to hear from you .
Maybe you can help with some of our challenges … like what to do with posts about AI generated software?
Regards
Neville

2 Likes

I’ll try to do my best, but let me first get familiarised again with the moment’s hot topics.

I am not against ai generated software per se, but most of what I see has been coded pretty carelessly, and I don’t think, it even deserves to exist.

2 Likes

Yes. We have rejected quite a few posts of that type of thing.
I allowed a few recently that were marginal … you will see the furious debate which ensued.

2 Likes

I can imagine!

2 Likes

That’s correct. Nice to see you and come back again.

2 Likes