News for hackers. Stuff that matters.
Re:Ask HN: Examples of reliable software you enjoy using by barsonme on Tuesday June 28, 2016 @05:39PM (#11997798)
If you've any latex pointers I'd appreciate it :)

I used latex to write a paper for the first time last week, and while i thoroughly enjoyed it, i'm fairly confident there were lots of things I could've done better.

Re:Ask HN: Examples of reliable software you enjoy using by Analemma_ on Tuesday June 28, 2016 @06:09PM (#11997997)
IME, the most important key to Latex is setting up your environment so you can have a fast turnaround time between writing some markup and seeing what it looks like (essentially, getting a "Latex REPL"). There are a bunch of different ways to do this, you'll have to pick what's best for you. On Macs I tend to use Sublime Text (substitute with your editor of choice) with a macro to invoke pdfTeX; on Windows I use TeXstudio which has live preview support. There are other ways; do whatever's best for you.

The second most important thing I've found for latex is setting up macros. In TextExpander/AHK I have several dozen Latex macros set up, like

  \tbl3 => \begin{tabular}{ l | c | r }
             a & b & c \\
           \end{tabular}
With a bunch of variants for different styles (full borders, etc.), column numbers, etc. Once your macros have become muscle memory, writing Latex speeds up considerably.
Re:Ask HN: Examples of reliable software you enjoy using by majewsky on Wednesday June 29, 2016 @02:40AM (#11999904)
On Linux, I do the following:

  while inotifywait *.tex; do sleep 0.2 && pdflatex main.tex && killall -HUP mupdf; done
This will, when a .tex file is written, wait a moment until all disk IO is done, then run pdflatex and trigger a reload in my PDF viewer (some also do that automatically when the .pdf file is changed).

The only annoyance is that big .tex files (esp. Beamer presentations) may take long to compile, which interrupts the flow. But in that case, it helps to distribute the sources into multiple files and to comment out the source files that are not needed at the moment.

Re:Ask HN: Examples of reliable software you enjoy using by lucb1e on Wednesday June 29, 2016 @06:54AM (#12000749)
inotifywait is fantastic, used it lots of times. Good idea to use it for TeX too!
Re:Ask HN: Examples of reliable software you enjoy using by kurlberg on Sunday July 03, 2016 @08:45AM (#12025842)
For emacs users I strongly recommend whizzytex + advi (at least if you find advi in your repos; it's somewhat painful to build advi on your own.) Almost as good is emacs + auctex - the first C-c C-c compiles the file, the second brings the document up in a dvi previewer with the page "flipped" to whatever you are working on. Both setups allow inverse search - click somewhere in the dvi viewer and your emacs cursor is moved to the corresponding source location.
Re:Ask HN: Examples of reliable software you enjoy using by barsonme on Wednesday June 29, 2016 @01:20AM (#11999651)
Yeah, that makes sense. I'll make sure to do that. It was kind of time-consuming typing out the couple tables I did add.

I used latexmk which watches file(s) for changes and rebuilds with pdflatex. It was nice, but made my laptop run real hot, and inotify never really works very well.

Which ST plugin do you use?

Re:Ask HN: Examples of reliable software you enjoy using by eivarv on Tuesday July 05, 2016 @03:29AM (#12034903)
Not OP, but I've had good experiences with La​Te​XTools[1].

[1]: https://packagecontrol.io/packages/LaTeXTools

Re:Ask HN: Examples of reliable software you enjoy using by jloughry on Tuesday June 28, 2016 @06:07PM (#11997975)
Use makefiles and git with LaTeX. Use \input{} to structure large documents as a main file that includes smaller ones. Keep all your BibTeX citations in one large .bib file (under git) and symlink it into the current directory for every new document; it makes bibliographies so much easier.

PDFLaTeX makes it incredibly easy to keep all your graphics in PDF files; it makes them so much nicer to deal with. Inkscape is great for making vector graphics for use in LaTex; keep the source code of the graphics in SVG but save as PDF for LaTeX to use (tell Inkscape to export only the drawing to PDF, not the whole page, and you'll never have to crop or resize your graphics ever again).

Finally, use a modern TeX like XeTeX that directly understands Unicode characters and TrueType fonts.

Re:Ask HN: Examples of reliable software you enjoy using by barsonme on Wednesday June 29, 2016 @01:22AM (#11999660)
Oooh, I like the .bib idea. I might steal it and use it for select things---I decided it'd be a good idea to go back (sorta) and finish my BS, so creating one for each class might be a very good idea.

Import as .pdf not .svg? Got it. It was tricky fiddling with percentages and stuff to get the .svg to fit properly (and look decent).

Thanks! I'll look into XeTex.

Re:Ask HN: Examples of reliable software you enjoy using by justinlardinois on Tuesday June 28, 2016 @07:00PM (#11998265)
I second git and Make, but I'm not sure I agree with the single .bib file thing. That works if you're writing a lot of documents on the same subject that use many of the same sources, but that's a very specific use case.
Re:Ask HN: Examples of reliable software you enjoy using by avn2109 on Wednesday June 29, 2016 @12:41AM (#11999536)
IMHO the best TeX tutorials on the internet are written by some Helpdesk guy on his blog:

http://www.terminally-incoherent.com/blog/2010/02/15/lets-le...

I'm not affiliated in any way with that site but the pedagogy is very approachable. Also it helps to use a site like WriteLatex.com or ShareLatex.com to do the hard setting up part when you're just starting out.

Edit: I see he is no longer a helpdesk guy, and his blog's tagline is (unfortunately) no longer "I will not fix your computer."

Re:Ask HN: Examples of reliable software you enjoy using by barsonme on Wednesday June 29, 2016 @01:18AM (#11999645)
That looks great, thank you for sharing!
Re:Ask HN: Examples of reliable software you enjoy using by akincisor on Tuesday June 28, 2016 @08:01PM (#11998543)
The only LaTeX link you'll need: https://tobi.oetiker.ch/lshort/lshort.pdf
Re:Ask HN: Examples of reliable software you enjoy using by dbcurtis on Tuesday June 28, 2016 @05:48PM (#11997851)
I've recently discovered Quiver. Mac only, but open file format spec (if you are feeling particularly energetic). But it certainly is the nicest thing I've found for doing LaTeX.
Re:Ask HN: Examples of reliable software you enjoy using by lucb1e on Tuesday June 28, 2016 @05:45PM (#11997826)
I've written two papers in it now, so I'm not a grandmaster yet either. If you managed what you wanted to do and enjoyed it, you probably know as much as me.

I'm not sure there is really a wrong way to use it. If you google every little thing to find a good solution (not manually inserting and formatting references for example), I don't think there is too much to be done better. At least, to my beginner's eyes it doesn't seem like it.

Re:Ask HN: Examples of reliable software you enjoy using by justanotherbody on Tuesday June 28, 2016 @09:54PM (#11999011)
I'm pretty weak at LaTeX but if you haven't used macros and rerender-on-write I'd strongly recommend it

The latter is something i achieved with sleep_until_modified.sh and a shell loop. Pretty rudimentary but functionally equivalent to modern webdev reload-on-write behavior. HUGELY beneficial to my learning latex syntax and behavior and formatting nuances

Re:Ask HN: Examples of reliable software you enjoy using by stirner on Wednesday June 29, 2016 @08:05AM (#12001068)
Many resources have been suggested, but not the guide written by the creator of TeX and computer science legend Donald Knuth: http://www.ctex.org/documents/shredder/src/texbook.pdf
Re:Ask HN: Examples of reliable software you enjoy using by taserian on Wednesday June 29, 2016 @11:11AM (#12002092)
Adding to the list of editors: LyX is a great cross-platform editor that I've used. https://www.lyx.org/
Re:Ask HN: Examples of reliable software you enjoy using by geff82 on Wednesday June 29, 2016 @02:53AM (#11999946)
Use TeXstudio to write your documents. It is an IDE with autocompletion and contextual help and an integrated viewer. Made writing LaTeX so much easier, as it also has wizards to generate repeating boilerplate. I love Latex, especially mathematical notations are a breeze.
Re:Ask HN: Examples of reliable software you enjoy using by pigscantfly on Tuesday June 28, 2016 @05:54PM (#11997889)
I would recommend trying www.writelatex.com.