Various things we wrote

BLARG!

The RichText-Markup Gap and jqMath

Ever find it difficult to convert rich text into html?  Much of the formatting that we take for granted in rich editors like OpenOffice/Google docs (and even Microsoft Word) can be difficult to achieve on the web.

Example:  We have a client that needs to embed mathematical equations within their blog posts.  Well… we could use images, but that breaks the flow between text and equations, and it takes more time to ‘code’ because you’ll have to style each image to fit within the blog layout.  Also, your font-sizes, styles, padding, etc won’t inherit from your css.  Future changes won’t cascade.  Frustration creeps in!

Wouldn’t it be great if we could write complex mathematical equations within our markup and still maintain these consistencies?

Big thanks to jqMath for providing a clean solution to this problem!  Just add these css and js files to your document (and jquery if you haven’t already) then you’re ready to go.  Once you’ve got the necessary scripts in there, it’s a simple matter of converting this:

\$\${1+√5}/2=1^3+1/{1+1/{1+1}}=answer_{subtext}\$\$

into this:

$${1+√5}/2=1^3+1/{1+1/{1+1}}=answer_{subtext}$$

Blam!  That’s not a real equation, but you get the idea.  Check out the jqMath page for more details and interactive examples.  Oh yeah, jqMath is compatible with all the usual browsers: Chrome, Safari, Firefox, Opera and even Internet Explorer 6.0 and up.

Comments (0) Write a comment

Leave a Comment

828 582 4975

info@paleosun.com

70 Woodfin Place Suite 312
Asheville, NC, 28801