Jump to content


Photo
- - - - -

Writing Math In Posts

math latex mathjax

  • Please log in to reply
8 replies to this topic

#1 AnssiH

AnssiH

    Understanding

  • Members
  • PipPipPipPipPipPip
  • 790 posts

Posted 17 July 2014 - 03:48 AM

I noticed with the current mathjax(?) implementation, in-line math tags don't seem to be supported, or they have changed.

 

I didn't find a thread documenting the use of math tags in posts so I just started a new one. Feel free to move this to a relevant thread if one actually exists.

[math] \frac{a}{b}x^{c} [/math]

seems to work and produces;

 

[math] \frac{a}{b}x^{c} [/math]

[imath] \frac{a}{b}x^{c} [/imath]

doesn't produce anything currently;

 

[imath] \frac{a}{b}x^{c} [/imath]

 

Mathjax supports rendering in-line math so I suppose adding support to these old tags would be fairly trivial? It would also fix quite a few old posts.

 

I also noticed some old posts still use [math] tags, would it be possible to update them across the entire post database?

 

Another nag I've noticed is that math tags don't seem to produce math in the preview window, and when I tried to fix some math tags via editing a post in the simple editor (the one you get first by default when you "edit" old post), it would produce somehow broken results. I had to go through the advanced editor to actually get things fixed.

 



#2 Gregb

Gregb

    Questioning

  • Administrators
  • 228 posts

Posted 17 July 2014 - 09:07 AM

I'll work on this later today or tomorrow. Thanks

#3 Gregb

Gregb

    Questioning

  • Administrators
  • 228 posts

Posted 18 July 2014 - 12:33 PM

The math tags are inline and you can use double dollar signs for equations on a new line. I have gone and converted old tags.

#4 AnssiH

AnssiH

    Understanding

  • Members
  • PipPipPipPipPipPip
  • 790 posts

Posted 02 August 2014 - 02:57 PM

Testing inline [math]\frac{a}{b}x^{c}[/math].

And large equation
$$
\frac{a}{b}x^{c}
$$
$$
\frac{a}{b}x^{c}
$$

Seems to work even in preview now! Nice.
  • Gregb likes this

#5 Doctordick

Doctordick

    Explaining

  • Members
  • PipPipPipPipPipPipPip
  • 1092 posts

Posted 26 November 2014 - 03:41 PM

I have been having trouble with math expressions!!

 

[latex]

\lim _{\Delta a \rightarrow 0} \frac{P(x_1+a+\Delta a,x_2+a+\Delta a,\cdots, x_n+a+\Delta a)-P(x_1+a,x_2+a,\cdots, x_n+a)}{\Delta a}=0

[/latex]

 

[math]\lim _{\Delta a \rightarrow 0} \frac{P(x_1+a+\Delta a,x_2+a+\Delta a,\cdots, x_n+a+\Delta a)-P(x_1+a,x_2+a,\cdots, x_n+a)}{\Delta a}=0[/math]

 

how about

 

$$\lim _{\Delta a \rightarrow 0} \frac{P(x_1+a+\Delta a,x_2+a+\Delta a,\cdots, x_n+a+\Delta a)-P(x_1+a,x_2+a,\cdots, x_n+a)}{\Delta a}=0$$

 

for inline?

 

Can anyone tell me what is going on???


Edited by Doctordick, 28 November 2014 - 04:27 PM.


#6 CraigD

CraigD

    Creating

  • Administrators
  • 8034 posts

Posted 26 November 2014 - 04:37 PM

It appears that the [latex] tag isn't working, but the [math] tag is.

These 2 tags should be equivalent. While we figure out why [latex] isn't working, you should be able to work around the problem for new or edited posts using [math].

#7 Doctordick

Doctordick

    Explaining

  • Members
  • PipPipPipPipPipPipPip
  • 1092 posts

Posted 28 November 2014 - 04:22 PM

It appears that the [latex] tag isn't working, but the [math] tag is.

These 2 tags should be equivalent. While we figure out why [latex] isn't working, you should be able to work around the problem for new or edited posts using [math].

If you look at my post you should see that I used all three possible tags [math]x_i[/math] [latex]x_i[latex] and $$ x_i $$  .  Perhaps I am using them incorrectly or maybe my operating system is confusing things.  My Windows system crashed so I am now using my old Apple Mac.  (It uses Mac OS X 10.7.5)

 

This time both the math tag and the dollar sign seems to have worked but I thought that the dollar sign was the the "inline" tag.  Perhaps I have understood that identification in error.  I will try one other insertion here to see what I get.

 

Ah, I see that "math" yields an inline expression [math]\lim_{\Delta a \rightarrow 0}\frac{P(x_1+a+\Delta a,x_2+a+\Delta a,\cdots,x_n+a+\Delta a)-P(x_1+a,x_2+a,\cdots,x_n+a)}{\Delta a}=0[/math], very good.

 

$$\lim_{\Delta a \rightarrow 0}\frac{P(x_1+a+\Delta a,x_2+a+\Delta a,\cdots,x_n+a+\Delta a)-P(x_1+a,x_2+a,\cdots,x_n+a)}{\Delta a}=0$$

 

Yes, it appears that I had the identifications backwards! and had "returns" between the tags in all three cases.  I will edit my previous post to make sure that is the source of the problem.

 

Thanks for your kind response and don't worry about the "latex".  I used to use "latex" all the time and I have gone back and fixed all my posts (I think) but I can't fix those in the quotes from my old posts so it still might be nice if those "latex" tags worked.  

 

Have fun -- Dick



#8 Doctordick

Doctordick

    Explaining

  • Members
  • PipPipPipPipPipPipPip
  • 1092 posts

Posted 28 November 2014 - 04:34 PM

Well, I tried editing my first post and it didn't work.  I thought that perhaps the use of the "latex" tag blocked out performance of the other tags but I got no improvement.  Does the editor actually give the correct results??

 

Thanks -- Dick 



#9 sanctus

sanctus

    Resident Diabolist

  • Administrators
  • 4235 posts

Posted 02 December 2014 - 07:56 AM

DoctorDick, I do not see your problem, your second last post seems to show that everything works as it should, and you say so, and then in the last post you say it does not?