Jump to content


Photo
- - - - -

LaTeX update: Read this before posting!


  • Please log in to reply
105 replies to this topic

#1 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 04 July 2007 - 09:22 PM

Ok, so today i have finished installing a new latex system, one just like on scienceforums.net, so there are changes.

First of all credits:
Latex people for making this beauty happen
Dave at xyloid.org for his vblatex package
The makers of mhchem package
Tormod for being the most unappreciated person who created and manages this chaos every day, also for being a great man and a father :)
Tormod's family for being the people who appreciate what he does more then anyone else in the world (or at least i hope they do)
Mercedes Bebzene for being annoying ;)
Jay-qu for being supportive
Buffy for being really cool
Irish for being the coolest
Users of Hypography for using Hypography
Linus Torvalds
Richard Stallaman for defining open-source and freedom
The open-source community
Steve Jobs
The guy that took the picture that i use as my background
My friends and family (especially here at Hypography)
Aspectradio for providing the music when i wanted to smash something because something didn't work
Microsoft for pissing me off so much and making me switch to open-source
AT&T for being a horrible internet provider, as well as for spying on me for the NSA (don't know what I'd do without you guys)
His majesty, the constitutional monarch of The Kingdom of Norway; Harald V
Her majesty the Queen of the United Kingdom of Great Britain
and Northern Ireland; Queen Elisabeth II
The Supreme Pontiff of the Vatican City
(excuse me if i have left anyone out, just don't have enough time)

Ok so what is new with this setup?

Well it uses latex rendering engine itself to convert the tex code to png images, its slower, but it yields better results, produces a better quality pictures and supports plugins (also has better fonts and is more configurable)

Note: the old rendering engine is still up and running, i want people to use the new one though, it is better trust me!

Old Vs. New:

First of all the new version does waaay better arrays, take a look at this code
left[
  begin{array}{ c c }
     1 & 2 \
     3 & 4
  end{array} right]
perfectly legitimate array code, but in our old package it renders as
Old:
[math]
\left[
\begin{array}{ c c }
1 & 2 \\
3 & 4
\end{array} \right]
[/math]

while the new one does a better job and renders it as such:
New:
[math]
\left[
\begin{array}{ c c }
1 & 2 \\
3 & 4
\end{array} \right]
[/math]

here is an example of how much cleaner the rendering is in this version:
old:
[math]\frac{\frac{1}{x}+\frac{1}{y}}{y-z}[/math]
new:
[math]\frac{\frac{1}{x}+\frac{1}{y}}{y-z}[/math]
old:
[math]\Delta =\sum_{i=1}^N w_i (x_i - \bar{x})^2[/math]
new:
[math]\Delta =\sum_{i=1}^N w_i (x_i - \bar{x})^2[/math]

in addition to the new render engine, a new mode is now available for displaying chemical equations

lets try to display a simple chemical formula (not a chemist, merely a hypothetical formula):
frac{1}{2}^{277}_{90}Th^+


[math]\frac{1}{2}^{277}_{90}Th^+[/math]

looks clumsy and hard to understand, does the job, but kinda hard to write

now the new method

[FONT=monospace]1/2^{277}_{90}Th+[/FONT]
[ce]{1/2^{277}_{90}Th+}
[/ce]

does this not look better?

or another one H2O2

H_{2}O_{2}

[math]H_{2}O_{2}[/math]

vs

H2O2

[ce]{H2O2}[/ce]

Also, if you are typing a response, instead of taking the whole function and having to rewrite it from scratch (in a reverse engineering fashion), you can click the image and voila, it shows you exactly what the person typed in, correct it and repost it! (saves lots of time)

ok, so now how do you use this new rendering engine, and as you guessed latex tags stay for the old engine (at least until i make sure that everything written for the old engine will render in the new one:
there are 3 new tags:


[math][/math] - renders mathematical equations
[imath][/imath]- renders inline math
[ce]{}[/ce] - renders chemical equations

notes, for ce, you need a set of curly brackets, otherwise the equation will be taken as math or something like that...

more about all that later, please post any problems you may find here or pm me directly about them

also feel free to try the new engine out here, its sort of still in testing (there are some minor differences between mimetex and this package)

there is a 400 character limit on the math, 200 on imath and 200 on ce, if that becomes an issue i can alsways increase the limit, but as i said, any comments or problems you may find, please post here or PM me so they get solved...

enjoy

Play around with it a little, see what you can make of it yourself :)

oh so i dont forget this is really cool, an online wyswig latex editor:
LaTeX Equation Editor

its not a bad thing to play around with and the code it produces should be compliant with our engine

More references:
Latex Math Symbols


#2 Southtown

Southtown

    differentiating

  • Members
  • 1922 posts

Posted 04 July 2007 - 11:50 PM

Dude the red link lines have got to go. ;)

But the 'click me for source' feature is frickin awesome!

And yeah also renders way better.

#3 Tormod

