Hacker News new | past | comments | ask | show | jobs | submit login

As a frequent LaTeX editor (professional mathematician) -- what are you attempting to accomplish? And what do you mean by a "best practice"?

My usual operandi is: poke around or Google for a solution, until I figure out one of the fifty ways that achieves my desired outcome. I then declare my problem solved. If my solution is deprecated (by whom?), then whoever deprecated it may tsk-tsk to their heart's content.

Most mathematicians I know are not all that fussy with how they write their LaTeX documents, the same way programmers can be extremely fussy with their code. If there are "best practices" out there, then they aren't widely known or followed.

That said, here's something that may interest you. On the arXiv (arxiv.org), at least in math and probably in other disciplines as well, the LaTeX code is available for nearly any paper you want. Pick your favorite paper, and then click "Download other formats" on the right.

If nothing else, you can see what professional researchers are using in practice.




For example, there are two "dialects" for writing equations: vanilla LaTeX, and the amsmath package. Also, graphicx is not the only package for including images in to a document (I just forgot what the other options are).


>As a frequent LaTeX editor (professional mathematician) -- what are you attempting to accomplish? And what do you mean by a "best practice"?

Well in the simplest case how about something like \bf versus \bfseries versus \textbf?

Google that and you'll find thousands of blog posts, each telling you which is the One True Way™ but not expanding on the why.

Finding actual answers is really hard for latex.


> Well in the simplest case how about something like \bf versus \bfseries versus \textbf?

Use any of them.

> thousands of blog posts, each telling you which is the One True Way™

When I don't know how to do something in LaTeX, here is my flowchart for figuring out how:

1. Google

2. Look at any of the thousands of blog posts

3. Try the proposed solution, while ignoring any "One True Way" crap

4. Are the results what I wanted? If yes then done; if no go to Step 1.


That sounds like a recipe for mysterious breakages and subtle inconsistencies. And most importantly you can never develop a feel for the language if there are no clear idiomatic ways to solve some problems. There needn't be one true way, but there has to be some consistency.


I would say this is true of a programming language, but not really of LaTeX.

Now LaTeX technically is a programming language, it's Turing complete. But in practice for most users it's not.

Sure, there might be subtle inconsistencies. There might be some bit of mathematical notation that looks slightly different in one part of your document than another. I guess some people would be bothered by this, I'm not one of them.

It is true that it's possible to become a LaTeX power user, and write all sorts of sophisticated macros. In that case, yeah, you want to get the foundations right. But if you're just doing something simple (e.g. writing up a math paper), then mysterious breakages aren't an issue; there's not really anything to break.

When I worked as a programmer in industry, I was quite anal retentive about how I coded, and getting a feel for the languages I used. They were the tools with which I did my work. But LaTeX, for me anyway, is merely the tool with which I typeset my work. An outstanding tool, perfect for the job -- but not one I choose to invest time in mastering.


To me, this sounds like a very reasonable approach.


Yes, which is why my arxiv target in my Makefiles strips comments in addition to putting all files in the same dir etc.


Indeed, reading through the comments can be quite entertaining at times. I think that many authors don't realize they can be read....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: