4 ms·
How appropriate, I just finished a paper today and submitted it for review. LaTeX is awesome and sucky at the same time. On the awesome side, you have structur
by sophacles 16y ago
How appropriate, I just finished a paper today and submitted it for review. LaTeX is awesome and sucky at the same time. On the awesome side, you have structure separate from formatting. This comes with lots of benefits as mentioned in the article. It also allows you to use the concept of imports (or includes if you will), so you can have a well factored paper. It also allows you to do sane things like footnote, cite and reference diagrams and sources without a need for explicit number tracking -- just give everything a unique identifier that works for you. Finally if you do well enough with your structuring you can output not just different file formats like pdf or ps or whatnot, you can also output completely different styles. It is pretty simple to wrap your core with the trappings of IEEE style for one version and a book-like style for another.
On the sucky side, the toolchain is notoriously difficult and cryptic. For some reason you have to make multiple passes of various tools by hand (or with a makefile -- i reccommend http://code.google.com/p/latex-makefile/ http://code.google.com/p/latex-makefile/ it just works). The syntax can be a bit inconsistent. The worst is the errors tho, sometimes it is impossible to figure out why all your figures are showing up at the end of the document instead of in-place, or why all your references are failing to point at anything.
Overall tho, it is a fantastic system :)
- petrilli 16y agoYou probably know, but the reason there are multiple passes is because once a page is typeset, you can't go back and "fix" it. TeX is very page-centric. So references, for example, aren't "knowable" until you've typeset all the pages. Then the next pass goes through and updates the forward references. It could be done another way, but in the era that TeX was developed, it would have required more memory than was realistically available most of the time. I find that once I've run it twice, I can get away with single runs usually after that until I'm ready for the "definitive" version. Until then, I'm less concerned with whether the cross-reference is right, than whether there is a cross-reference in that location at all.
- shasta 16y agoYou know, gcc uses multiple passes, too, internally. If gcc were to use latex's model, you'd have to run it multiple times to get a working executable. Mind you, it would produce an executable every time, but those first ones would just crash. Latex can produce some nice looking documents, but as a technology, it's shoe strings and bubble gum.
- mturmon 16y agoThe only problem is that the cross-references may be out of sync. This is usually not a serious barrier to readability. Another gcc analogy is a dependence on a third-party library whose API keeps changing. Then you'd have to run gcc once to regenerate the library, and once on the client using the library. Peeling that back a level, the analogy is between files like libfoo.a and foo_defs.h (for gcc) and files like section1.aux and document.bbl (for latex).
- aeroevan 16y agoLaTeX will warn you when the references are out of sync, and there is no reason why it can't make a second (or third) pass internally without having to call (pdf)latex manually again and throwing .aux .log .other_random_stuff files everywhere.
- parfe 16y agoSo whip up a shell script and call it "better_latex" mark it +x and call the real exe multiple times. Now it's an improved version that does it internally, just like gcc
- neilc 16y agoI just use LaTeX-Mk or a similar package, which takes care of multiple runs of LaTeX fairly well. http://latex-mk.sourceforge.net/ http://latex-mk.sourceforge.net/
- tome 16y agoYou can do "imports", and you can also factor anything that's repeated into macros. The problem is that the lack of namespaces and weird scoping rules are so antiquated that it's painful to use when I know many programming languages that do the job far better. On the other hand, it does support currying of macros!
- drunkpotato 16y agoI've started using org-mode to write my papers, then convert to LaTeX. Not perfect, but I find it's more natural to write in org-mode and helps me focus on the content instead of drifting off onto the internet to research macros. (Now I can drift off to read HN instead, a vast improvement in non-productivity.) I've started thinking of TeX as the assembly language of document formatting, LaTeX as C, and org-mode as... pick your favorite higher-level language here, I'll go with Python. Not a perfect metaphor, but in terms of paper productivity it feels that way.
- sophacles 16y agoThis is interesting. How do you do your conversion?
- johngunderman 16y agoM-x org-export-as-latex
- tome 16y agoCan you automatically convert from org-mode to LaTeX?
- peterb 16y agoTo export to LaTeX, see: http://orgmode.org/org.html#LaTeX-and-PDF-export http://orgmode.org/org.html#LaTeX-and-PDF-export
- drunkpotato 16y agoM-x org-export or C-c C-e brings up a menu of options for export, including HTML, LaTeX, and Docbook. The org-mode manual has good information: http://orgmode.org/manual/LaTeX_002fPDF-export-commands.html http://orgmode.org/manual/LaTeX_002fPDF-export-commands.html
- surki 16y ago> Not perfect, but I find it's more natural to write in org-mode Do you have any specifics on the problems you faced? I produced my master thesis entirely using orgmode without any problem. (defined custom latex class, with different kind of ToC etc, not that difficult)
- Lewisham 16y agoI use rake-latex for my workflow, which is also pretty awesome: http://devel.softeng.ox.ac.uk/trac/softeng/wiki/Utilities/RakeLatex http://devel.softeng.ox.ac.uk/trac/softeng/wiki/Utilities/Ra... My main TeX annoyance is tables, but I don't think anyone has come up with a decent way of expressing them in a textual manner.
- scott_s 16y agoI took a look at the Makefile, and I'm not entirely comfortable using it while not knowing exactly what it's doing. I normally don't require to know and have control over everything, but with Latex, the less unknowns I have, the better I feel. This is what I've been using, inherited from a colleague/committee member/friend: PAPER = paper_name SECTIONS = $(PAPER) abstract introduction design results conclusions default: $(PAPER).pdf $(PAPER).bbl: $(PAPER).bib pdflatex $(PAPER).tex bibtex $(PAPER) $(PAPER).pdf: $(PAPER).bbl $(foreach SECTION,$(SECTIONS),$(SECTION).tex) pdflatex $(PAPER).tex pdflatex $(PAPER).tex pdflatex $(PAPER).tex clean: -rm -f *~ -rm -f $(PAPER).aux $(PAPER).log $(PAPER).out $(PAPER).bbl $(PAPER).blg -rm -f $(PAPER).idx $(PAPER).ilg $(PAPER).ind $(PAPER).dvi $(PAPER).toc -rm -f $(PAPER).pdf
- joegaudet 16y agoFor a remedy to the "sucky side" if you have a mac + TextMate, it all _just works_. You do everything you would normally do, and then hit cmd + R which will run the typesetter. My buddy during my undergrad used LaTeX, at the time the thought of debugging my documents seemed insane (though he could do some amazing ninja stuff like rebuilding his graphs in matlab and importing them on build). Since starting my masters, I've taken it up, and yes it is awesome.
- scottdw 16y agoFor those using a windows environment I find TeXworks (http://www.tug.org/texworks/ http://www.tug.org/texworks/) is an easily installable TeX environment.
- rbonvall 16y agoAfter using (and writting) several ugly Makefiles for compiling LaTeX, I discovered rubber (http://www.pps.jussieu.fr/~beffara/soft/rubber/ http://www.pps.jussieu.fr/~beffara/soft/rubber/) and never looked back. It is packaged at least in the standard Ubuntu and Fedora repos. I use the following Makefile wrapper around it: DOC = memoria all: rubber --pdf $(DOC) clean: rubber --pdf --clean $(DOC) .PHONY: all clean It handles biblography, knows how many times recompile and discovers dependencies.