Regarding the idea to have some macros that expand to null when unwanted -- I have some "developer" macros that, in day-to-day use, do things like showing TODO items.
The most useful one typesets the labels of equations, sections, figures, and so forth, so I can copy-paste right from the document as I'm editing. That makes it so much easier to insert cross-references while writing, without breaking the flow to search out the definition.
Rather than commenting out packages, I have two top-level input files, which `\input{}` the actual content. Those files differ only where they read the developer-oriented definitions:
One thing I appreciate about John D. Cook's blog is that he doesn't feel the need to pad out what he wants to say.
Here, he had a thought, and he expressed it in two paragraphs. I'm sure he could have riffed on the core idea for another 10 paragraphs, developed a few tangential lines of thought, inserted pull quotes -- in short, turned it into a full-blown essay.
Given that his blog serves, at least in part, as an advertisement for his services, he even has some incentive to demonstrate how comprehensive and "smart" he can be.
His unpadded style means I'm never afraid to check out a link to one of his posts on HN. Whereas I will often forego clicking on links to Medium, or the Atlantic, or wherever, until I have looked at a few comments to see whether it will be worth my time.
Can't vouch for this book, but coincidentally just read about it today-- "The Essential Knuth" by Knuth, Daylight, and DeGrave.
Donald E. Knuth lived two separate lives in the late 1950s. During daylight he ran down the visible and respectable lane of mathematics. During nighttime, he trod the unpaved road of computer programming and compiler writing. Both roads intersected! -- as Knuth discovered while reading Noam Chomsky's book Syntactic Structures on his honeymoon in 1961. "Chomsky theories fascinated me, because they were mathematical yet they could also be understood with my programmer's intuition. It was very curious because otherwise, as a mathematician, I was doing integrals or maybe was learning about Fermat's number theory, but I wasn't manipulating symbols the way I did when I was writing a compiler. With Chomsky, wow, I was actually doing mathematics and computer science simultaneously."
The most useful one typesets the labels of equations, sections, figures, and so forth, so I can copy-paste right from the document as I'm editing. That makes it so much easier to insert cross-references while writing, without breaking the flow to search out the definition.
Rather than commenting out packages, I have two top-level input files, which `\input{}` the actual content. Those files differ only where they read the developer-oriented definitions:
versus