Author Topic: PrettyPrinting your Math Posts  (Read 10210 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
PrettyPrinting your Math Posts
« on: October 28, 2014, 12:24:57 pm »
If you want to post math stuff, it is a fantastic idea to take advantage of the [tex] <expression> [/tex] tags. Here is an example:

##e^{\sqrt{\frac{-3x}{2}}}## versus e^(sqrt(-3x/2)).


The code used in the tags is called LaTex and you can look up the fun stuff you can do with it via Google. However, for a bit of a quick start I will give the following nonsense expression and it's code:


##\sqrt{3} \neq \frac{\pi^{2}}{6} = \sum_{k=1}^{\infty}{\frac{1}{k^{2}}} \gt \zeta \left(2+\epsilon\right), \epsilon \in \mathbb{R}, \epsilon>0##


The code is:
[tex]\sqrt{3} \neq \frac{\pi^{2}}{6} = \sum_{k=1}^{\infty}{\frac{1}{k^{2}}} \gt \zeta \left(2+\epsilon\right), \epsilon \in \mathbb{R}, \epsilon>0[/tex]


That might look scary, so let's break it down:
\sqrt{} will put a square root symbol over everything inside {}
\neq is the "not equals" sign. There are also \leq, \lt, \geq, \gt.
\frac{numerator}{denominator} makes an expression in fraction form.
\pi is the pi symbol
^{exponent} raises the expression to a power
= is the = symbol
\sum_{lower limit}^{upper limit}{expression} creates a sum from an upper to lower limit (optional arguments). As a note, _{} creates a subscript, ^{} is a super script, if that helps to figure the stuff out.
\infty is the infinity symbol.
\gt is the greater than symbol
\zeta is the lower case zeta symbol. \Zeta is uppercase. LaTeX is case sensitive.
\left( is a left parentheses. It gets sized according to what comes between it and it's matching \right).
\in makes the "element of" symbol
\mathbb{} makes a "blackboard bold" character for certain special sets (N,Z,Q,A,R,C,H,O,S)


So for fun, here are some simpler codes and their outputs:
\left( 3^{2} \right)
##\left( 3^{2} \right)##


x_{n}
##x_{n}##


\frac{1}{k}
##\frac{1}{k}##


\sum_{k=1}^{n}{\frac{1}{k}}
##\sum_{k=1}^{n}{\frac{1}{k}}##

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: PrettyPrinting your Math Posts
« Reply #1 on: October 29, 2014, 10:52:35 am »
The board supports TeX now? Awesome. It will be pretty useful for you math people. I remember last year when I had university math courses and I did pretty much all my homework in LaTeX it's pretty powerful.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: PrettyPrinting your Math Posts
« Reply #2 on: October 29, 2014, 11:08:47 am »
The board supports TeX now? Awesome. It will be pretty useful for you math people. I remember last year when I had university math courses and I did pretty much all my homework in LaTeX it's pretty powerful.
It already supported that since quite some time :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: PrettyPrinting your Math Posts
« Reply #3 on: October 29, 2014, 11:12:24 am »
Well, if you don't tell us, we won't notice because everyone uses the quick reply box and never checks all bbtags :P
I'm not a nerd but I pretend:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PrettyPrinting your Math Posts
« Reply #4 on: October 29, 2014, 11:21:35 am »
I like that board feature, although it takes a bit to render it seems. At least it makes anything math-related much easier to read and more natural, not to mention you don't have to screenshot your formulas to post them.

As long as the SMF 2.0 mod used isn't involving OS 2.55MP :P
Well, if you don't tell us, we won't notice because everyone uses the quick reply box and never checks all bbtags :P
I agree. Actually I think a lot of board features that got added during the upgrade were quietly added to see when members would finally notice. I noticed this particular feature since the beginning, though, but I didn't make much noise about it since I don't really follow math threads much anymore.
« Last Edit: October 29, 2014, 11:23:15 am by DJ Omnimaga »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: PrettyPrinting your Math Posts
« Reply #5 on: October 29, 2014, 11:22:25 am »
I thought I read somewhere that it used 2.71MP.
I'm not a nerd but I pretend:

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: PrettyPrinting your Math Posts
« Reply #6 on: October 29, 2014, 11:22:34 am »
inb4 your ram clears when viewing the boards xD

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: PrettyPrinting your Math Posts
« Reply #7 on: October 29, 2014, 03:45:24 pm »
It uses a rather fancy javascript library to render all the TeX. So that's it's not loading that fast, but it's still quite fast for me.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: PrettyPrinting your Math Posts
« Reply #8 on: October 29, 2014, 03:46:39 pm »
Good idea to post this for those who didn't know the forum supported this, those who don't know how to LaTeX, or those who know but forgot :P

Something also worth noting is the difference between those codes :
\sum_{k=1}^{n}{\frac{1}{k}}: ##\sum_{k=1}^{n}{\frac{1}{k}}##
\sum\limits_{k=1}^{n}{\frac{1}{k}}: ##\sum\limits_{k=1}^{n}{\frac{1}{k}}##
One is faster to write and doesn't kill line alignement too much, the other one is more realistic.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: PrettyPrinting your Math Posts
« Reply #9 on: October 29, 2014, 07:50:50 pm »
Hum ?
(this everywhere)



Edit : ah well, sometimes it works when refreshing, sometimes not. Weird, it's the firs time I see MathJax doing that, and believe me I've seen all kind of stuff when I integrated it on TI-Planet
« Last Edit: October 29, 2014, 08:23:40 pm by Adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: PrettyPrinting your Math Posts
« Reply #10 on: October 29, 2014, 08:03:31 pm »
Welp, I just got it too, after it worked flawlessly for as long as I saw it.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PrettyPrinting your Math Posts
« Reply #11 on: October 30, 2014, 02:10:12 am »
Hum ?
(this everywhere)



Edit : ah well, sometimes it works when refreshing, sometimes not. Weird, it's the firs time I see MathJax doing that, and believe me I've seen all kind of stuff when I integrated it on TI-Planet
I have this happen except it always eventually appears fine for me. It seems like there's a long delay before the post changes are processed. Is that script hosted on Omnimaga or is it hosted externally?

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: PrettyPrinting your Math Posts
« Reply #12 on: November 13, 2014, 12:20:44 pm »
Good idea to post this for those who didn't know the forum supported this, those who don't know how to LaTeX, or those who know but forgot :P

Something also worth noting is the difference between those codes :
\sum_{k=1}^{n}{\frac{1}{k}}: ##\sum_{k=1}^{n}{\frac{1}{k}}##
\sum\limits_{k=1}^{n}{\frac{1}{k}}: ##\sum\limits_{k=1}^{n}{\frac{1}{k}}##
One is faster to write and doesn't kill line alignement too much, the other one is more realistic.
Ooh, thanks for that! I had a version on my old computer that worked the natural way without needing the \limits thingy.