MATH  / TeX in the forum - Page 1
Forum section: electronics / general

author: codeboy2k
author_rank: Super Contributor
timestamp: November 05, 2013, 08:51:21 am
content: I wish we could properly embed TeX math;Some forums have this:L = { \mu_0 N^2 h \over {2\pi} } ln \left( {r_a \over r_b} \right)which produces this:( For the above I used codecogs to convert my TeX to an image here )Sites like StackExchange, EduX, and Coursera all useMathJax. You embed the TeX markup between $ signs.$L = { \mu_0 N^2 h \over {2\pi} } ln \left( {r_a \over r_b} \right)$If this forum had the MathJax.js script loaded, or if you loaded it yourself using GreaseMonkey, you will see the above as a formula. If not, you see text.@Dave, if you're interested in allowing better math on the forum perhaps I can help you get it installed.. There does not seem to be any SMF mod for it, and if you prefer one, I can build one for you. Otherwise you just need to hack/edit a php file to load the MathJax.js javascript on every page of the forum. You can put the following code into the file ...../Sources/Subs.php :Code:echo '<script type="text/x-mathjax-config;">MathJax.Hub.Config({extensions: ["tex2jax.js"],jax: ["input/TeX", "output/HTML-CSS"],tex2jax: {inlineMath: [ ["$","$"]],displayMath: [ ["$$","$$"]],processEscapes: true},asciimath2jax: {delimiters: [["`","`"],["qq","qq"]]},"HTML-CSS": { availableFonts: ["TeX"], scale: 110 }});</script><script type="text/javascript"src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML"></script>';Put it just below the line that looks like this:Code:// This is mainly for the bbc manager, so it's easy to add tags above. Custom BBC should be added above this lineIt's not a MOD file so it's not really a managed BB Code markup mod like  so it shouldn't be above that line. Seems like the next best place to hack in some javascript is probably below that line.Now, if you would prefer a SMF MOD that allows you to install it via the admin interface, and then you can track it especially for upgrades, I'm happy to do that.. it's not hard to make this into a MOD, and it also gives you a one button install.

author: Stonent
author_rank: Super Contributor
timestamp: November 05, 2013, 09:37:14 am
content: It was my understanding there would be no math.

author: madshaman
author_rank: Frequent Contributor
timestamp: November 05, 2013, 11:17:22 am
content: Quote from: Stonent on November 05, 2013, 09:37:14 amroflmao

author: clifford
author_rank: Regular Contributor
timestamp: November 05, 2013, 12:28:54 pm
content: Quote from: codeboy2k on November 05, 2013, 08:51:21 am<3 +1another possibility is usinghttp://mathurl.com/.The site allows to the create short URLs to PNGs of your formulas, which then can be included using the bb img tag, such ashttp://mathurl.com/m3kno35.png:(If you remove the .png from the link you even get to an info page that allows you to edit the equation and create a new link, which can be useful when you want to discuss math and create a new formula based on one in a previous post.)

author: madshaman
author_rank: Frequent Contributor
timestamp: November 05, 2013, 12:37:18 pm
content: Quote from: clifford on November 05, 2013, 12:28:54 pmSweet! I had no idea such a thing existed; I think you might have just made my day.

author: enz
author_rank: Regular Contributor
timestamp: November 05, 2013, 12:43:36 pm
content: A while ago this link was also mentioned in this frorum. Don't remember by whom, i just saved the link:http://www.codecogs.com/latex/eqneditor.php

author: c4757p
author_rank: Super Contributor
timestamp: November 05, 2013, 12:48:26 pm
content: There's alsoTexifyandiTex2Img.

author: AlfBaz
author_rank: Super Contributor
timestamp: November 05, 2013, 01:40:50 pm
content: Quote from: clifford on November 05, 2013, 12:28:54 pmThat's the beauty of codecogs.com all you have to do is quote this post and the Tex is there as part of the url for you to mod

author: AlfBaz
author_rank: Super Contributor
timestamp: November 05, 2013, 01:42:52 pm
content: Quote from: AlfBaz on November 05, 2013, 01:40:50 pmAs this post shows I quoted my own previous post and moded it to be bigger

author: codeboy2k
author_rank: Super Contributor
timestamp: November 06, 2013, 01:03:08 am
content: yep. I've always used codecogs and my original post was using codecogs, just quote my post and you'll see.However, it would still be easier with MathJax enabled on the site directly, and then we could edit and add math without having to go to codecogs or mathurl to get the embedded  bbcode.

author: AlfBaz
author_rank: Super Contributor
timestamp: November 06, 2013, 01:39:41 am
content: Yeah, as has been mentioned in other tex discussions regarding external hosting, if they go down or disappear then math intensive posts become unintelligible

author: Six_Shooter
author_rank: Regular Contributor
timestamp: November 12, 2013, 01:04:38 am
content: Sweet, I'll have to keep this in mind when I need to post formulas.I joined one site where the ability to post proper formulas was possible and it seemed like a great site, until I found out about the politics and rules of that site of what was allowed to be discussed and what wasn't. Automotive was taboo, unless it plugged into the cigarette lighter/power point, even just repair of existing devices was a no-no. :facepalm: Other rules about where you could post, based on your post count regardless of how relevant your post was, also was monitored. :facepalm:Anyway, I'm on other sites where the occasional formula needs to be shown and doing so like above will make things MUCH easier to explain.

author: urlkrueger
author_rank: Contributor
timestamp: August 29, 2014, 10:43:13 pm
content: Please ignore this as I am just testing inserting equations.<a href="http://www.codecogs.com/eqnedit.php?latex=fr&space;=&space;\frac{1}{2\pi\sqrt{LC}&space;}" target="_blank"><img src="http://latex.codecogs.com/png.latex?fr&space;=&space;\frac{1}{2\pi\sqrt{LC}&space;}" title="fr = \frac{1}{2\pi\sqrt{LC} }" />earl

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 30, 2014, 12:15:08 am
content: Quote from: clifford on November 05, 2013, 12:28:54 pmYou meant $\heartsuit$ of course

author: Dave
author_rank: Super Contributor
timestamp: September 12, 2014, 02:12:34 pm
content: Well, for starters, we could just have proper Greek letter support, so these things don't occur: ? µ ? ?Edit: Well, I'll be damned, it actually supports the letter mu.