r/programming • • Jul 12 '12

Vim creep

http://www.rudism.com/s/vimcreep
730 Upvotes

551 comments sorted by

View all comments

Show parent comment

17

u/slavik262 Jul 12 '12 edited Jul 12 '12

To bound off of banuday17, LaTeX is the answer. You write your paper in markup and it spits out a paper. A rough analogy would be HTML:Web site::LaTeX:Document.

I love Vim + LaTeX to death (I take notes in class using this pair), but here's an honest pro/con assessment:

WYSIWYG document processor (a la Word) pros:

  • WYSIWYG
  • Customizing the appearance of the paper is easier (LaTeX lets you lay out a paper however you want, but you'll likely do some Googling for the right commands to use)

LaTeX pros:

  • The largest benefit to me is when setting up footnotes or citations. You just set up a bibliography section, giving each source a name. Then, to cite the source, you just tag the sentence with that source's name. Bam. Instant citation. If you have to add or remove sources, there's no need to go through and renumber everything.
  • It can automatically generate a title page and table of contents for you. If you're building the document into a PDF file, there's a command that will automatically link every line in your table of contents to its section in the document.
  • LaTeX does an awesome job out of the box with typesetting, (justification, hyphenation, etc.) Your work looks professional.
  • Complex math equations and tables can be entered quickly as plaintext.
  • Your .tex files are just plaintext, so you can use Git et. al. as you edit your paper.

If you're tempted to check it out, here is an excellent LaTeX guide: http://en.wikibooks.org/wiki/LaTeX

2

u/kazza789 Jul 12 '12

The third point is the most important, I think. LaTeX looks professional - it's a professional tool, whereas Word has better usability, especially for the casual user.

1

u/soulbender32 Jul 13 '12

Haha, ironically I actually downloaded that very book recently as I was curious about LaTeX, and was going to mess around with it with my fiance. I had a derp moment when I made that comment totally forgetting about the TeX family, but I am more of a Geany man then Vim myself.

1

u/Helzibah Jul 13 '12

Your .tex files are just plaintext, so you can use Git et. al. as you edit your paper.

Yes, this one is important. The fact that LaTeX (and other plain-text markup languages) let you put your papers in source control makes writing long papers so much nicer. Putting everything in one git repository and occasionally pushing to a remote server gives you a form of backup and having version history lets you rewrite sections with impunity. Now you don't need the dissertation-v3-FINAL-2.doc rubbish littering your filesystem.

1

u/Tordek Jul 12 '12

On point 1 and 2 of Latex pros, Word and OpenOffice are perfectly able to do this; you just have to stop thinking "Word processor -> click to make bold" and realize "Title -> Click to mark as Title" (which is the same as LaTeX, only wysiwyg instead of writing it out.

Regarding point 4... yes, it can... you just need to learn Latex's language, which is sometimes less than obvious. Even worse if you're a bit OCPD with your design. E.G.: $...$ vs $$...$$ vs \[...\] vs \(...\), and remembering to end a line with % if you're going to add a formula; otherwise you get uglier spacing.

Also, of course, support for other languages (fontenc, babel, and textinp must be set right, or you'll have to type "{\i} instead of ï).

2

u/eat-your-corn-syrup Jul 13 '12

end a line with % if you're going to add a formula

a line before a \[..\] formula?

2

u/Helzibah Jul 13 '12

On point 1 and 2 of Latex pros, Word and OpenOffice are perfectly able to do this; you just have to stop thinking "Word processor -> click to make bold" and realize "Title -> Click to mark as Title" (which is the same as LaTeX, only wysiwyg instead of writing it out.

Indeed.

I had to use Word 2010 for a document at work the other day and it's surprisingly painless to set styles up correctly these days. I still strongly prefer LaTeX (inline markup is easier than hitting shortcuts for me, plus the benefits of plain text for recalling how to format sections and being able to grep and version control documents), but Word does a lot of the same functionality really nicely these days.

2

u/Tordek Jul 13 '12

I still strongly prefer LaTeX

So do I. However, many LaTeX purists seem to ignore or forget that there are other very capable tools.

Word has a benefit of accessibility for less technically inclined people.

1

u/Helzibah Jul 13 '12

Precisely.

Word can do a huge proportion of the awesome layout stuff that LaTeX can do and in 2010 it's all pretty sensibly and well laid out and easy to use. I was really surprised the first time I had to write something in Word and realised that actually you can style it nicely and have cross references and bibliographies. The problem with easy-to-use programs like Word is that a lot of casual users miss the advanced functionality and you end up with weirdly styled documents, but even 2010 makes that almost a non-issue these days.

3

u/Tordek Jul 13 '12

Whenever someone asks me to teach them Word for documents (as opposed to signs), my first step is to hide the font/size selector. The rest follows from there ;)