Hacker News new | ask | show | jobs
by TheApexTheater 3340 days ago
Honest question: I tried using LaTeX for a homework assignment. I had already done all the work on some loose paper, but it was all over the place and thought LaTeX-ing it would help readability. It took me about three hours and I wasn't even halfway done (there were four questions and I had barely done the second one)... Is taking this long normal for LaTeX? or is it something you get better at with practice?
12 comments

I'm doubtful that using Latex for ephemeral stuff like math-heavy homework is a good use case. It's excellent for documents like journal papers and tech reports that you will be revising and distributing, and perhaps coming back to months later. It's also great for collaboration. I could see it working for a lab report.

With mathematical homework, aren't you spending significant time ensuring that what you typed into Latex rendered correctly? (I.e., the edit-compile-look loop?) I sometimes omit parentheses or put braces in the wrong place, which causes the display to be in error. Introducing another step in the process seems troublesome, and would take me out of the "zone" of problem-solving. (I.e., handwritten copy -> Latex -> rendering vs. just handwritten copy.)

I switched from troff to Latex around 1991. The explanatory tables for the sprinkler system and the electrical panel for my house are in Latex. So, I'm a Latex-phile, just skeptical about this case.

On the other hand, doing homework with latex means you'll have less cognitive load when using it for 'real' work later on. I would say it's more a good investment than a necessity.
>With mathematical homework, aren't you spending significant time ensuring that what you typed into Latex rendered correctly?

>[..]

>I could see it working for a lab report.

I think here is your answer: much depends how much your homework is like a lab report. I have occasionally had courses where the were only a few homework assignments and lecturer expected written answers typeset in LaTeX (or similar).

But I wouldn't bother either if I was the only person who would read my written notes.

I use it for homework when I often need to edit my previous work, or so that I can omit the proofs of "obviously true" lemmas the first time round, make sure the whole proof works, then go back and fill them in.
It makes grading easier, so you get better feedback---and more attention to substance.

Every graduate math class I've taken has asked for typeset problem sets; some have required it.

Wow, I am surprised and intrigued! Last time I took a graduate math class was 1995. It was definitely pencil and paper.
During undergrad, I wrote up all applicable college assignments using LaTeX for ~3 years. I recommend it if you want the ability to skillfully typeset math or if you plan to attend graduate school.

Pros:

- Transcribing from paper often revealed problems with my solutions

- Easy to modify / improve solutions once typeset

- Easier for me and the graders to read (I have bad handwriting)

Cons:

- Steep learning curve (first assignment took me many hours to complete, but provided the template for future assignments)

- Painful to edit sequences of equations if you are explicitly showing your work

I would find someone's homework template and just copy it. Then when you go to copy your work to LaTeX just replace their content without touching the formatting if that makes sense. I too tried to learn LaTeX in college but decided the learning curve wasn't worth overcoming and what I wanted really wasn't that unique.

Eventually you're going to come up with your own formatting ideas that you can tweak over time but it's much less stressful than drinking out of the firehose when your homework is due in four hours.

I used LaTeX for problem sets throughout grad school, although when I was done with coursework I switched over to Markdown for the dissertation. As long as you only plan to convert your Markdown to LaTeX, you can drop into LaTeX whenever you need more control. This requires knowing LaTeX really well however, which is why it was handy that I'd used it for my problem sets. The end product is really much better, and you do get much better at it with practice, particularly if you also learn a real text editor.
You get better. Simple expressions are almost as fast as writing by hand. More complicated layouts, alignments, etc. are still slow sometimes.

Your TA thanks you infinitely for typesetting homework in LaTeX :)

Start out simple. Get Learning LaTeX by Griffiths and Higham. It's a short book that gives you the basics to get started and enough experience to start understanding how to do more advanced things.
Definitely a case of practice as others have said. When I first started using LaTeX I was looking things up on tex.stackexchange.com every two minutes. Once I'd gotten used to it and created a lot of documents, I was able to use it to take notes in real time faster than I could write. I now use LaTeX to take all of my lecture notes and it does a great job. I've defined a couple of helpful environments and created a documentclass along the way to set things up how I like, but it's so much faster than e.g. Word or pen and paper.
Many years ago when I did my math homework in LaTeX I never wrote raw LaTeX, instead I used LyX (www.lyx.org). It's basically your standard document editor with a GUI equation editor. If you're not obsessed with all the LaTeX layout stuff it's great for just typing up stuff with equations and making it look nice.
I don't do my calculations/scratchwork in latex, but I know people who do, and take notes with it, etc. It's definitely got a learning curve, but once you've got it down it can be faster than writing by hand for a lot of things in mathematics (at least, according to some people I know).
I reached this point in graduate school, though it took a few years for it to feel that natural.
I wonder: did you spend much of this time on math formulas, or on "regular" typography like lists & headings? TeX math notation is the pretty much only game in town, and worth learning, but there are many ways to skip/ease the rest, might help your learning curve:

- WYSIWYG with TeX math: Dropbox paper lets you press $$, type formula, press Enter; and I shudder to suggest it but I hear modern Word more or lets you type TeX math [https://superuser.com/a/509805/33415].

- WYSIWYM: Lyx, https://www.fiduswriter.org/, http://www.texts.io/

- Markdown with TeX math: there is alas no single standard syntax but tons of tools do support it: https://github.com/cben/mathdown/wiki/math-in-markdown For conversion Pandoc is king, infinitely flexible, and can render through LaTeX, HTML or many other ways.

* Markdown is unbtrusive enough that styling it in-place gives you a form of WYSIWYG. Several editors doing this (plus rendering formulas in-place): StackEdit, Typora, https://www.gitbook.com/editor, Atom with https://atom.io/packages/preview-inline (see also https://discuss.atom.io/t/19222), http://markdownnotes.com/, and my own https://mathdown.net

- https://overleaf.com similarly has "rich text mode" that styles LaTeX source and renders formulas in-place. [https://www.overleaf.com/blog/81]

- Other lightweights markups: there are too many, notably reStructuredText, asciidoc are popular and powerful. But I'd start with Markdown.

I'm genuinely interested to hear your experiences if you try any of these...

I don't think it should take that long - I definitely got much faster with practice.
It takes a little bit of time and effort to get everything formatted perfectly. But it sounds like you were having an especially tough time. It just takes a lot of practice and repitition.
Try typing up notes from a class. Great way to review the material and to learn LaTeX without a time crunch. Plus then you will have figured out all the formatting you need for the next homework.