LaTeX Support
Title:
LaTeX Support
Area:
entries
Summary:
It would be really, really nice if Dreamwidth supported LaTeX in entries.
Description:
<a href="http://en.wikipedia.org/wiki/LaTeX">LaTeX</a> is a typesetting system usually used for math & science, but allows fine control of formatting of text.
It would allow people to have more control of the formatting of their entries - for instance, line spacing. It is currently pretty much impossible to write about math or math-heavy science on Dreamwidth; LaTeX support would not only make this possible, it would make it elegant. It would also allow people precise control of the layout and presentation of their text - if you look around on the internet, you can see the sheer variety of things you can make with LaTeX.
Problems/drawbacks: requires people to know LaTeX, and I am unsure how many people would learn LaTeX in order to typeset on Dreamwidth. Not that many people want to typeset math on their journal.
Other ways to accomplish decent math/science typesetting: ... ... ...
LaTeX is pretty much the only game in town when it comes to typesetting math. While one <em>can</em> typeset in HTML, it is inelegant and time-consuming.
This suggestion:
Should be implemented as-is.
12 (20.3%)
Should be implemented with changes. (please comment)
4 (6.8%)
Shouldn't be implemented.
7 (11.9%)
(I have no opinion)
34 (57.6%)
(Other: please comment)
2 (3.4%)

no subject
no subject
no subject
I'm not going to be having any math-heavy stuff on my reading page, but I imagine using anything that sets specific sizes like this could create a ton of issues with content not being readable for people with differing screen resolutions, font sizes etc.
no subject
.contents img {max-width:99%;}
No image can then display at above the width of the main column, it's working fine for me and might help you: caveat, my layout is entirely bespoke, and I use %ages to set my main column, so it might not work for the normal layouts, LMK if it doesn't and you want it fixed as I'd like to know it works well for everyone.
no subject
no subject
It's possible to do it so it only works for you when you're logged in if you want to make it very specific, I don't tend to do that in CSS but it is doable, I'd need to dig out some older test code I was playing with (I made my layout look terrible just for
no subject
But in answer to the other question, it would be wonderful if when IE didn't understand something it did nothing with it, but unfortunately it tries to guess what to do. If I'm remembering correctly (which I could be completely not remembering correctly), it renders max-width attributes as if they were width attributes. So instead of getting it maxing out at 99% of the parent, or rendering at 100% of normal, it renders at 99% of the parent attribute *all* the time.
Of course, I could be full of crud at this point, because I haven't tested it recently, but I remember having several sites I was working on for people break horribly when viewed in IE because they'd used max-width attributes.
no subject
Just FYI!
no subject
no subject
no subject
I might redo my code to make it only work on my reading and network pages though, as while I always try to define image sizes properly it might still mess up on my entries.
no subject
.entry-content img {max-width: 99.5%;}
*html.entry-content img {width: npx!important; /* where n=max pixels the entry-holder can comfortably support */}
no subject
no subject
*raises hand* i would find an excuse! that looks awesome.
no subject
So I'm confused and uncertain about this suggestion.
no subject
Right now Dreamwidth doesn't offer image hosting for anybody. I'm unsure of how fair it is to designate math content as special and therefore more worthy of getting to have images hosted on-site.
So if the images aren't being hosted on Dreamwidth, then you're going to have to use some third-party service to get them on the net anyway. Are there already third-party tools for LaTeX to png or something? If so, I think it is rather silly to use Dreamwidth as a converter and then host the images offsite.
If and when Dreamwidth offers image hosting, I have no issue with providing this as Dreamwidth specific-code. Doing it like the polls or something where the data for it is not actually stored within the entry but instead replaced with <latex id="23432" /> or something.
However I think that the idea posted lower down in the comments about using MathML is a better choice. But I am not a math person, and wouldn't use it either way, so I have no idea how the differences between MathML and LaTeX would affect those who want to describe complex equations.
no subject
http://www.mozilla.org/projects/mathml/start.xhtml
http://www.w3.org/Math/testsuite/mml2-testsuite/TortureTests/Complexity/complex1.xml
Not sure how well DW would cope with this though.
no subject
http://en.wikipedia.org/wiki/MathML#Embedding_MathML_in_HTML5_files
no subject
no subject
no subject
no subject
no subject
If DW could parse LaTeX into standards-compliant html, though, I am all for it!
no subject
no subject
Having at least mathematical formulae support would make a massive difference. I'm a maths PhD student and occasionally play with the idea of doing some "maths for the layperson"-esque post, possibly on topics like "a basic introduction to groups" or "why does 0.999... not equal 1" or whatever. As it stands, it's impossible because I can't use LaTeX, meaning I pretty much can't use formulae at all (HTML is so not an adequate substitute. And no, as far as I can tell there is no way to do this myself via MathML or whatever. The only option I can see is to find some browser plug-in that will turn LaTeX code into displayed maths and then just write the code and ask people to install that plug-in if they want to read the post, which is so not optimal.) So, you know, for all the people going "why is this important?" - it's not necessary unless you want to talk about certain subjects, which it's next to impossible to talk about without.
As it happens, there's been a lot of work done in the maths/science online community for LaTeX support for formulae. One I see a lot, and have in fact used myself on another site, is MathJax (MathJax website here.) This seems to be the de facto standard, although I don't know if there are any issues that would lead to this being impossible to implement in DW. It also claims to be screenreader-friendly (haven't spoken to a screenreader-user so I don't know for sure) and I *think* handles a lot of the objections that have come up here although I don't know for sure, but in any case I think this is probably a good place to start if you'd be wanting to implement it. jsMath is another one, although that seems to have been generally succeeded by MathJax. There may be other ones or subtleties I don't know about, though.
Also, the way I'd imagine this working would be to have it be optional, and maybe get an additional tag a la <latex> or something like that for "parse this bit but not the others" - LaTeX commandeers a lot of standard symbols (\ and $ are two, for instance) that would make it infeasible to "add onto" everyone's entry.
ETA: since I voted for "implement with changes", I don't really care about the formatting elements of LaTeX and people have brought up good arguments against. I do however *really* want to see the formula typesetting elements of LaTeX.
no subject
(omg LaTeX support would be lovely I could talk about science!)
no subject
Direct link to the MathJax accessibility thingy: http://www.mathjax.org/resources/articles-and-presentations/accessible-pages-with-mathjax/