Tormod

    Hypographer

  • Members
  • 14353 posts

Posted 05 July 2007 - 02:19 AM

Well done, Alex.

#4 sanctus

sanctus

    Resident Diabolist

  • Administrators
  • 3645 posts

Posted 05 July 2007 - 03:06 AM

Wow, but what is imath (or inline math)? Doubt very much, it is the same as in C++...

#5 Mercedes Benzene

Mercedes Benzene

    Student

  • Moderators
  • 2950 posts

Posted 05 July 2007 - 05:43 AM

Dude the red link lines have got to go.

Why? They don't seem that bad to me. :D

Anyway, thanks so much Alexander! This should make things a whole lot easier.

Ohh. PS: No one actually told me I was being annoying. Or that I was being acknowledged, for that matter. So I should be immune from all such accusations. :hihi:

#6 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 07 July 2007 - 04:00 PM

lol Mercedes, i was just joking around you know, just like when i ackgnowledged the king of Norway, i mean come on right? :)

besides you were talking about pming tormod a while back, and T told me you pmed him a few times, and he wanted me to try this to satisfy your (as well as other people's) needs and wishes, so in turn, you are the one responsible for this :photos:

anyways, you guys think i should make it so when someone uses "latex" tags it will in fine print say that the method is depricated and should not be used, or should i try to convert everything to the new rendering engine, so in turn latex will = math

and sanctus, inline math = mathematical material to be typeset inline

btw working on alignment now :sweat:

#7 sanctus

sanctus

    Resident Diabolist

  • Administrators
  • 3645 posts

Posted 08 July 2007 - 06:54 AM

Sorry, I still don't get it...

#8 Qfwfq

Qfwfq

    Exhausted Gondolier

  • Members
  • 6241 posts

Posted 09 July 2007 - 08:22 AM

math is

[math]math[/math]

imath is [imath]imath[/imath] in the same line

#9 sanctus

sanctus

    Resident Diabolist

  • Administrators
  • 3645 posts

Posted 10 July 2007 - 03:34 AM

Ok, thanks Qfwfq, I finally got it

#10 Buffy

Buffy

    Resident Slayer

  • Administrators
  • 8214 posts

Posted 10 July 2007 - 10:22 AM

I'm going to agree with South here: while the utility of the red links is there (for those of you who haven't noticed, you can roll over them and see the latex code), but they're *really* annoying to look at. Even getting the color to change to blue or something less obtrusive would be a big help...

My eyes hurt,
Buffy

#11 CraigD

CraigD

    Creating

  • Administrators
  • 7234 posts

Posted 10 July 2007 - 02:30 PM

My gratitude and praise to Alexander for the new and improved LaTeX features. The new math rendering is much nicer than the old latex, fitting into mixed text much more esthetically. :)


I believe I’ve found a problem, though:


[math]h = \sqrt{r^2+d^2} – r[/math]


[math]h = \sqrt{r^2+d^2} – r[/math]


What happened to the minus sign in the math version of the above?


PS: I too wish that the red underlines weren’t there – being able to rollover and click to get the source would work as well without them, and the onscreen or printed page be better looking.

#12 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 10 July 2007 - 07:03 PM

ok, i'll look into the whole underlining issue (it looks like vb is generating it, i may be mistaken though)

Oh and as to the problem:

[math]
h = \sqrt{r^2+d^2} - r
[/math]
lol no problem, wrong symbol

Edited by Tormod, 10 September 2010 - 08:45 AM.
Testing adding backslashes again


#13 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 10 July 2007 - 07:05 PM

also hence why you see [?][?][?] in the other render

you used a

and i used a
-

#14 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 10 July 2007 - 07:07 PM

nope 100% sure its a hypo css thing, look at all the links, they are all underlined.... I can only change that if Mr.T gives me permission to... (or does that himself *wink, wink Tormod*)

#15 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 10 July 2007 - 07:07 PM

example google

#16 alexander

alexander

    Dedicated Smart-ass

  • Members
  • 5722 posts

Posted 10 July 2007 - 07:09 PM

so as long as the styles for the link, alink and vlink tags are changed (as well as the rollover style) the red under dotting will disappear

and that is up to Tormod :phones:

#17 Qfwfq

Qfwfq

    Exhausted Gondolier

  • Members
  • 6241 posts

Posted 12 July 2007 - 06:10 AM

Shame on Craig for putting a 96 instead of a 2D. :lol:

Even getting the color to change to blue or something less obtrusive would be a big help.

:umno:
The real trouble is they interfere with legibility. I have enough of those itsy bitties swarming around in my eyes, without the red dashed line through the equations.

nope 100% sure its a hypo css thing, look at all the links, they are all underlined.... I can only change that if Mr.T gives me permission to... (or does that himself *wink, wink Tormod*)

What little I've hacked with CSS, it allows you to specify a style for a given tag, as an attribute, without affecting all the other anchor tags, by just adding a new stylename.