7 ms·
LaTeX is still one of my favourite piece of technology of all time. It is at time so alien, yet beautiful. I now get closer to 10+ years of programming experie
by lindbergh 9y ago
LaTeX is still one of my favourite piece of technology of all time. It is at time so alien, yet beautiful.
I now get closer to 10+ years of programming experience, yet nothing comes close to debugging a faulty LaTeX custom command... it can quickly turn to an unreadable mess, but you have to admit that once everything is swept under a preamble.tex file, the rest of the code is very clean. Especially with auctex in emacs which displays most math symbols as their true unicode counterpart.
Funny story: one of my first gig was working in a music instruments shop where I was basically the IT guy, from sysadmin to web dev. At some point the software that created the barcode labels stopped working. Now I had to find an automatic way to make those labels, so of course I turned to LaTeX. All I needed to do was to write a batch file calling `pdflatex` with a template tex file and a pdf file for the label was promptly sent to the printer! There is probably some python package for doing the same thing, but I was so proud of seeing Computer Modern font tagged to every instruments in the shop!
- Tharre 9y agoDoes anyone know a similar plugin for vim?
- mscholz 9y agoIf you set `conceallevel' to 2 and use syntax highlighting, you should get it in vim without any plugins needed (although I have only neovim installed). For example, \AA -> Å, $\pm$ -> ±, and {\'e} -> é. http://vimdoc.sourceforge.net/htmldoc/syntax.html#tex-conceal http://vimdoc.sourceforge.net/htmldoc/syntax.html#tex-concea...
- Lxr 9y agoDoes anyone else find this "feature" really annoying? I always set conceallevel to 0 but vim seems to constantly find a way to replace my code with unicode.
- cormacrelf 9y agoIt could be that you're using a font with OpenType ligatures, like Fira Code.
- deleted 9y ago[deleted]
- jon_richards 9y agoI once heard a professor talk about writing a book 30 or so years ago. He looked at all the available options and decided latex wasn't perfect, but was the best available. 20 years later he decided to look at everything again and was appalled that latex was still the best option he had. Have you ever tried to color a latex table? If you color a cell, most readers will cover ~1 pixel of the upper and left table borders with the cell color, regardless of the zoom level. This is especially a problem on zoom levels where the border is only 1 or 2 pixels, but makes you feel insane when you zoom in so it's 10 or more. You know what the most common advice for fixing this is? "Get rid of your table borders. It will make your table look better." Latex is full of little problems like this, but it's still the best.
- deleted 9y ago[deleted]
- mkl 9y agoYou have much more control if you make your table in TikZ using a matrix of nodes. If you want borders, the key thing is setting "row sep=-\pgflinewidth, column sep=-\pgflinewidth" so the border doesn't get doubled up (see e.g. [1]). Latex is far from ideal, but it's still the best because it hasn't stood still - many people are constantly contributing improvements and new packages, and it's very hard for a new replacement system to compete with that. [1] https://tex.stackexchange.com/questions/18521/tikz-matrix-as-a-replacement-for-tabular https://tex.stackexchange.com/questions/18521/tikz-matrix-as...
- vog 9y agoThe takeaway is: If you are to judge LaTeX, judge its whole ecosystem. Otherwise, this is like saying Python is not suitable as HTTP client because "urllib" has too many quirk - ignoring the fact everyone else uses the excellent "requests" libraray. Although there are interesting developments at its code (XeLaTex, LuaTex), it is the packages which are ever evolving at a rapid pace. Have trouble with the "graphics" package? Use "graphicx" instead. Don't like the old "letter" class? Use "scrlttr2". And of course, use TikZ, it is one of the most well-designed, best-documented and comprehensive packages out there. Compared to most programming languages, what I really like about LaTeX is their almost almost merciless take on backwards compatibility. This means that your old "article" document almost certainly works with later LaTeX versions. There will never be a breaking new version of "article" that forces you to adapt your LaTeX code, like we see with so many libraries in other languages. But this also means that you are stuck in your "old world" if you don't keep your eye open for new packages, and are willing to learn them. There are quite a lot of StackExchange questions that are essentially like this: "Q: How do I fix my issue with package X? A: Use the newer package Y instead (or in addition)."
- ivan_ah 9y agoYes .tex programming is probably the least intuitive kind of language I've ever seen. Here is a FizzBuzz in vanilla .tex for anyone who curious to see what that's like: % fizzbuzz.tex -- Compile with pdftex, not pdflatex \def\modulo#1#2{(#1-(#1/#2)*#2)} % a mod n = a-(a/n)*n where / is integer division \newcount\X \X=1 \loop \ifnum \numexpr\modulo{\X}{15} = 0 FizzBuzz \else \ifnum \numexpr\modulo{\X}{3} = 0 Fizz \else \ifnum \numexpr\modulo{\X}{5} = 0 Buzz \else \the\X \fi \fi \fi \endgraf \advance \X by 1 \unless \ifnum \X>100 \repeat \bye
- pwdisswordfish 9y agoThat's pdfTeX, not vanilla TeX. $ tex This is TeX, Version 3.14159265 (TeX Live 2016/Debian) (preloaded format=tex) **\show\numexpr > \numexpr=undefined.
- taeric 9y agoHonestly, that doesn't seem that non-intuitive to me. Certainly missing opening and closing brackets, but if closing with fi is a common idiom of old languages. The rest doesn't seem that bad. Just verbose.
- ivan_ah 9y agoI had never seen this kind of yoda-speak before: \unless \ifnum \X>100 \repeat
- taeric 9y agoI guess to me it doesn't read that much worse than "if (!(x < 100))", which is somewhat bad form, but not unreadable. (More likely would it have been "if (!aboveThreshold(x))". I know I have seen similar in some lisp code. At least, I have seen "unless" before. Don't take my comment as my rushing out to embrace TeX. I just don't think it is nearly as bad as its reputation.