A very useful tool for writing LaTeX when you are often switching locations is ShareLatex. You can write LaTeX in your browser. It allows collaboration too, similar to Google Docs.
(La)TeX the typesetting engine is great, but (La)TeX the language is clunky. Without proper support for namespace, it's rather difficult to abstract and write macros without worrying about side effects. I have real troubles to guess which package a command is from.
Are there any alternatives that have solved this problem?
I think the best alternative out there, honestly, is to just write simpler papers. Having finally started digging into the some of the core works of Knuth, I must say that the source and the results both read fairly well. There are macros, but they are judiciously used.
Probably doesn't hurt to adopt his style of reuse. Which is not necessarily to "link" to a full blown library of macros for purposes, but to pick and choose some that you wish to use. Possibly even just redefining them yourself.
That's easier said than done. To make some of the mathematical equations work and be legible in several of my papers required a lot of subtle positioning; this was not helped by strict conference page limits or requirements for e.g. 2 column layout (which exposes a lot of weird issues with LaTeX's rendering, which then have to be dealt with). Knuth's original papers, lovely though they are, are much simpler. If you want an example, consider Figure 4 from http://sigwinch.org/Graham/papers/Interface%20Grammars%20for... which was really quite tricky to lay out. I don't have the source code with me right at the moment for some reason, but I recall it being very tricky to modify.
Perhaps this means we should be trying to do simpler stuff, but I'm pretty sure that's impossible in the conference driven world I found myself in.
Apologies, I did not mean to imply that "simpler papers" would be easier. Indeed, I suspect that depending on where you are wanting your paper submitted, it will not be possible. :(
My main thought is that as you bring in more and more libraries to accomplish things, you start bringing in more and more sets of assumptions about the underlying abstraction and these don't always hold. Somewhat ironically, I think of paper layout now as an optimization problem, akin to how TeX thinks of paragraph layout. That is, it will be somewhat iterative. No getting around that.
So, I sadly don't have any prescriptive advice. Just the observation that the simpler papers out there of Knuth's are quite a bit easier to read in source than many of the ones I have ever authored.
Patoline is a great project, that I have mentioned a few times in comments.
To start gaining traction though, it should migrate from darcs to git, and move their own repo to github. It would enable people to contribute more easily, as well as bug reporting and editing the documentation.
TeX is not a programming language, it's two programming languages. These languages have a self modifying syntax and is parsed with state machines that can be changed. Changing the syntax into something meaningful other is yet quite impossible. It's meant not meant to be able to read markdown or xml.
These Languages are so odd even division of two variables is non-trivial, yet both are truing complete and servly limited, a classic turing tar pit, even division of two variables is nontrivial.
The hole TeX thing is a huge state machine, and uses imperative paradigms, while declaratives would have been much nicer.
All that leads to a horrible, monkey patching coding style.
On the internals there are other horrible things: Unicode was known when it was invented, font formats are a mess (even with XeTeX; I think I can't have another mapping for my the cursive style of a font then for regular. Good thing is the very verbose documentation for fontspec does mention "mapping" twice)
It's typesetting DSL, but if you want to typeset you'd need a typesetting meta-DSL. The one thing that works fine with TeX is math, because math typesetting is build in. Typesetting something more specific other than english text and math is hard and ugly.
If does follow imperative paradigms, as it does, the programming language part is essential if you want to do anything meaningful with it. If exotic task you never need in typesetting, such as multiplication, is hard to implement, something is wrong. And IMO that is why LaTeX is so odd and hackish.
Context is much better, tough.
And, by the way, the unfortunalty dead ANT uses a nice Haskell like language and is still a typesetting DSL.
rather than "TeX is not intended to be a programming language." It is nit-picking to be sure, but I think that, if the creator of a language (especially one who knows his stuff as Knuth does) says that it is a programming language, then it is.
In summary, TeX is a special-purpose programming language that is the centerpiece of a typesetting system that produces publication quality mathematics (and surrounding text), available to and usable by individuals.
(P.S. To "so, is XSLT a programming language because of, say, http://www.unidex.com/turing/utm.htm ?" I say "sure, why not?" What is the point of excluding something from being a programming language?)
Actually LaTeX was invented to be a typesetting DSL. As someone who has taught TeX and LaTeX and written my own software on top of TeX, I have come across this question very often. Basic TeX is not meant to be high level at all. LaTeX hides the complexity of 95% of the typesetting needs.
I agree - clearly a lot of work has gone into typesetting algorithms, but the language and package ecosystem is a mess, and there's not a good enough separation of presentation and content. A lot of macros and commands should really go in the template rather than the document, a lot of others could be made redundant.
Personally I'm a fan of markdown->latex->pdf using pandoc, although figure/table/equation numbering is still a bit of a hack (though there's wip plugins for them, or you can cheat with some embedded latex)
Evidence that it's trying to improve LaTeX macro programming? It's in the documentation. Evidence that it will be released any time this century? I have none of that. It looks like the last commit to the SVN was in January.
I know some of the latex3 people, and I know they are working on it. It is not a frontend code (for example such thing as \tableofcontents), but currently purely backend stuff.
A lot of latex2e packages are using latex3 in the background (for example fontspec).
There is ASCIIDOC and ASCIIDOCTOR http://asciidoctor.org/
I wrote my thesis with it. If you want to publish HTML, it's great. For PDF the current way to go it is to compile to DocBook and from DocBook to PDF. But there a ASCIIDOC to PDF renderer in the works.
Well, you would probably compile to TeX, not LaTeX.
I don't want a new language, myself, because new languages are much more difficult to migrate to. Personally, I just want an implementation that knows how to produce good error messages despite LaTeX's macro implementation. By the time TeX sees the results of the LaTeX macros, it loses the context for producing meaningful diagnostics.
It should be noted that word does indeed support all ligatures and glyph variants since Office 2013. Transparent text is also possible, put I guess it already was back then.
I would also like to encourage you to have a look at ConTeXt. It goes the other way for LaTeX and wants to think you about layout more. I use it to create all my slides and have far more fun than with LaTeX beamer for that.
Ah! Imagine my pleasant surprise when I discovered that ConTeXt has built-in features that you need a bunch of different LaTeX packages for. It was painless to, for example, flow text around figures.
The bad thing is... academic journals and conferences accept only LaTeX. Research articles often end up packaged in a larger work like a PhD dissertation. Amending markup from LaTeX to ConTeXt is painful. So one ends up using the inferior tool (LaTeX) for typesetting one's own larger work too, like I did :( (Though I used Koma-script classes instead of standard LaTeX classes.)
You have to add some context :D. Yes, ConTeXt is so old that "Google" (or any kind of search engine) wasn't a thing back then, leading to that unfortunate situation.
The Wiki is really good and links to a lot of resources, the TeX stackoverflow also provides lots of help.
My main problem with LaTex: it is not composable. Explanation: you can't plug a random piece of LaTeX inside a random container (environment or macro), without it being formatted completely wrong, or without it triggering all kinds of error messages.
Composing objects hierarchically should be natural (easy), and the user should not be required to read tons of documentation for each case.
I think HTML does a lot better in that respect (though it has its flaws too).
In general, I dislike the stateful nature of LaTeX. There are many commands that change some variable at some point in the document, which might have ramifications way later, with no easy way to trace it back to the original command.
Some kind of consistent, closed, scoping would greatly benefit many areas of LaTeX in my opinion.
I have been using LaTex for many years and I like it, but what's stopping other document editing software (like Word) to reach the same level of quality of results? LaTex has been around forever, but nobody else is close to that quality.
I think that the best answer is that nothing's stopping them, but no one is demanding it. Word's type-setting is good enough for most, and so Microsoft has no particular reason to make that aspect of it better (but don't get me wrong—I am no Word apologist, and use LaTeX almost exclusively).
Even on modern hardware it takes quite a while to compile a latex document (seconds!). Word basically has to compile the entire document with every key you click in order to show you the WYSIWYG interface.
A lot of that, though, is actually loading LaTeX packages itself.
TeX underneath is really very speedy; on my several year old laptop it can compile several hundred pages in around half a second (and pdftex takes around twice as long).
I believe it's also possible to perform optimal line breaking algorithms incrementally, so you wouldn't have to reset the whole document as you add to the end of it (although you may as you add to the start of it, but that happens in Word anyway).
Lyx is a WYSIWYG editor for Latex. It shows you quick typesetting in the WYSIWYG editor, but you can compile the underlying Latex document for beautiful typesetting.
I would like to start using LaTeX actually. I like that LaTex would work will with source control, and that you can use a simple editor like Vim to edit.
I hate using word and have a load of random formatting applied to my document. I am fed up with using the 'format painter'!!!
This article claims that "LaTeX supports Unicode". Does it now? Can you just drop in encoded characters from any language your fonts support, and get them rendered correctly? That would be a huge breakthrough, and last I knew, this is not at all the case.
LaTeX supports rendering various kinds of diacritics and math symbols, through its own mechanisms that aren't Unicode. If you want Unicode, you need to use a separate project called XeTeX. XeTeX's home page [1] introduces it as "Unicode-based TeX".
You are talking about pdflatex, which is the default latex compiler in many LaTeX distributions. Most distributions also ship xelatex, which is the LaTeX compiler of the XeTeX project.
XeTeX and xelatex indeed do support all the wondrous diacritics and Klingon symbols of unicode fonts (TTF or OTF, no less). However, LaTeX math still has to be written with \LaTeX symbols in order for the math engine to lay out symbols correctly. After all, a \sum is conceptually a different thing than a \Sigma. You can easily type your Euro Signs, typographic quotes, or Klingon symbols as unicode, though.
By the way, lualatex, from the LuaTeX project, behaves the same, although somewhat slower and infinitely scriptable in Lua.
The thing that makes me wonder is that all these typographical features should be easily supported by a WYSIWYG editor. From my perspective all it would take would be for Microsoft to buy some professional grade fonts and to put a couple of developers on the problem.
None of this seems like it's inherently incompatible with the WYSIWYG workflow.
Typeface designers are really annoyed about this. It's not just Word and Pages that don't have this stuff available to users, even Adobe is behind on it.
> OpenType was introduced in 2000. It is now 2014. How is it possible that [...] users are still unable to properly access and exploit these fascinating typographic possibilities because the font menus in apps with typesetting capabilities have barely evolved?
I still remember when I was binding my thesis. The printing shop offered the option to engrave text on the book cover. But they only accepted Word documents as template for it. I gave up as soon as I tried to do smallcaps in Word.
The thesis was nicely typeset in LaTeX and it would have been ridiculous to make the cover look far worse than the actual text.
The engraving was supposed to be something like 3€ per line. But it didn't even support basic typographic features because of Word. That was just ridiculous. That's why my thesis has a plain cover and the shop lost 12€ (- expenses) per copy.
> Common ligatures are essential to professionally typeset text.
I like the idea, and they're aesthetically great, but I think they're too rare now for it to be wise to use them. People will be confused and distracted. I have only one anecdatum, which is that Slack chat uses a font with ligatures, and I have heard several confused comments about them. For niche professional documents, like research papers, I'm sure it's accepted and expected, but you're probably already using LaTeX for those anyway!
"...but I think they're too rare now for it to be wise to use them"
The ligature of 'f' and 'i' is not "rare" and it is not "unwise" to use it. Actually many professionally typeset books are using it: it's not an "idea" as you wrote. It is something very real and often used.
It is so common and so good looking (I'd even say "so perfect") that you probably never noticed it but I can assure you that it's used in many of the books / newspapers / magazines you've read during your life.
I've written and typeset about a dozen book (one with LaTeX, all the others with QuarkXPress: it was before the InDesign days) and I can tell you that when I see a non-ligature "fi" I directly notice it because it is really poor looking.
Of course in addition to LaTeX, both QuarkXPress and Adobe's InDesign and several other professional typesetting software do the common ligatures.
I'm usually fairly cognizant of ligatures when I'm reading, but obviously I can only comment on the things I have read with my imperfect memory. The book I'm reading now (Harmonic Experience by Mathieu) is certainly what I would consider to be professionally typeset, and it does not use the "fi" ligature. Godel, Escher, Bach, on the other hand, does use it from what I remember. The Lifebox, The Sheashell, and the Soul does not use it (I just checked). From my memory, few of the physical novels I've read used it, but I'm not too confident in that memory because all of my novel reading has been done on a Kindle for several years (the portability and convenience won out over typography). I've read almost no physical newspapers or magazines since I was quite young, so you might be very correct about that.
It really comes down to who your audience is, and perhaps it's true that most things you would even consider using LaTeX for are intended for an audience savvy enough to not be distracted by ligatures.
I would actually go further. For the most part it makes frightfully no difference. Last I checked, the majority of fiction books out there have ligatures. As do many "professional" publications. Magazines are an odd mix. Last I recall, the expensive ones use them, the cheap ones don't.
All of this is to say that sure, you may notice and be cognizant of ligatures. Most people aren't.
That's surprising because if you pick up any professionally typeset book or magazine, you'll find ligatures all over. Some of them are quite subtle (e.g., the fi -> fi ligature). I have to imagine then that your colleagues are getting distracted not by the presence of ligatures in general, but by a few decorative ligatures or characters present in the Slack font, which looks to be Lato. For example, Lato's ampersand is missing a chunk in the upper loop (https://www.google.com/fonts/specimen/Lato).
I don't find the "fi" ligature to be at all subtle. I commented on my reading experience in this other reply: https://news.ycombinator.com/item?id=8615657. You're right that Lato has some peculiar glyphs, but there have definitely been specific comments in my office about the "fi" ligature.
> For niche professional documents, like research papers, I'm sure it's accepted and expected, but you're probably already using LaTeX for those anyway!
I think by LaTeX you mean Microsoft Word. For social sciences, at least.
In hard sciences LaTeX is pretty much the de facto standard. So much that most people in those fields automatically assume papers that don't have the LaTeX look to be subpar science. Of course, one of the reasons for its prevalence is the math support that's lightyears beyond anything Word can offer.
I find using the equation editor in Word to be physically debilitating. Pretty much any software involving tiny graphics and fine mouse work triggers severe eyestrain headaches and neck fatigue.
There's a document here, describing keyboard entry:
It's basically a markup language of sorts, and I'd use it if I were presently writing a lot of text with equations.
For better or worse, working in industry, my reports are free of equations! I've formed the hypothesis, that when managers and non-technical people see an equation, they assume the report is "incomplete," i.e., the equation needs to be turned into an actual result.
I've been to academic talks where, instead of typeset equations, the author just copies the source code from their MatLab file to a PowerPoint slide.
In university I used Word 2007 to type math lectures in real-time. I never had to resort to the mouse at all for equations. You seem to be thinking of the stripped-down MathType equation editor that was bundled with Office for a while (before it had native math support). The PDF you linked is for Office 2007 onwards and shows that the markup language you mention is mostly like TeX with a few simplifications, e.g. smart handling of things like x^12 which is then actually x¹² instead of x¹2. Basically it uses parentheses where TeX uses braces and needs a lot fewer of them because of more natural tokenizing.
I think you're right. I plan on trying it, next time I need to enter equations into Word. For me, the key to ergonomic use of the computer is being able to look away from the screen. For instance, I can type text forever without constant focused eye contact with the screen, which greatly reduces the eyestrain issue.
And I suppose a useful thing is that if you do misspell one of the keywords, it just sits there until you correct it, as a reminder of what you were trying to write.
The last time I did it couldn't even typeset a root. (The line on top and the thing at the front weren't connected)
And in Powerpoint the formulas have constantly different sizes and are distorted. I don't like beamer (a latex package), but it the only viable slide show software for me.
That must have been a while ago – nowadays it’s just beautiful real-time latex-style math with just a few improvements where the latex syntax kinda fails (“3/4” instead of “\frac{3}{4}”, “"plain"” instead of “\text{plain}”).
I don't think so. Of the hard sciences, the only one I know where TeX is common is physics. It is also common in math and CS but those are not sciences.
I can buy not calling mathematics a science (although I don't agree), but surely it's torturing language too much (in one direction or the other) to say that computer science is not a science?
If Mathematics is not a science, then the only one definition of it I know is that Mathematics is a language. Now is that not too much torture to the language by itself? That borders to a borderless recursion, which is supposed to be a part of Mathematics.
there's a humorous point: all "xxxxxx sciences" are /not/ sciences. compare political science, social science, computer science, earth science, with chemistry, physics, mathematics, biology. the real sciences don't need what ends up being a self-negating qualifier.
computer science isn't a science because it's a hodgepodge of algorithms and miscellanea, and very little theory-building.
> there's a humorous point: all "xxxxxx sciences" are /not/ sciences. compare political science, social science, computer science, earth science, with chemistry, physics, mathematics, biology. the real sciences don't need what ends up being a self-negating qualifier.
Certainly I see the humour in this humorous point, and in my most chauvinist moments as scientist (well, mathematician) might mutter it to myself, but I cannot agree with it as fact.
> computer science isn't a science because it's a hodgepodge of algorithms and miscellanea, and very little theory-building.
It sounds like you're discussing programming (which I think of as not yet a science—but I am no programmer), rather than computer science. There is certainly a rich theory behind computer science—indeed, there is a vein of computer science that is essentially just lightly 'applied' mathematics. Just see a random sampling of questions at http://cstheory.stackexchange.com if you don't believe it!
I get a teaching degree. Every discipline as it's own formating requirements. For CS and Physics things have to look good, but there is not too much specified. Everybody uses TeX, length is measured in characters, not pages, usually there is no minimum length, but a maximum length.
For pedagogics there are huge (like 30 pages) formating requirements. The formating requirements itself are incredible ugly and often quite objectively bad. Such as lots of widows and orphans (even in tables!). The document is distributed as a .doc file, and yes it does look like this even in Word, it's not a fault of LibreOffice. Length is measured in pages and the critical limit is the minimum length.
On the subjective side they IMO made the worst possible choices. Arial (or similar), 12 points, almost no margins, 150% spacing between the lines, italic and bold headings.
It looks very bad, is MS Word centric, but they have the nerve to make a style guide longer than a page.
Also, looking at psychology papers, it seems to me that non technical fields have a thing for shitty typography.
> On the subjective side they IMO made the worst possible choices. Arial (or similar), 12 points, almost no margins, 150% spacing between the lines, italic and bold headings.
So that's why my high-school's formatting requirements for assignments and papers were exactly what you've listed there.
Back in college I would typeset my polisci and literature papers in LaTeX. Professors would write notes about how great my papers looked, they were so used to Word.
You can have the best of both worlds (TeX and WYSIWYG) with LyX and possibly other editors that I didn't use much (Maple used to render to LaTeX 20 years ago and it worked kinda nice).
Well, WYSISOROWYMG (what you see is sort of reminiscent of what you might get), provided that you don't need to use much in the way of ERT ("evil red text", the LyX derogatory term for LaTeX literals). LyX prefers WYSIWYM (what you see is what you mean). The only way you can get anything approaching a layout view while typing is to carefully adjust the editor width, and even then line breaks will only be approximate (because hyphenation hasn't been computed) and there's no indication of pagination. I like LyX for straightforward documents, but it's not WYSIWYG, and it doesn't claim to be.
Is there a current goto standard to get this functionality in the web browser? A javascript framework that supports ligatures, river elimination, dynamic hyphenation and so on?
Lout (https://en.wikipedia.org/wiki/Lout_%28software%29) is a nice alternative to TeX and co, with a much better language. It uses the TeX typesetting algorithms underneath so quality is similar. But it suffers from the inverse network effect: its good, but few use it, therefore few use it :-( Hope mentioning it here gets some new customers.
Why do people compare LaTeX with Word? Shouldn't the comparison be against QuarkXPress and InDesign, software products which are designed as layout tools, not word processors, and can easily address all of the typesetting issues as LaTeX?
Yes. CSS (in Chrome and Firefox and modern IE; not Safari, despite Apple's typographical reputation) supports OpenType features like ligatures, stylistic alternates, kerning, true small caps (not using the CSS font-variant property, using the font-feature-settings property), lining/oldstyle (and proportional/tabular) numbers, etc.
And at the same time, HTML/CSS typography is in the stone age compared to LaTeX. No microtype without manually tweaked <span> soup, awful justified layout, CSS regions and columns are a work in progress, and all of this is unusable for print because there is no concept of pagination.
Good justification/hyphenation requires Javascript, yes. That's still an existing weakness. But there is absolutely pagination control.
HTML + CSS isn't perfect, of course, but the difference between HTML and professional typesetting is much, much smaller than the difference between Word and professional typesetting.
It's a bit finicky but it's possible. Text is vector so as long as you use print-quality images and shrink them down to screen size using the width and height properties, you can have something that looks pretty good on both print and screen.
(I've self-published a book that way and was surprised at how well it worked.)
Well, the point is that just shrinking stuff that looks pretty good isn't professional typesetting. Attention to stroke size in small-caps fonts are exactly the difference between a professional system (or just a professional typesetter) and using MS Word. It's not out of the question to build a JS-based system to do this kind of thing, but it would be a great deal of work, with probably little payout. After all, Knuth and crew have been doing the work and the upkeep on TeX and LaTeX for what, twenty or thirty years now?
I just checked your Naphthalene pdf. Looking at the first page of text (page 1):
* The first real kerning issue is the third word "wondering", which looks like "wo n d erin g" to me. The kerning is terrible, but that is probably more of a font issue.
* There should be no line break between the words: >>overpowering circumstance?”<< Probably should hyphenate circum-stance.
The kerning issue is due to an existing bug with PhantomJS on Linux [1]. Hyphenation is a feature I've been wanting to do for a while but haven't managed yet due to the lack of a decent hyphenation engine for JS [2].
To quote from the readme, the program is "a very early version with a number of problems". But my point of "it's finicky but possible" still stands.
Dude, take "Skateboard club at Georgia Tech" off your resume. Especially since it looks like you either quit or were kicked out of your role as founder and president after your first year!
That's great if people are viewing your resume online, but the print version looks very ordinary; there's a page break within a block, the format is dull (you even set a print stylesheet), and, for instance, the kerning is mediocre compared to TeX (e.g. in Europe).
Your resume even compete on any of the points that (La)TeX is good at.
His resume could look much better; he's using Georgia (a system font) and not using the OpenType features enabled by modern CSS.
LaTeX's hyphenation and math have no (non-JS) match in HTML/CSS, but just about everything else is very matchable. You can enable kerning based on OpenType GPOS, you can control page breaks (with page-break-inside or widows, for instance), and just about anything else that you can think of.
Modern HTML + CSS is amazingly capable, and this isn't fully appreciated yet.
I know this is being downvoted, but there is something to this statement. There's a lot in LaTeX that is getting obsolete and needs to be fixed... I personally think that a JS-based "cleanslate" alternative to LaTeX would be awesome.
The statement is being downvoted for glossing over 2 huge technologies in a sentence. What, for example, is the "obsolete" things you are speaking about? (not that I want to argue that there are none, but give us something to talk about)
Package management is the big one, and the poor integration of BiBTeX/references. A more straightforward way of figuring out clashing packages would be nice.
I also generally disliked how some features were environments (document, abstract figure) whereas others are commands (sections, subsections, paragraphs, etc). Inconsistencies in what things are passed to various commands as options vs. arguments were irritating, and it's always a bear, for example, if you need to pass say math-ey stuff an argument. E.g. \caption{$a+b$} Nope. Can't do it.
https://www.sharelatex.com?r=890185d4&rm=d&rs=b ( <- referral link, a referred user enables me to add more collaborators to my projects. Here's a non referral URL: https://www.sharelatex.com)