Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] LaTeX tags
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:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • 3
[Completed] [ZB] LaTeX tags; for equations
Tweet Topic Started: Sep 13 2009, 12:39 AM (879 Views)
... Sep 20 2009, 10:12 AM Post #21
...

Posts:
451
Group:
Dedicated
Member
#311
Joined:
Jul 26, 2008
Heh... You are gonna to kill me.. or at least to hate me...

I put this:

Tex
 
[tex]\begin{array}{lll}
(x^4 - 3x^3 + 3x^2 -4x + 3) & : & (x-1) = x^3 - 2x^2 + x -3 \\
\underline{-x^4 + x^3} & & \\
\qquad -2x^3 + 3x^2 -4x +3 & & \\
\qquad \ \ \underline{2x^3 - 2x^2} & &\\
\qquad \qquad \qquad x^2 - 4x + 3 & & \\
\qquad \qquad \quad \underline{-x^2 + x} & & \\
\qquad \qquad \qquad \qquad -3x + 3 & & \\
\qquad \qquad \qquad \qquad \ \ \underline{3x - 3} & & \\
\qquad \qquad \qquad \qquad \quad R = 0 & &
\end{array}[/tex]


and instead of this:

Posted Image

for the first time I got this:

Posted Image

and when I removed the code for matrix, I got this:

Posted Image

Generally it don't like enters at all....
Offline Profile Goto Top
 
Firestrife2 Sep 20 2009, 01:00 PM Post #22
Member Avatar


Posts:
159
Group:
Dedicated
Member
#2,094
Joined:
Jan 21, 2009
It probably does/doesn't. The worst part is the fact that ZB converts linebreaks to <br>(which in LaTeX is < br >). :/.

Posted Image

Posted Image
Offline Profile Goto Top
 
Magrathean Sep 20 2009, 03:14 PM Post #23
Member Avatar


Posts:
24
Group:
Member
Member
#2,334
Joined:
Feb 14, 2009
But every site (at least every site i know of) will do that to you. Just use \\ and avoid hitting RETURN/ENTER on your keyboard.

It works perfectly for me now. I haven't tried Nemomon's array code without the line breaks, but for now i'm not using arrays anyway. So, fow now, thanks a lot, Choco and Firestrife. ^_^
Posted Image
Free ZetaBoards astronomy forum -- join today!
Offline Profile Goto Top
 
Reid Sep 21 2009, 08:37 AM Post #24
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Use this instead:
Code:
 
<script type="text/javascript">
//Latex bbcode, by Choco of ZBC
$(function(){
$("td.c_post:contains([tex])").each(function() {
x = $(this).html();
x = x.replace(/\[tex\](.+?)\[\/tex\]/gi,function(a,b) {
return "<img src='http://latex.codecogs.com/gif.latex?"+escape(b.replace(/<br>/g,"\\linebreak")).replace(/%26amp%3B/g, "%26")+"' />";
});
$(this).html(x);
});
});
</script>


Edit 1: Forgot a backslash :glare:
Edit 2: Realized something
Edit 3: Fixed ampersand bug
Edited by Reid, Sep 21 2009, 08:51 AM.
The Resource Board
Offline Profile Goto Top
 
... Sep 21 2009, 10:02 AM Post #25
...

Posts:
451
Group:
Dedicated
Member
#311
Joined:
Jul 26, 2008
Hmm.. thanks Reid, but still there is few errors. It looks not good in dark themes ( Firestrife fixed that in his code), it still don't see matrices, maybe that site won't generate them, and also it semi like \qquad functor. It's larger space functor and it is workin only for the first line, not for the rest lines:

Posted Image

EDIT: I know I'm annoying, however I would like to make full Latex tutorial with all possible ways :).
Edited by ..., Sep 21 2009, 10:04 AM.
Offline Profile Goto Top
 
Reid Sep 21 2009, 12:46 PM Post #26
Member Avatar
What? The land of the free? Whoever told you that was your enemy.

Posts:
1,790
Group:
Distinguished Coder
Member
#148
Joined:
Jul 20, 2008
Replace the part that says gif.latex with png.latex - that should fix your problem.

As for the qquad, no idea.. it shouldn't have any more problems grabbing the data, though, so it must be a site error :(
The Resource Board
Offline Profile Goto Top
 
HolySavior Sep 23 2009, 02:35 PM Post #27
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
You're welcome.
See? We can read thoughts too. ;)

Your request has been completed, and we're moving it to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • 3

Track Topic · E-mail Topic Time: 2:28 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy