Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
| [Completed] [ZB] LaTeX tags; for equations | |
|---|---|
| Tweet Topic Started: Sep 13 2009, 12:39 AM (877 Views) | |
| Magrathean | Sep 13 2009, 12:39 AM Post #1 |
![]() ![]()
|
If you look here, you'll see that Sirus has posted an equation (if you click on it, it should open a popup displaying the code it was generated with). It was coded in TeX (or LaTeX), a mathematics scripting language which is much more powerful than what the ZB bbcode tags let me do (i can type x2, for example, but try posting the square root of x without doing x1/2). PhysicsForums.com has a LaTeX code with which its users are able to post complex mathematical equations (for a guide, click here). I'd like something like this for my forum too, since it's a scientific forum (pleeeeeease!). Is it possible? Thanks a ton in advance.
|
![]() Free ZetaBoards astronomy forum -- join today! | |
![]() |
|
| ... | Sep 14 2009, 09:25 AM Post #2 |
|
...
![]()
|
*bump, because I could be interested in this as well* |
![]() |
|
| Choco | Sep 14 2009, 02:02 PM Post #3 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
So you'd like it where if you type: [tex]\sqrt{x}[/tex] It'll render: I'll get right on it.
|
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| Magrathean | Sep 14 2009, 02:19 PM Post #4 |
![]() ![]()
|
Exactly, and also other TeX/LaTeX code, please. Thanks a bunch, Choco.
|
![]() Free ZetaBoards astronomy forum -- join today! | |
![]() |
|
| Choco | Sep 14 2009, 04:07 PM Post #5 |
|
¡ʎɹoʇɔɐɟ ʎʇıʌɐɹƃ ɐ uı pǝddɐɹʇ ɯ,ı 'dןǝɥ
![]()
|
Try something like this. Put it anywhere:
Then just do this wherever you'd like latex: [tex]any expression here[/tex] And it should work like a charm. Just please do note that adding single quotes (e.g. ') will break the image tag, which is a bad thing. So don't use single quotes in your latex expressions. If this is a problem, just post back and I'll mod it to work with single quotes as well. Enjoy! ![]() By the way, can I have a link to your forum? I'd be interested in seeing what it's about
|
It's a magical world, Hobbes, ol'd buddy... ...let's go exploring!In progress: Something Special ;) | |
![]() |
|
| ... | Sep 14 2009, 04:27 PM Post #6 |
|
...
![]()
|
Thanks, works for me well :). I don't think it is using single quotes much, so fixing the code isn't an urgent thing, however, if You once will be bored.... :r As for my board, it is about RockMan, however few times I needed to post some math things, and I was forced to look at wiki for images :(. EDIT: BTW, version with TEX button on posting page and which would work on preview too... (if that isn't a big request... :r) Edited by ..., Sep 14 2009, 04:42 PM.
|
![]() |
|
| Magrathean | Sep 14 2009, 06:14 PM Post #7 |
![]() ![]()
|
Yes! It's beautiful! Thank you, Choco. Is there a way to invert the colors of the equation so it'd look great on my board, which has a dark background? If not, i understand what you've done has already been great help. I should begin gathering a LaTeX cheat sheet for my members now...My board, Anatomia Universalis (latin for "Anatomy of the Universe"), is a board for astronomy news, articles, discussion, learning, etc. It's an ambitious project and so far i haven't had a lot of luck getting staff members who are hardworking and have a lot of free time, which is why you'll find it almost empty, but please don't let that influence you. The Mars section has a few completed articles/topics/threads (the ones which don't have a red circle to the left), especially the part about the missions sent to the red planet (you won't be able to see any of the images as a guest). Thanks for the interest.
Edited by Magrathean, Sep 14 2009, 06:33 PM.
|
![]() Free ZetaBoards astronomy forum -- join today! | |
![]() |
|
| ... | Sep 15 2009, 06:16 AM Post #8 |
|
...
![]()
|
I'm not sure, if that is a bug or not, but that code works well however it doesn't support plus + sign. [tex]ax^2+bx+c=0 \Rightarrow X_{1,2}=\frac{-b\mp\sqrt{\delta}}{2a}[/tex] And I would like be interested as well if it could be more visible on darker themes. Edited by ..., Sep 15 2009, 06:58 AM.
|
![]() |
|
| ... | Sep 15 2009, 10:30 AM Post #9 |
|
...
![]()
|
So I tried this: [tex]ax^2+bx+c=0 \Rightarrow X_{1,2}=\frac{-b\mp\sqrt{\Delta}}{2a}[/tex] and in output I got this: Hwever, when I went to Latex page, and I input exactly same value in their box, I'm getting this: http://latex.sidoh.org/?render=ax^2%2Bbx%2Bc%3D0%20\Rightarrow%20X_{1%2C2}%3D\frac{-b\mp\sqrt{\Delta}}{2a} So, looks like that code above don't like %2B, %3D &c. |
![]() |
|
| Firestrife2 | Sep 16 2009, 06:13 PM Post #10 |
![]()
|
That is because a "+" in a URL is equal to a whitespace(or " "). Obviously that wouldn't work well when the return is: " return "<img src='http://latex.sidoh.org/?render="+escape(b)+"' />";" :/ |
![]()
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Completed Requests · Next Topic » |




















2:28 PM Jul 11