
Typesetting Markdown – Part 4: Theme Style - thangalin
https://dave.autonoma.ca/blog/2019/06/23/typesetting-markdown-part-4/
======
roel_v
This is cool, but a lot of it is about bash programming, and it also heavily
ties you to PDF output. IMO no real Markdown based authoring workflow is
workable without a preprocessor. I've used many, from GCC's to several home
written ones, but I recently started porting my whole authoring workflow for
technical documentation to PP ([http://cdsoft.fr/pp](http://cdsoft.fr/pp)). It
gives you integrated diagrams with ditaa and several similar packages, and
most importantly fills the gap that pandoc leaves wrt composing documents from
fragments. Just treating all input files as one continuous input document just
doesn't cut it for anything more than simple README's.

Either way, it's great to see how far text-based authoring workflows have come
over the last 10 years. At some point Docbook had great promise but XSL is
just too hard, and not even that powerful after you managed to grok it, so you
still needed to cobble together a bunch of functionality on top of it.

------
saagarjha
I didn’t read this in enough depth to figure out what it was talking about,
but I did see this:

> Most distributions have the printf command

printf is part of SUS and POSIX; this means that pretty much _every_ system
from this millennium will have it.

~~~
deathanatos
Not only is it guaranteed by POSIX, it's also a built-in in bash. (And the
author, I believe, is writing bash, not generic shell: the shebang in part 1
is to bash, and "local", which appears in this article, is not defined by
POSIX.)

I suppose there could be an (early?) version of bash that it wasn't built it
(and then the POSIX argument applies); but OS X ships a version of bash over a
decade old (2007), and it's a builtin there, so it's been there for at least
that long…

------
xvilka
Hopefully mdBook[1] will have proper PDF output[2] soon.

[1] [https://github.com/rust-lang-nursery/mdBook](https://github.com/rust-
lang-nursery/mdBook)

[2] [https://github.com/rust-lang-
nursery/mdBook/issues/88](https://github.com/rust-lang-
nursery/mdBook/issues/88)

------
mbreese
It's linked in the article, but maybe someone would like to start a little
earlier in the series.

Part 1: Build Script - [https://dave.autonoma.ca/blog/2019/05/22/typesetting-
markdow...](https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-
part-1/)

Part 2: Tool Review- [https://dave.autonoma.ca/blog/2019/05/29/typesetting-
markdow...](https://dave.autonoma.ca/blog/2019/05/29/typesetting-markdown-
part-2/)

Part 3: Automagicify - [https://dave.autonoma.ca/blog/2019/06/16/typesetting-
markdow...](https://dave.autonoma.ca/blog/2019/06/16/typesetting-markdown-
part-3/)

------
IloveHN84
Interesting solution, but I would classify the first ~60% of post as yak
shaving that has nothing to do with markdown and themes.

The script is maybe too complicated and could have been simplified enormously

~~~
ltc5505
What do you mean by yak shaving?

~~~
alexjm
Yak shaving usually refers to work that you started doing because you needed
it while working on your actual problem, but the work isn't directly related
to that problem's solution.

Here's a more detailed discussion: [http://projects.csail.mit.edu/gsb/old-
archive/gsb-archive/gs...](http://projects.csail.mit.edu/gsb/old-archive/gsb-
archive/gsb2000-02-11.html)

~~~
ltc5505
Awesome! Thank you!

------
bloopernova
There's some complex but pretty nice bash script template language in this
article. The template he includes might be useful to some folks:
[https://dave.autonoma.ca/blog/2019/06/23/typesetting-
markdow...](https://dave.autonoma.ca/blog/2019/06/23/typesetting-markdown-
part-4/build-template)

