Showing posts with label tex. Show all posts
Showing posts with label tex. Show all posts

Thursday, January 4, 2007

More on typesetting

I tried to write more about this mimeTeX, but the frustrations with blogger made me erase the whole thing. Turns out that you can use a public server that was generously provided by Mr. Forkosh to generate gifs of LaTeX code. Here is an example


< img src="http://www.forkosh.com/mimetex.cgi?c=\sqrt{a^2+b^2}"
alt="" border=0 align=middle >



Unfortunately, I think one needs very light background, for these to be visible, so I need to make that happen (I'm guessing it'd be enough to make a white box around the gif). Maybe this'll work:







Gotta go walk the dogs. I'll try to make it work later :)

Monday, January 1, 2007

Typing mathematics in blogs

I was talking to couple of friends about blogs in mathematics classrooms and they both asked "How do you typeset math in HTML". I had to say I had no idea. We use LaTeX, but that doesn't translate to HTML, unfortunately. So, instead of asking around, I tried to look it up. The is the first thing I discovered, courtesy of Clark Grubb , and I guess it should be accessible to high school and college students. Scroll down to find LaTeX lover's solution :)


The character entities can all be invoked via their numeric or alphabetic names. For example, both

x &#8712; A and x ∈ A

will display

x ∈ A

A radical can be done. The HTML

&radic;<span style="text-decoration: overline">a + b</span>

will display as

√a + b



Below is a partial list of the character entities specificied in the W3C Character Entity References for HTML 4. It includes most of the characters of interest to the mathematician.

Generic Character Entities


#alphasymIE6FFdescription
38amp&YYampersand
160nbsp
YYno-break space = non-breaking space
8194ensp N?en space
8195emsp N?em space
8201thinsp N?thin space
8204zwnj‌
??zero width non-joiner
8205zwj‍
??zero width joiner
8211ndash–YYen dash
8212mdash—YYem dash
8230hellip…YYhorizontal ellipsis = three dot leader


Mathematical Character Entities




#alphasymIE6FFdescription
60lt<YYless-than sign
62gt>YYgreater-than sign
176deg°YYdegree sign
177plusmn±YYplus-minus sign = plus-or-minus sign
215times×YYmultiplication sign
216OslashØYYlatin capital letter O with stroke = latin capital letter O slash
247divide÷YYdivision sign
8226bull•YYbullet = black small circle
8465imageℑNYblackletter capital I = imaginary part
8472weierp℘NYscript capital P = power set = Weierstrass p
8476realℜNYblackletter capital R = real part symbol
8501alefsymℵNYalef symbol = first transfinite cardinal
8592larr←YYleftwards arrow
8593uarr↑YYupwards arrow
8594rarr→YYrightwards arrow
8595darr↓YYdownwards arrow
8596harr↔YYleft right arrow
8709empty∅NYempty set = null set = diameter
8711nabla∇YYnabla = backward difference
8712isin∈YYelement of
8713notin∉NYnot an element of
8715ni∋YYcontains as member
8719prod∏YYn-ary product = product sign
8721sum∑YYn-ary sumation
8722minus−YYminus sign
8730radic√YYsquare root = radical sign
8734infin∞YYinfinity
8736ang∠YYangle
8746cup∪YYunion = cup
8747int∫YYintegral
8764sim∼YYtilde operator = varies with = similar to
8773cong≅NYapproximately equal to
8776asymp≈YYalmost equal to = asymptotic to
8800ne≠YYnot equal to
8801equiv≡YYidentical to
8804le≤YYless-than or equal to
8805ge≥YYgreater-than or equal to
8834sub⊂YYsubset of
8835sup⊃YYsuperset of
8836nsub⊄NYnot a subset of
8838sube⊆YYsubset of or equal to
8839supe⊇YYsuperset of or equal to
8853oplus⊕YYcircled plus = direct sum
8855otimes⊗NYcircled times = vector product
8869perp⊥YYup tack = orthogonal to = perpendicular
8901sdot⋅NYdot operator
8968lceil⌈NYleft ceiling = apl upstile
8969rceil⌉NYright ceiling
8970lfloor⌊NYleft floor = apl downstile
8971rfloor⌋NYright floor
9001lang〈NYleft-pointing angle bracket = bra
9002rang〉NYright-pointing angle bracket = ket


Greek Letter Character Entities

Both IE6 and Firefox implement all of these characters.

#alphasymdescription
913AlphaΑgreek capital letter alpha
914BetaΒgreek capital letter beta
915GammaΓgreek capital letter gamma
916DeltaΔgreek capital letter delta
917EpsilonΕgreek capital letter epsilon
918ZetaΖgreek capital letter zeta
919EtaΗgreek capital letter eta
920ThetaΘgreek capital letter theta
921IotaΙgreek capital letter iota
922KappaΚgreek capital letter kappa
923LambdaΛgreek capital letter lambda
924MuΜgreek capital letter mu
925NuΝgreek capital letter nu
926XiΞgreek capital letter xi
927OmicronΟgreek capital letter omicron
928PiΠgreek capital letter pi
929RhoΡgreek capital letter rho
there is no Sigmaf, and no U+03A2 character either
931SigmaΣgreek capital letter sigma
932TauΤgreek capital letter tau
933UpsilonΥgreek capital letter upsilon
934PhiΦgreek capital letter phi
935ChiΧgreek capital letter chi
936PsiΨgreek capital letter psi
937OmegaΩgreek capital letter omega
945alphaαgreek small letter alpha
946betaβgreek small letter beta
947gammaγgreek small letter gamma
948deltaδgreek small letter delta
949epsilonεgreek small letter epsilon
950zetaζgreek small letter zeta
951etaηgreek small letter eta
952thetaθgreek small letter theta
953iotaιgreek small letter iota
954kappaκgreek small letter kappa
955lambdaλgreek small letter lambda
956muμgreek small letter mu
957nuνgreek small letter nu
958xiξgreek small letter xi
959omicronοgreek small letter omicron
960piπgreek small letter pi
961rhoρgreek small letter rho
962sigmafςgreek small letter final sigma
963sigmaσgreek small letter sigma
964tauτgreek small letter tau
965upsilonυgreek small letter upsilon
966phiφgreek small letter phi
967chiχgreek small letter chi
968psiψgreek small letter psi
969omegaωgreek small letter omega

Immediately after stealing all this code from Clark (thanks a bunch), I ran into Flip Tomato's Blog. This was an absolute gem, as it contained the following link: mimeTeX. Score! I better get this running on my computers. If anybody has better solutions, let me know.




Technorati tags: , ,