Author Topic: how does posting math notation work?  (Read 61162 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
how does posting math notation work?
« on: October 10, 2020, 08:26:15 am »
I'd like to post a question with a math formula. I think there is a way of doing it but see no instructions.
« Last Edit: October 10, 2020, 09:15:14 am by Simon »
 
The following users thanked this post: Ian.M

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #1 on: October 10, 2020, 08:33:13 am »
Go to MathJax sandbox to get your syntax right, for example like this: http://jbergknoff.github.io/mathjax-sandbox/#JCRjPVxzcXJ0e2FeMitiXjJ9JCQ%3D

Then paste the formula into your post surrounded by double dollar signs:
$$c=\sqrt{a^2+b^2}$$
The reason for using the sandbox is that preview doesn't work in the editor here, so you need to use an external tool to see what your formulas will look like before posting.
I'm a ChemE--I know all about the flow of fluids.
 
The following users thanked this post: Wimberleytech, timenutgoblin, Simon_RL

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: how does posting math notation work?
« Reply #2 on: October 10, 2020, 08:34:25 am »
Thank you.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: how does posting math notation work?
« Reply #3 on: October 10, 2020, 08:35:24 am »
But is there a list of notation codes somewhere? as it is I use two programs with different methods of doing the same thing, I am sure this will be a third.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #4 on: October 10, 2020, 08:38:57 am »
It's basically LaTeX math notation. I usually Google that to find tutorials and crib sheets.
« Last Edit: October 10, 2020, 08:45:41 am by IanB »
I'm a ChemE--I know all about the flow of fluids.
 
The following users thanked this post: wetzecam

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: how does posting math notation work?
« Reply #5 on: October 10, 2020, 08:41:31 am »
Ah OK, now I know what to google: https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols It's certainly not responding to the keywords that open office uses.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #6 on: October 10, 2020, 08:45:01 am »
This seems to be a good reference:

https://en.wikibooks.org/wiki/LaTeX/Mathematics
I'm a ChemE--I know all about the flow of fluids.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: how does posting math notation work?
« Reply #7 on: October 10, 2020, 08:48:02 am »
It's the long fraction line that seems to be missing, i think I have to use an over line on the denominator

No it's a \frac:

$$ \frac {3-2s} {s^2-4s+9}$$
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #8 on: October 10, 2020, 09:09:22 am »
You can do it either way. For example, this will work too:
Code: [Select]
{3-2s}\over{s^2-4s+9}$${3-2s}\over{s^2-4s+9}$$
I'm a ChemE--I know all about the flow of fluids.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 16067
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: how does posting math notation work?
« Reply #9 on: October 10, 2020, 09:11:03 am »
Ah, that is what I was hoping but did not see it. in Libre office you just write "over"
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 10474
Re: how does posting math notation work?
« Reply #10 on: October 10, 2020, 10:50:29 am »
Mathjax 2.7 documentation: http://docs.mathjax.org/en/v2.7-latest/
The original thread where Dave decided to enable Mathjax: https://www.eevblog.com/forum/suggestions/latex-for-eevblog/
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1728
  • Country: nl
Re: how does posting math notation work?
« Reply #11 on: October 12, 2020, 11:31:39 am »
Write it on a piece of paper.
Make a picture of it.
Post it.
 

Offline mathsquid

  • Regular Contributor
  • *
  • Posts: 229
  • Country: us
  • I like math.
Re: how does posting math notation work?
« Reply #12 on: October 13, 2020, 02:41:19 am »
So just put latex code in here and it works?

$$\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$$

Edit: Sweet.
 

Offline dnwheeler

  • Regular Contributor
  • *
  • Posts: 86
  • Country: us
Re: how does posting math notation work?
« Reply #13 on: October 13, 2020, 09:50:08 pm »
\over and \frac are not equivalent. There is even a visible difference in the examples above.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #14 on: October 14, 2020, 02:58:53 pm »
\over and \frac are not equivalent. There is even a visible difference in the examples above.

Using \frac:

$$\frac{3-2s}{s^2-4s+9}$$

Using \over:

$${3-2s}\over{s^2-4s+9}$$

I don't see any difference. How are they different?
I'm a ChemE--I know all about the flow of fluids.
 

Offline dnwheeler

  • Regular Contributor
  • *
  • Posts: 86
  • Country: us
Re: how does posting math notation work?
« Reply #15 on: October 14, 2020, 08:31:54 pm »
Interesting. It appears to be some sort of rendering issue. In the previous posts, the "frac" line is clearly 1 pixel higher than the "over" line. In your post, they look the same, but as I'm typing this, the copy of your message shown below the editor shows the "over" line 1 pixel higher.

FWIW, I see the same behavior on the Chromium version of Edge and with Chrome (on a Windows 10 system).

There are other technical differences discussed here: https://tex.stackexchange.com/questions/73822/what-is-the-difference-between-over-and-frac
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 10019
  • Country: us
Re: how does posting math notation work?
« Reply #16 on: October 14, 2020, 09:22:40 pm »
So it's a case of \over being a TeX primitive whereas \frac is a LaTeX macro with more robust behavior?

However, I am with Knuth who apparently said that \over is a more natural syntax for mathematicians. As long as I see \over rendering properly it is the one I would prefer to use. I find \frac more awkward as it doesn't support a linear thought process when writing equations.

Edit: apparently \frac also uses a form of \over internally when it expands the macro.
« Last Edit: October 14, 2020, 09:25:16 pm by IanB »
I'm a ChemE--I know all about the flow of fluids.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3264
  • Country: ro
Re: how does posting math notation work?
« Reply #17 on: October 14, 2020, 09:35:25 pm »
Enclose the formula between backslash dollar if you need an inline formula, for example like this one \$\Phi = BA\$, placed in a normal conversation.

Sometimes I use https://www.codecogs.com/latex/eqneditor.php as an online editor, good to see the rendered formula, because the forum shows the rendered formula only after posting, it does not render it at preview.


LATER EDIT:  Found an older post with a clean example in it.

Latex enclosed by backslash dollar will render it inline, when enclosed by double dollar will render centered, on a new line.

Example:
Code: [Select]
From Faraday's induction law, the induced voltage \$V\$ in an \$N\$ turns coil will be:

$$V = -N\frac{\vartriangle \Phi}{\vartriangle t}$$
where \$\Phi\$ is the magnetic flux

From Faraday's induction law, the induced voltage \$V\$ in an \$N\$ turns coil will be:

$$V = -N\frac{\vartriangle \Phi}{\vartriangle t}$$
where \$\Phi\$ is the magnetic flux

The Latex render will be seen only after posting the message, not at preview.
« Last Edit: October 14, 2020, 09:44:57 pm by RoGeorge »
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 3264
  • Country: ro
Re: how does posting math notation work?
« Reply #18 on: October 14, 2020, 09:57:31 pm »
Code: [Select]
Trying a new one
\[\vartheta=2\pi  \tag{5.5}  \label{eq:best}\]
Space between consecutive formulae
\[
    \mathbf{A}\textbf{B}  \tag{5.6}  \label{eq:special}
\]
A reference to eq. \eqref{eq:best} and a cross-reference to \eqref{eq:special}.

Trying a new one
\[\vartheta=2\pi  \tag{5.5}  \label{eq:best}\]
Space between consecutive formulae
\[
    \mathbf{A}\textbf{B}  \tag{5.6}  \label{eq:special}
\]
A reference to eq. \eqref{eq:best} and a cross-reference to \eqref{eq:special}.

« Last Edit: October 14, 2020, 10:38:27 pm by RoGeorge »
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 1825
Re: how does posting math notation work?
« Reply #19 on: October 14, 2020, 10:35:53 pm »
And can I reference a previous post. Like equation \eqref{eq:best} ?

Apparently I can !
« Last Edit: October 14, 2020, 10:37:25 pm by Andy Watson »
 
The following users thanked this post: RoGeorge, emece67

Offline wizard69

  • Frequent Contributor
  • **
  • Posts: 959
  • Country: us
Re: how does posting math notation work?
« Reply #20 on: October 16, 2020, 04:45:22 am »
Interesting thread as i never considered math posting here.    Sadly this doesn't work on an Iphone with MathML turned on.   Not sure what is going on there but it works fine on Firefox on Linux
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 8455
  • Country: gb
Re: how does posting math notation work?
« Reply #21 on: October 18, 2020, 11:31:22 pm »
Interesting thread as i never considered math posting here.    Sadly this doesn't work on an Iphone with MathML turned on.   Not sure what is going on there but it works fine on Firefox on Linux

Yeah, it does, it's just that the site is noticing you're on a phone and serving a 'phone' version of the site. Go to the bottom of the page, select 'menu' and then 'full site'.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline Terry Bites

  • Frequent Contributor
  • **
  • Posts: 585
  • Country: gb
  • Recovering Electrical Engineer
Re: how does posting math notation work?
« Reply #22 on: January 08, 2021, 02:21:08 pm »
of course you can just do a screen shot and stick it in as an image
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 8455
  • Country: gb
Re: how does posting math notation work?
« Reply #23 on: January 08, 2021, 02:26:21 pm »
of course you can just do a screen shot and stick it in as an image

I can see how that would appeal to someone for whom full stops and starting a sentence with a capital letter seems too onerous.  >:D
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 
The following users thanked this post: Jacon

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 3304
  • Country: us
  • Retired, now restoring antique test equipment
Re: how does posting math notation work?
« Reply #24 on: January 14, 2021, 08:17:16 pm »
I normally use the equation editor in Microsoft Word to generate equations to be included in Word documents.
Is there a simple way to include such an equation into a post here?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf