8 ms·
The Beauty of LaTeX (2011)
- bbcbasic 12y agoI 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'!!!
- praseodym 12y agoIt works well with source control, but be careful to split long sentences over multiple lines. Most merge tools are a real pain with long lines.
- ivan_ah 12y agoIf you haven't tried it already, look into `latexdiff` and `scm-latexdiff` which are awesome for generating diffs.
- myg204 12y agoA good advise is to split sentences between lines at logical places, like commas, dots, etc so the diff will be easy to read.
- ovis 12y agoI like git diff --word-diff=color for diffing LaTeX.
- jangid 12y agoEmacs auto adjusts lines. Command M-q in Tex or Latex mode. Check "Filling Text" here - https://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_24.html#SEC141 https://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_24.ht...
- myg204 12y agoRight, but autofill doesn't split at logical english meaning. This is what I was trying to say.
- arooaroo 12y agoGo for it - it's simpler than you'd imagine. You may find this beginner's guide a useful starting point: http://www.andy-roberts.net/writing/latex/ http://www.andy-roberts.net/writing/latex/ [disclosure: I'm the author]
- diogofranco 12y agoThanks for writing these, i found it easy to pick up latex by following them.
- BinaryIdiot 12y agoThanks, these look great! I've never used LaTeX but I've heard so much that I think I'll take a look at it now.
- cLeEOGPw 12y agoOne of the things why ms word will always be miles ahead of latex is that it doesn't need a guide to start writing a document.
- pXMzR2A 12y agoThe best all-around resource I have come across thus far is https://en.wikibooks.org/wiki/LaTeX https://en.wikibooks.org/wiki/LaTeX
- arooaroo 12y agoIt's certainly a great resource and extremely comprehensive. Personally I think it a bit too detailed to be an effective beginner's guide. And I say this as one of the credited authors of the LaTeX wikibook (https://en.wikibooks.org/wiki/LaTeX/Authors https://en.wikibooks.org/wiki/LaTeX/Authors) Therefore I'd still plug my own Getting to Grips with LaTeX as a good starting point for newbies: http://www.andy-roberts.net/writing/latex/ http://www.andy-roberts.net/writing/latex/ I promise that's my final plug :P Quite frankly I'm just happy people want to learn LaTeX other word processors.
- johnchristopher 12y agoHa, shameless plug :). Thank you for the work you put into wikibooks.org/wiki/LaTex. It's my goto place when I pick up LaTeX every ~5 months and need to remember the basics.
- jvehent 12y agoI prefer HTML & CSS, maybe with something like restructuredText on top.
- Argorak 12y agoFor print-quality stuff?
- mkozlows 12y agoYes. 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. HTML/CSS typography can be very sophisticated.
- illicium 12y agoAnd 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.
- mkozlows 12y agoGood 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.
- qznc 12y ago> there is absolutely pagination control Put something at the bottom of the current page, like a footnote.
- Argorak 12y agoI 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.
- kaoD 12y agoMind sharing a link please? ConTeXt is not really searchable.
- thangalin 12y agohttp://wiki.contextgarden.net/ http://wiki.contextgarden.net/
- inclemnet 12y agoDid you actually try? Search engines are powerful, e.g. googling 'context tex' or 'context typesetting' returns pages of relevant results.
- kaoD 12y agoSearched for "ConTeXt", didn't get any meaningful results and gave up. Not my brightest moment, to be honest.
- Argorak 12y agoYou 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.
- zvrba 12y agoAh! 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.)
- emersonrsantos 12y agoYou 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).
- deleted 12y ago[deleted]
- stan_rogers 12y agoWell, 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.
- quink 12y agoYear is wrong, BTW. I remember reading this a few years before 2011. Edit: here we go, https://news.ycombinator.com/item?id=1173226 https://news.ycombinator.com/item?id=1173226
- mturmon 12y agoThanks, the earlier discussion you found was pretty good IIRC.
- baddox 12y ago> 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!
- pXMzR2A 12y ago> 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.
- saryant 12y agoBack 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.
- baddox 12y agoOh, that could be. Mathematics and computer science are the only fields for which I've read many papers, and they tend to be LaTeX.
- TTPrograms 12y agoThat's pretty presumptuous to assume all research papers are like those in social sciences...
- Sharlin 12y agoIn 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.
- riobard 12y ago(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?
- fosap 12y agoNamespaces are the least of my worries. 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)
- Argorak 12y agoYou fall into a simple trap: TeX is not a programming language. At all. It's a typesetting DSL. Whether it's a good one is another thing.
- fosap 12y agoIt'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. http://sourceforge.net/projects/ant.berlios/ http://sourceforge.net/projects/ant.berlios/ https://web.archive.org/web/20090310012257/http://ant.berlios.de/ https://web.archive.org/web/20090310012257/http://ant.berlio...
- paulgerhardt 12y agoIs 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?
- chronial 12y agoIt 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.
- TylerE 12y agoUntil it supports something like the Microtype package, it won't come close - see http://www.khirevich.com/latex/microtype/ http://www.khirevich.com/latex/microtype/ for instance.
- boshie 12y agoA 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. https://www.sharelatex.com?r=890185d4&rm=d&rs=b 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 https://www.sharelatex.com)
- rspeer 12y agoThis 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". [1] http://xetex.sourceforge.net/ http://xetex.sourceforge.net/
- qznc 12y agoIt works for stuff like äöü. It does not work with math mode stuff like \sum. For UTF-8 write into the preamble: \usepackage[utf8]{inputenc}
- Derbasti 12y agoYou 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.
- honorious 12y agoI 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.
- wodenokoto 12y agoEven 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.
- fantispug 12y agoA 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).
- jules 12y agoLyx 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.
- wodenokoto 12y agoNo, Lyx is not WYSIWYG, but WYSIWYM. E.g, it doesn't show you how your document will look, but it shows you how it is structured.
- JadeNB 12y agoI 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).
- dendory 12y agoI wrote a quick tutorial to LaTeX a few weeks back for those who might be interested in starting using it. http://dendory.net/?w=544fb21d http://dendory.net/?w=544fb21d
- amelius 12y agoMy 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).
- Derbasti 12y agoIn 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.
- ginko 12y agoThe 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. Am I overlooking something here?
- bjz_ 12y agoTypeface 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? http://ilovetypography.com/2014/10/25/why-a-better-opentype-user-interface-matters/ http://ilovetypography.com/2014/10/25/why-a-better-opentype-...
- _acme 12y agoWhy 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?
- fafner 12y agoI 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.
- acrostic 12y agoLout (https://en.wikipedia.org/wiki/Lout_%28software%29 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.