8 ms·
LaTeX was not built for the web
- freyfogle 13y agoThese guys are well worth a look https://www.writelatex.com https://www.writelatex.com if you're looking for web-based, collaborative LaTeX tools. Along with mendeley and peerj there's the makings of little cluster of companies trying to innovate in the academic publishing space here in London.
- apepe 13y agoThanks, yes! We know and are in touch with all these guys (writelatex, mendeley, and peerj). Great stuff coming out of London in this space. Digital Science and Figshare are also there. We are very excited that there's a movement to change/improve academic publishing.
- mjn 13y agoOne tricky bit is that I think a good solution medium-term will need to handle both media. Right now, a typical academic paper's print format transfers relatively poorly to the web. But the reading experience you get when you print out a web-formatted document to paper is also typically pretty poor, especially with things like figure layout. It's possible e-readers will someday obsolete print entirely, but I personally still find it difficult to read longer-form stuff on a screen, so I'd like to see better options for print layout of web documents. Technologically these are possible, e.g. PrinceXML shows quite a bit of print-layout stuff you can do with the web-technology stack (though it's unfortunately proprietary), but the bits and pieces don't quite plug together well yet.
- sentenza 13y agoThere is another problem. Some time ago, I thought about integrating LaTeX into user-facing software, not to render an entire web page but to generate a few formulas and images containing formulas in real-time or close to real-time. It breaks my heart to say that it seems impossible to do so, because LaTex is soooo slow. The codebase is written in an obscure language (that Knuth created for the purpose?) and would have to be converted to something optimizable such as C in order to become faster. Since I won't be re-implementing LaTex soon, I'll stick with MathJax for simple formulas and must look for something else if I want to create a complicated formula-containing image.
- Crito 13y agoWeb2c is typically used these days. The issue is not as simple as "It needs to be written in C".
- sentenza 13y agoWell, I gave up when I saw that it wasn't written in anything I could work with, so this is news to me. Also, having had some bad experiences with to-C translated code (looking at you, Matlab), I'd say that knowing that Web2C exists doesn't cause me great optimism.
- maxerickson 13y agoThere is recent work on a TeX engine with a Lua interface: http://tex.stackexchange.com/questions/36/differences-between-luatex-context-and-xetex http://tex.stackexchange.com/questions/36/differences-betwee... But still LaTeX sits on top of that, so it probably doesn't move you along very much.
- ErsatzVerkehr 13y agoTeX is written in WEB, a "literate programming" language designed by Knuth, which a pre-processor turns into Pascal. There should be nothing inherently slow about Pascal. In practice, it's compiled using "web2c" which does generate C code. http://en.wikipedia.org/wiki/WEB http://en.wikipedia.org/wiki/WEB
- dpwm 13y agoA lot of the time overheads with LaTeX are in the initial starting up. If you look into, for example, the preview environment, you can look at processing multiple snippets of LaTeX much quicker. Of course, such batching doesn't help achieve the goal of real-time LaTeX. If you're willing to eschew the luxuries that PDFTeX provides (microtype and pdf output) and drop back to DVI, it is possible to interpret the DVI yourself in real time using the IPC hack (which allows dumping of dvi on each page flush). The file format is specified in the dvitype manual[1]. Unfortunately, once you've processed the DVI output, you'll discover that many modern TeX fonts do not render, because they are virtual fonts and you will need to implement these. You'll also have to process the TeX font metric files. Once you've done all this, you can easily get TeX to produce in excess of 1000 snippets per second. The rest is up to your rendering backend, but you'd have to be doing a lot wrong to end up with less than 100 per second. [1] http://texdoc.net/texmf-dist/doc/generic/knuth/texware/dvitype.pdf http://texdoc.net/texmf-dist/doc/generic/knuth/texware/dvity...
- unfamiliar 13y agoGive me something that * is a simple and logically consistent as Markdown * has the ability to embed LaTeX formulas * has a functional #include for larger documents * can refer back to headings, equations and citations * can compile to PDF or webpage * compiles FAST and I will give you a lot of money. LaTeX is a horrible language, inconsistent and badly designed and unpleasant to look at. TeX is good at what it does but the whole system is horribly slow to compile documents. Documents will compile fine with some frontends but not with others. Markdown is not feature complete enough. The scientific community is unfortunately stuck with LaTeX for the foreseeable future. Seems like every day someone asks me how to do something that should be very simple, which inevitably involves loading some obscure package.
- jnotarstefano 13y agoPandoc has almost all these features: http://johnmacfarlane.net/pandoc/ http://johnmacfarlane.net/pandoc/ I think it's lacking the #include/#input feature, and I'm not sure whether it supports labels and internal references, but apparently it has some form of bibliography.
- fiddlosopher 13y agoPandoc doesn't have an "include" feature, but it's easy enough to add this with a preprocessor. See http://randomdeterminism.wordpress.com/2012/06/01/how-i-stopped-worring-and-started-using-markdown-like-tex/ http://randomdeterminism.wordpress.com/2012/06/01/how-i-stop.... Pandoc does provide a way to link to section headings, but it doesn't yet have a generic system for autogenerating numbers and producing references to these, like LaTeX's \label{} and \ref{}. It does, however, have a system for creating running example lists: http://johnmacfarlane.net/pandoc/README.html#numbered-example-lists http://johnmacfarlane.net/pandoc/README.html#numbered-exampl.... This can be used for numbering equations and referring back to them, but it is considerably less flexible than LaTeX. Pandoc has extensive support for automatic citations using CSL stylesheets: http://johnmacfarlane.net/pandoc/README.html#citations http://johnmacfarlane.net/pandoc/README.html#citations. BibTeX and BibLaTeX files can be used as the database, or YAML citations can be included in the markdown document itself. LaTeX formulas can be embedded in markdown. They can even use macros defined in the document. Formulas can be converted to MathML or native Word equation objects, depending on the output format. Pandoc can also be extended using "filters" that operate directly on the parsed AST. Here's an example of a filter that finds tikz diagrams and converts them to embedded images that can be displayed on the web: https://github.com/jgm/pandocfilters/blob/master/examples/tikz.py https://github.com/jgm/pandocfilters/blob/master/examples/ti....
- dbloom 13y agoFrom the article: This table command instructs TeX to put the table in the page, here, where the table is declared (h) AND at the top of the page (t). PrinceXML, an XML/HTML + CSS to PDF renderer, can do this using a "float:top" style: http://www.princexml.com/doc/9.0/properties/float/ http://www.princexml.com/doc/9.0/properties/float/ Also, before they abandoned their bespoke browser engine, Opera released an experimental build that could render web pages as paged media (see http://dev.opera.com/articles/view/opera-reader-a-new-way-to-read-the-web/ http://dev.opera.com/articles/view/opera-reader-a-new-way-to... ). It, too, supports floating to top (as vendor-prefixed "-o-top"). Paged media is as alive as ever (it's just moving from dead trees to tablets), so I wouldn't count this stuff out just yet.
- JonSkeptic 13y agoLaTeX was built to typeset documents. You have pages in documents and pagination is of critical importance in LaTeX. In the web you don't have pages, it's evolved to be seamless and scrollable. Natuarally, LaTeX was not designed for such an environment. That doesn't mean that LaTeX is worthless on the web. The gluing algorithms that Knuth used for creating sentences and paragraphs do (for the most part) work, even in documents without pages. In all honesty, the web could benefit greatly from LaTeX, pagination aside. I'm glad that the author seems to have a practical perspective on this: >We think LaTeX is still the best programming language to tell a computer how to place text on a page. But the TeX project started pre-web, in 1978, and its scope and function are tightly linked to the printed page, not the webpage. He goes on to give an example of constructing a table in LaTex which requires (or assumes by default) a suggested location for LaTeX to place the table in the page; something which is currently nonsensical in all but a few web environments. Like the author, I also find CSS appealing for a potential "LaTeX" on the web solution. However, LaTeX was designed from the very first to be the next standard in type setting and is a turing complete language. CSS is still under debate for being turing complete, and it lacks nearly all of the features that are iconic of LaTeX, except for the ability to format math equations ( and even then...). I'm not sure what the next standard in typesetting will be, but it will be designed to be device agnostic (with book existing as a supported format), it will target the web and similar digital media, it will be turing complete, and it will be created specifically to fulfill each of those goals, not to have them retroactively attached in a ham-fisted way.
- mehrdada 13y ago"We think LaTeX is still the best programming language to tell a computer how to place text on a page." No. The output might be beautiful, but the language is most certainly not. Awful to debug. I consider a more modern language that compiles to LaTeX and leverage its rendering engine for paper docs (while giving you sufficient control over the output) and also gives you a nice web output more pragmatic and a nicer way to approach the problem.
- hyperbovine 13y agoStrongly agree. It's taboo to criticize TeX because of who wrote it, but let's be honest: from a usability perspective it's atrocious. Cryptic error messages, code that rivals assembler for readability ... hell even the directory layout makes no sense to me, and I've been using TeX daily for over ten years. I hold Knuth in high regard as a scientist, and there's no arguing that TeX is a technical masterpiece which revolutionized the field of mathematics--but this is not the typesetting language that's going to carry us through to the next century (I hope).
- oandrei 13y agoThe main problem with LaTeX is that it does not have a good hyperlink mechanism. So, I am thinking about how to switch from LaTeX to HTML. I have a markup system based on Racket: http://andreimikhailov.com/slides/bystroTeX/slides-manual/index.html http://andreimikhailov.com/slides/bystroTeX/slides-manual/in... The main application was supposed to be slides, to replace the Beamer. But I think it is good for generic math-oriented web publishing. It does not work on Windows, though. Comments/suggestions/testing are welcome!
- claudius 13y agoIs there anything specifically wrong with the hyperref package? It seems to work rather decently for me.
- oandrei 13y agoI want to put a hyperlink to Eq. (4.4) of http://arxiv.org/abs/hep-th/9907164 http://arxiv.org/abs/hep-th/9907164 What is the right format? How can it even in principle work? If I click on the link: http://arxiv.org/abs/hep-th/9907164/Eq_4_4 http://arxiv.org/abs/hep-th/9907164/Eq_4_4 what is supposed to happen?
- dubya 13y agoIs http://arxiv.org/pdf/hep-th/9907164v2.pdf#page=30 http://arxiv.org/pdf/hep-th/9907164v2.pdf#page=30 a reasonable approximation? It works in Chrome and should work with the Adobe plugin, but doesn't work in Safari. I don't know if PDF has finer scale references than page.
- oandrei 13y agoI dont know what is Adobe plugin. I will investigate. However, just based on its name, I would probably recommend removing it. The combination of these two words, ``Adobe'' and ``plugin'', makes me feeling uneasy :) Which brings us to the second point: there is no good open-source PDF viewer. If you care about using open source, then go HTML.
- NN88 13y agoShould I learn to finally do my resume in LaTeX?
- wtbob 13y agoI did, and would recommend it to others. The final product is just so much nicer looking than I feel the reader subconsciously finds one to be a more appealing candidate. You almost certainly want to use a better font than Computer Modern, but that's easy.
- mpettitt 13y agoIn terms of pure mathematical typesetting, it's great, and, as they mention, Mathjax does a fantastic job of handling equations in webpages. Yes, TeX takes some learning, but it's a let less verbose than MathML for the same equation, and being distinct isn't necessarily an issue: there is precedent within HTML, such as CSS and Javascript code being embedded within pages. A browser with native support for (a subset of) TeX would allow for a lot of technical papers to be presented in a fully searchable, device agnostic manner, and would avoid the additional learning curve or conversion to MathML. For layout, though, HTML with CSS is the way to go if your prime target is web.
- thesorrow 13y agoI think the guys at http://substance.io http://substance.io are trying to solve this problem. You should take a look !
- apepe 13y agothanks! I did come across substance.io a few months ago. Seems like they made a lot of progress. Looks beautiful. It's time to get in touch with them again.
- _random_ 13y agoAnd HTML was not built for GUIs. Does it stop the ongoing madness? No.
- songgao 13y ago> What does the future hold for academic writing? We like to think that a few years from now we will format our research papers with the web version in mind, rather than the printed PDF. I've been thinking about this for almost a year. I believe as well that webview-first is the future of technical publications. The problem is how to either 1) get traditional publishers to adopt newer and better technology (a lot of publishers are still using systems seemingly from 90s that doesn't even support features that have been stablized in TexLive for years); or 2) build new publishers that gain enough reputation fast enough, so that the academia would consider them as good communication channels. Personally I like the second way better. It's more convenient (and easier to think out of box) to start from scratch than to change an existing system (by system I mean organizations, publishers, rather than a computer system). Academia is somehow like a trust chain. People tend to follow reputable researchers/professors. If a platform can get most reputable researchers, it can be adopted soon.
- marcosdumay 13y agoWhat about 3) compile to LaTeX?
- 14113 13y agoI really hope we don't optimise for a webview-first future. I personally find reading large pieces of text on a screen uncomfortable at best, and painful at worse. I want to be able to print out any scientific or academic documents, and at the moment LaTeX and PDF do that for me the best.
- thearn4 13y agoOn a related note, has there been any recent word on LaTeX3?
- ozten 13y agoCorrect, tangle was built for the WEB. Well TeX was built written in WEB. (sorry for the bad knuth toolchain jokes)
- treerex 13y agoPerhaps I'm just old and tired, but I loathe reading technical papers on a screen, whether it's my LCD monitor, my iPad, or my Kindle. One thing that irks me about the WWW specifications, for example, is that you cannot get a nicely formatted hard copy. I'm find with technical material being put on the web, but for the love of $DEITY please make a decently formatted PDF available too.
- apepe 13y agoAgreed. That is one reason why most technical and scientific documents are still perused in PDF. In Authorea you can export each document to a journal format (Export). Soon we will have a printer-friendly style which is basically CSS.