Markdown is better. Microsoft Word is better. They just both lack certain things we need, and LaTeX has those things.
Could you not envision things could be better?
A LaTeX that parses to an in-memory tree so it could be transformed before compilation?
A shell that instead of working on character streams worked on structured and annotated data streams, so it could intelligently interpret what is going on?
An editor that does have at its core an expectation that its output is ASCII character commands controlling a 1970s terminal interface?
Of course you'll stick to using Vim to write LaTeX in a Bash shell, I do too. Doesn't mean I'm not mad about it..
2) Markdown and LaTeX are designed for different tasks. Next you'll be telling me that if you have a leafblower, you have no need for a chainsaw.
3) Find me the structured and annotated data streams first - and show me that the structure and annotations are correct - then lament the lack of a shell that can route them to the programs that don't interpret stdin and stdout and stderr that way anyway.
4) I use vim to write latex when I write latex, but "in a bash shell" doesn't make any sense. You fire up vim from bash, yes, but unless you're trying to do an ex-style editing session, you're not editing in the shell any more than you're editing in the kernel or the tty driver...
These improvements aren't all that difficult to imagine, but they don't happen, because, well, why? GP seems to think an obsession over backwards compatibility.
What you're basically advocating is nobody should innovate because things are "good enough". With that sort of attitude we would never have any progress on anything.
Which is not what you're saying I'm advocating.
It's also not "fixing what's not broken", but improving something that could... well... be improved.
Bad example :P
if you want extensibility and still a rather lightweight syntax, try restructuredtext. it has exactly one flaw compared to markdown, which is the hideous inline link syntax (which practically forces you to use named links). that makes it less suited for forum comments (where you might want to quickly inline 1-2 links), but perfect for books (where you can neatly specify your link targets below the current section)
And yes, there are efforts underway to improve it (LaTeX3) but 2e works so well, there's not been much drive there.
And if you find LaTeX is so hard, there's always LyX...
Well, mostly math and science books. Very few (if any) fancy and well typespeced books by major publishers have been made with LaTeX. I know, because I know that industry. So, while TeX was once created to be a general typesetting solution, it has been relegated to something math and cs geeks use for their papers.
>And if you find LaTeX is so hard, there's always LyX...
A not really maintained, relic of a program, that tries too hard to work around the issues raised by a backend like LaTeX that wasn't really created with such GUI control in mind.
What do they use, then? (I'm actually pretty curious, because I am writing a dissertation that I currently build with LaTeX, but I find it much nicer to write in Org mode. I'm doing whatever I can to avoid a hard dependency on LaTeX for the backend, and to allow exporting to multiple formats.)
Why do they use whatever typesetting solution(s) they use? Does it actually produce better/nicer output than LaTeX (for non-math text)? Does it just have nicer syntax or friendlier error messages? What's the advantage?
Yes, but a leafblower combined with a chainsaw...
I don't know about you, but that's a tool I could find some uses for.
+1 coffee sputter.
> "LateX is slow, inconsistent and needs to be ran multiple times to give a correct result"
It is not slow, it runs in under a second on most documents I have authored.
> "Inconsistent"
I'm not sure what tinco meant by this, but it does in fact return the same results for the same file across multiple runs.
> "Needs to be run multiple times to give the correct result"
This is true for things like references, etc. However, this proves to be a non-issue in practice as you are recompiling so often to view changes that references are always up to date.
> "It's syntax is ugly."
I don't see how learning LaTeX is different from learning any other programming language. I don't think that many C++ gurus would call C++ "ugly". Calling a progamming language "ugly" is often the last argument you see when someone couldn't come up with a decent argument against it.
Slow? I don't know about that, but compared to what? Even in word it does need some time to reach the "Save as PDF" menu, right?
>> "Inconsistent" > I'm not sure what tinco meant by this, but it does in fact return the same results for the same file across multiple runs.
Well, there is some truth about this. There is an odd naming scheme if you look at stuff like "enumerate", "itemize" and "description" - beginners get confused by this as they assume it would be called "describe". The same goes for most of the packages. This is somehow historical, but I think it also makes it unnecessary hard to figure out LaTex for beginners, right?
Also the reason why LaTex needs several runs to finally create the full document. Nowadays you would do this differently I guess as there is simply no need to start the program twice if the application would be smart enough to call sub-programs (like biblatex) by itself on the fly. It would still run the same routine several times, but users wouldn't see it and it would be one command for them to build the document. That's another point beginners tend to go crazy about :)
Having said that, I should add that I'm using LaTex (and XeLaTex, etc.) daily and there isn't a single program matching the power and beauty of it - I even design covers for my publications with it. But I'm able to use vim and emacs, right? 90% of the people are bloody beginners and it would be a shame to hide the beauty of a LaTex document from them.
>> "It's syntax is ugly."
Yeah, well...ugly is a bad term to discuss about. I like it and I think the syntax is way cleaner than reStructured text :D
what is unclean about rST in your opinion?
It is slow. On my PhD thesis, it took more than one minute at some point, on an SSD. Not very convenient if you are tweaking figures and equations, and want to preview a change quickly.
However, I will agree that using it to address slowness of a build process is just a hack.
Syntax is important, remember he is comparing it to Markdown, not C++. C++ is certainly ugly and should not be used as the basis for any comparison, certainly not for a word processor.
I think he is just pointing out that general theme amongst these tools. They work for the people using them well enough, so they stay that way forever. It isn't that features aren't added or that they stagnate, it is just that thinking outside of the box is impossible.
Definitely initially for simpler.
But what about using it collaboratively, merging changes and comparing between versions? Especially large documents with a multitude of authors combined later (think journals).
What about documents with programmatically generated content?
What about consistent formatting for your documents?
What about when Word gets confused by some element in the xml not visible to you?
Sure Word may be easier but there are limitations to it's use.
I want to draw a conformal mapping diagram in word and also write a 3-vector of the navier-stokes equations.
Also, I want to do a lot of tensor arithmetic with tons of superscripts and subscripts and arrows.
Tell me how any of this is accomplished in Word please. Saying Word is easier to us is like saying BASIC is easier than C++.
Hell, I just had a postdoc send me figures as part of a manuscript draft where she was using Powerpoint to make the figures instead of something more appropriate like Illustrator. Most people who publish don't care about how their documents are created, they just want them to work and get published. Word does a pretty good job for this.
Use the best tools for the job. Most people would tell you that BASIC is easier to use than C++, if you can write your program in BASIC. And if you don't want to deal with learning curve of C++ and you get get by with BASIC, then what's wrong with using a tool that works?
I'm sick of the "HN strawman." People on these threads need to read and apply basic critical reading and logical skills.
You don't need to tell ME to use the best tools for the job. I've been telling people that for fucking years. I don't why your comment annoyed me so much but it did.
In some fields LaTeX is the easier method to produce documents (good luck with anything more than a simple equation in Word), but those are relatively small niches.
But you can't honestly say that Word and LaTeX really have that big of a difference in intended jobs. It seems to me that they are both in the document production business.
One can be abused to fill the role of the other, and if you look at them both from 1000 feet and squint then both "for" the same thing, but the reality is that when you actually examine what each is designed to do and in which situations each is used, they really have little to do with each other.
LaTeX and Word are for documents - making documents. How they operate is very different. For example, Word includes it's own editor, LaTeX does not. But they are both used for producing documents.
I am not fond of LaTeX. However, for some fields there are simply no dedicated programs, while there are good LaTeX packages. For instance, for my thesis I drew a lot of attribute-value matrices (in the unification grammar/HPSG sense). There is a great packages to draw these structures, both flat and in tree form.
I had some hope that DocBook et al. could replace LaTeX for most uses. It's great in many respects: it's just XML, so easy to machine-interpret. Customising output is easy (via XSL stylesheets). There is good support for producing PDFs (via XSL-FO). And it supports SVG and MathML. There are also great WYSIWYG editors, such as Oxygen. However, that toolchain never became popular, because most people hate XML.
The book that we never got to finish[1] is written in DocBook, equations are in MathML. The Slackware book that I once wrote [2] is also completely done in DocBook.
I'm a biomedical researcher, and I use LaTeX. It's my preferred method of document preparation. I know many others who use LaTeX as well.
I would say LaTeΧ can be perfectly well seen as a combination of many aspects of Word and Markdown in the sense that it offers the feature set and backwards compatibility that Words offers, while culminating a legacy, complexity and perceived indeterminism that also plagues Word (though in a different way); and on the other side being a plain text format that can be version controlled and taken apart and shared as snippets.
Apples to Oranges? I can compare these Braeburns to those Fujis just fine thank you.
Java and C are both programming languages but it is still apples and oranges to compare them.
I have another question though, how much have you used Word? I have used it only a couple of times since highschool, but it's gotten pretty impressive. I bet that if you really dive into it you could get very close to the power of latex. At least, with regards to the typesetting. The drawing images/formulas/schemas thing is a whole different ballgame I'd agree.
Anyway, my point was not that Microsoft Word in any way is a good replacement for LaTex, I'm just saying that if LaTex could be as well written as Word is, it could have these fancy GUI and fast rendering features too.
There's people out there that think that the power in typesetting that LaTex has is mutual exclusive with the speed and usability that Word has. That just isn't so.
The only reason LaTex isn't fast and more easily extensible is that it was written for the machines of 40 years ago, that didn't have enough RAM to hold the parsed tree of a document.
LaTex could be ten times as fast, were it written in Ruby, the slowest language out there. Just because a modern programmer would make use of the modern hardware and modern design concepts, and just make it responsive. A GUI could be as simple external process that accessed a message passing API, rendering it to HTML and run it through Webkitview.
Overhead everywhere, still ten times faster than LaTex...
(edit: definitely worth a downvote, this comment :P)
you've written a handful of latex documents, so you're now an expert on what latex is used for and what people want out of it. would it help to point out that given latex is more difficult to use than word, I'd bet most latex users have tried and discarded word in favor of latex? Would that affect your judgements about the relative use cases?
There's people out there that think that the power in typesetting that LaTex
has is mutual exclusive with the speed and usability that Word has. That
just isn't so.
Since, well, nothing else offers similar typesetting plus mathematical notation / flexibility, your proof is... what exactly?If you built a better system, you'd find customers for it.
I had a long talk about something like this with a close friend last night. He has a favorite technology stack that is regularly trash talked on sites like this. From what he's seen its usually from people who have only a passing knowledge of it. Either they worked a job and only had to mess with it for a few months or they worked with it for a long time but never went past just the surface. Almost all the complaints he's seen about it are either extremely outdated, fixable with a little custom code or configuration changes. I think you should spend a little more time with it before you say that developers should feel "ashamed" for using it. Your post falls squarely into the category he was talking about.
I have a lot of respect for having your own toolchain that's optimized and comfortable for you.
I am sorry I come across wrong, I am not saying that developers should feel ashamed for using it. I am saying developers should feel ashamed that other people are using it.
I'm not saying using LaTex is dumb, I've stated multiple times in this thread that I use it myself. I'm just saying we could do better.
The things that I use LaTeX for are usually my own writing that I don't have to collaborate with other people for. If I have to work with other people I use Word. The things that I like about latex are that I can have it automatically generate my figures because I can script it, which I can't do with Word.
I agree that LaTeX can be difficult to write but you have to realize that word has it's shortcomings too (put an image in and send the document to somebody else, chances are the layout will get messed up). Tools like pandoc are trying to alleviate both problems so people can work in whatever environment they prefer, which seems like a good solution to me. I could write part of my document in markdown, convert to LaTeX and write my formulae and then convert to Word so my coworkers can edit it easier.
And you never stopped to investigate why, in spite of the far greater ease of entry that alternatives have?
I'll take LaTeX. It's more reliably reproducible. Once I got the basic format created (for her second book)—which took about as much time as it took to format the first book in Pages—the third book took about a tenth the time. My tooling was in place.
It's not for everyone, and you really have to either dig deep or find a macro set that does what you want (or both—I'm using a macro set on top of scrbook). There is room for something better, but that something better is not Word (or Pages).
(I'd almost say that what LeanPub does is good enough, but their LaTeX typography sucked when I tried it almost two years ago.)
I find that very unlikely.
Are you talking about InDesign? Exact placement of anything is really a pain with Latex, choosing "normal" fonts requires you to switch to a different compiler and the debugging information on all those automatic choices TeΧ and LaTeΧ does for you is abysmal. What I'm saying is that even though LaTeΧ allows you to do precision work does not mean it is a good at it.
And that is almost the whole point. Most people are idiots about how to present written material, so TeX and friends make those decisions for us. It's especially frustrating when you have to dink with floats, because now you're second-guessing TeX, and it exacts a high price.
I've used TeX for over 25 years and I'm comfortable saying that I could produce documents of a similar quality, with better support for collaboration, with Word.
I still use TeX for many projects but the Word style capability is great.
Markdown still sucks, though. :)
How? This is an honest question. I wouldn't use Word anyway, but I am just not aware of anything that could come close to Git + LaTeX in terms of collaboration support.
I've been doing projects with people who have no technical background to speak of, but immense domain knowledge. They wrote their theses in word (god help them), published in journals that required submissions in word (there are more and more of the things), and include a lot of figures in their papers or grant proposals.
Sharepoint helps a lot with collaboration, but even word's basic change tracking and commenting facilities are good for people working around a document via email, Dropbox, or even git.
Word still creates those weird situations for which it is infamous, but they are generally rare. Also, word has become much more stable, even with larger documents.
Word: explicit WYSIWYG control over typesetting.
LaTeX: semantic level control over typesetting. Additionally provides explicit low level typesetting commands.
Markdown: given how basic (trivial even) Markdown is (http://daringfireball.net/projects/markdown/syntax) I'm not sure why it's even in this list.
I guess I don't really have a point. Just that if you are writing essays in the humanities or sociology then markdown can have a place in your workflow
Word nowadays has semantic typesetting controls too, I think since they started that ribbon thing that it has become useable. If you stick to using their semantic things I think you can do a pretty good job of properly typesetting in Word.
When i was finnished writing i exported the markdown to rtf, 1) selected all the h1's via "select all", set them to be a real (word) h1. vice versa with all other styles i used. 2) Then i put in all the pictures. 3) Then i exported the list from Mendeley.
That process - from markdown to perfection - took me less than 4 hours.
I have some experience with latex and especially latex + komascript, but i hated that experience because the latex sourcecode doesn't ebrace readability and you're sure to get obscure errors in the last second. besides stuff like running latex twice for a table of contents.
Writing
\begin{itemize}
\item really long line which gets wrangled in my vim
terminal, so that i don't see where the second item starts.
\item another long line. maybe 200 characters long?
\end{itemize}
is complicated and you can't read it well. this otoh is very easy to read: * really long line which gets wrangled as well, but is
better to read because it starts with a clear sign which
is recognized to be a bullet.
* next line, which is also very long.
Easy readability is crucial, because i needed proof readers. The young proof readers could actually get the markdown code and correct my mistakes there (or write comments, starting with another fixme). really rocked with diff.The older proofreaders could proofread it in the final stage in ms word with the track changes functionality.
I put a lot of thought into Design and Typography and i was sure that i could decide better how my document should look, than latex. I agree, that for some people this is not the case.
After a draft or two, transitions to LaTeX is a must. [Pandoc](http://johnmacfarlane.net/pandoc/) for the win!
Actually the Plan was to typeset it in Indesign, but as i woke up the day of the final layout i just decided to do it in Word.
I'll just pretend it's a parody.
This is what most people do in physics and astronomy. You make the plot in some kind of plotting package and export it to a vector format. In astronomy, the journals only recently started accepting PDF figures in addition to EPS.
In my experience doing all of my figures in LaTeX is significantly more painful than using a real plotting package like matplotlib.
What about tables? Granted they aren't fun to make, but I am not aware of any methods of creating them outside of a latex document.
The point isn't if Markdown has enough features, but rather that LaTeX lets you a pay a price for those features that you shouldn't be paying, just because it's a 40-years-old software.
The best thing about markdown is pandoc.
Also, even though Markdown tends to be fairly easy to write, there are many edge cases where you can't really be sure what the result is unless you try it.
LuaLaTeX is a reimplementation of PDFLaTeX on that base.
ConTeXt is a new syntax/concept based on LuaLaTeX (that doesn’t want to be compatible with LaTeX and its errors)
---
That shell is unfortunately MS PowerShell. There are several approaches to do it in a way more familiar and compatible with unix shells. (some of which have been started recently, such as Final Term, and some are vaporware, such as TermKit)
And most editors are like that, some of which even have an optional vim mode for fans of that control scheme (my favourite is Kate)
http://windows.microsoft.com/en-ph/windows7/use-math-input-p...
OneNote has "insert Ink Equation" (I don't know if it uses the same engine, or has its own).
I'm not convinced that's worse, but I'm not convinced it's better for the task of being a shell. It's totally, unequivocally, way the hell better when you're trying to build anything large out of it, but taking everything back to byte streams at the interfaces means a huge ability to easily reformulate things to fit them together.
What do you mean by "know what a directory is"?
That comparison right there, between systems in entirely different categories, tells me you have no idea about what you're saying.
You only need to run it multiple times if you use features that require it, and that is because one pass generates code to be read in a second pass.
The syntax is not ugly. It's a macro programming language.
If you don't like use vim (or emaca with AucTeX) to write it, look at LaTeXila - it's pretty good. If on Windows, notepad++ is also free and has excellent support for LaTeX.
Then you try command-line Unix for the first time and nothing works anymore. You have to unlearn the habits of a lifetime before you can do something as simple as edit text. You can't even remap them effectively, because most of them do something else in vim or bash that you'd have to move elsewhere.
This is one of those problems that is just completely invisible to old Unix hands. It took me years to stop writing code in Notepad, because using vim felt like trying to drive a car with the gas and brake reversed, and someone punching me in the face every time I reach for the turn signal.
I'm not saying Unix conventions are objectively worse than Mac/Windows ones. Once you've got them trained into muscle memory, they're just as effective as anything else. But that need to retrain is a pointless roadblock in the path of every would-be hacker.
But seriously, this is a complaint I hear from undergrads in CS all the time. My answer is the same every single time: stop whining and get over it. You're a professional now, you use professional tools and sometimes they work differently, that's just the price of admission. Nobody whines that driving an 18-wheeler is different from driving a compact car, they just suck it up and train for a CDL.
To play devil's advocate to myself, yes, obviously just switching everything over to GUI standards overnight would cause all sorts of problems. Tradition is not inherently valuable, but standardization is. But for fuck's sake have some basic human empathy. In the context of an individual career, having to unlearn and relearn how to edit text is a pointless speedbump that gets in the way of learning actual skills. Teach students what they need to learn to survive in the world, but recognize that their complaints are valid.
So yes, there are differences, but the nix people have gone to great lengths to bridge the gap, to the point that I have zero sympathy for people who can't make the switch (note that I'm not saying everyone needs to use nix, that's a totally different debate, just that anyone who wants to should be able to).
Now, the OS X Terminal (and programs run through it, including vim) does support Cmd-C (after highlighting with the mouse), Cmd-V, and Cmd-A, because the OS can treat them as raw text without the terminal knowing anything about them. It doesn't support Cmd-X, Cmd-Z, or even basic navigation keys like Home and End.
" Make it behave more like a (Windows) GUI editor
source $VIMRUNTIME/mswin.vim
behave mswin
and use gvim - the GUI counterpart.Org-mode has exporters for LaTeX, PDF (via LaTeX), HTML, DocBook, PDF (via DocBook), various flavors of plain text, OpenDocument text (which can get you to Word if you want to go there), all of which work quite well; if you need to supply LaTeX source as input to some external pipeline, Org makes it possible for you to do so. On the other hand, if you prefer to spend as little time as possible dealing with raw LaTeX, which in my experience seems like a sensible attitude to take, Org makes that possible as well. And on the third hand, if you need to write LaTeX source directly for complex diagrams and such, or if you want to override the way Org generates LaTeX in specific cases but let it handle the rest of a document on its own, Org doesn't get in your way there, either.
You can also include code snippets in an Org-mode file, of arbitrary length and in arbitrary languages. If they're in a language Emacs understands, you can have it render them with syntax highlighting, but that's just the tip of the iceberg; you can also have Org-mode execute those snippets, whether ad hoc or as part of the compilation process, and it can incorporate their results into the document verbatim or after a variety of transformations, and also use those results as input to other code snippets in the same document. This is why the literate programming folks love Org-mode as much as they do; there's nothing quite like it for interweaving text and code and then being easily able to do interesting things with both.
And, although Emacs is by far the most powerful editor for Org-mode files, there's nothing saying you have to use Emacs to edit Org-mode files. You can, for example, use Vim to write your Org-mode source, probably with some degree of highlighting via some vimscript file or other. You can then invoke Emacs in batch mode to compile your Org source into whatever format you want to come out the other end, without ever having to see or deal with the Emacs editor interface, and without having to involve yourself save on the most superficial level with Emacs Lisp. (I'll be happy to provide the general form of such an invocation, if you're interested; let me know.)
For the one percent (perhaps) of the documents which really end up on paper, I guess LaTeX is fine. Or Word. Who cares?
People have made fancy new shells build around things other than bytes through pipes, people have created new replacements for terminal emulators, and people have created fancy GUI document creation systems with fancy instant visual feedback (a.k.a: word processors). Real shells, real terminal emulators, and LaTeX are all still used despite the creation of these meant-to-be replacements.
Habits die very slow.
I don't think this is something that follows age lines. Whether or not somebody primarily has a background in the FOSS world or in the Windows universe is probably a much stronger indication of what sort of tools they use.
Before getting my first UNIX contact, via Xenix in 1994, I was already fully comfortable with the GUI world of Amiga and later on PCs. Including GUI alternative environments like Smalltalk and Oberon.
So, although I do master the CLI, I rather spend my time in the cosy GUI world.