Examples from The LaTeX Companion book (3rd edition)

18 hours ago (ctan.org)

First, anyone who is interested in this should buy the books:

https://www.informit.com/store/latex-companion-parts-i-ii-3r...

I was certainly glad to, since the binding was breaking on my 2nd edition due to constant usage, and I was glad to have the option of buying hardcovers.

Second, work through a good tutorial, there are many, but I like: https://tug.ctan.org/info/lshort/english/lshort.pdf

Third, learn your way around CTAN, and https://tex.stackexchange.com/ --- for pretty much any problem you have, there should be a package or code snippet which addresses it, if not ask on SE or https://old.reddit.com/r/LaTeX/ after searching (and let folks know what terminology you used in your search), and consider using one of the nice well-documented documentstyles suited to your project --- Koma is good for Europeans, I like Memoir and not just because the first author was kind enough to consider my suggestions for the manual or implement some simplistic code I sent in (has anyone heard from Peter Wilson lately?)

Lastly, when working with macros and packages and so forth, conceptually divide them between semantic markup (this bit of code describes how this text/number should be represented and thought of) and appearance (this bit of code is necessary to get the text on the page at this pagination state in the best possible way) --- all of the latter macros should be defined twice, once as null ops in one package file, a second time redefined to actually do what is desired in a second package --- that way, the page can be set without them just by commenting out the second package. It's even better if all such macros are named in such a way that they can be easily commented out w/ a find-replace.

This[1] is what I use. So far haven't needed anything that's not supported by Katex. and Pandoc doesn't seem to have any problem with converting my stuff to Latex.

The only real problems I ever ran into were due to markdown (errors?) that vscode preview ignores but pandoc trips over. Mostly having to do with not leaving blank lines between different Markdown elements.

[1]: https://katex.org/docs/supported.html

  • KaTeX and MathJax aren't really the same as (La)TeX at all though---they support the same math syntax, but LaTeX is a complete document processing system while KaTeX is just a math renderer.

    KaTeX + Markdown is comparable to LaTeX, in the same way that notepad.exe is comparable to an IDE---they both do the same thing, but one has 1000× as many features as the other. I'm personally biased towards LaTeX, but simpler solutions like Markdown certainly have their place.

Just when I started to look back at latex to typeset some poetry of mine yesterday!

Been a while since I didn't touch it, so I didn't even have texlive installed on my Ubuntu box, and started a chase of dependency to make my French specific stuff to install. I still need to see if I can manage to make the three strophe I wrote be as rectangle shaped as possible, be it with automatic line break on a vers (not sure the term in English) to the next row right aligned and preceded with a [

  • There are packages that support poetry directly.

    And if you’ve not seen the memoir package collection it (and the accompanying ebook on typesetting) is worth a look.

  • I'm not 100% sure what you're looking for, but placing "\parfillskip=0pt" at the start of the paragraph will make the last line end on the right margin, which I think is what you mean by "rectangle shaped".

Not sure why is this posted here, pretty much useless without the book

  • Who doesn't own the third edition of the LaTeX Companion book?

    • Hmm, I guess most people. Just like TAOC, everybody talk about it and even those who buy it let it rot on a shelve.

      I remember in university one of the professor coming to me during my master asking how did I achieved this fancy stuff in my report. Dude I just red the book, lol. I didn't manage to validate my M2 though, double lol. :D

      1 reply →