Effective D book?

Jonathan M Davis jmdavisProg at gmx.com
Fri Jun 14 20:15:14 PDT 2013


On Friday, June 14, 2013 19:57:52 Walter Bright wrote:
> > Interestingly enough, based on Andrei's suggestions, I'm writing it using
> > ddoc so that it can easily be converted into latex, html, and e-book
> > formats rather than being tied to any particular format (I was going to
> > use latex, but Andrei thought that a macro language would be better as
> > latex is very tied to physical print and fixed layouts). It'll probably
> > be the first book ever to be written entirely in ddoc.
> 
> This is just being a win all around!

My one major complaint about using ddoc is the need for the $(P ) macro 
everywhere, whereas LaTeX inserts paragraphs based on empty lines. I should 
probably create an enhancement request for that (and maybe even try and 
implement it), but I have enough to do right now that I decided that I'd just 
put up with it for now. But aside from the need for $(P ) macros, it's
actually quite pleasant to work with.

I do have to process the ddoc before giving it to the compiler in order to
generate the table of contents and index macros (since you can't generate
those with just macros), but since I'm using a D script to do the build,
that was actually pretty easy.

So, I'm writing a book on D which is written in D's documentation macro
language and using D to actually drive the build. It's all very D. :)

- Jonathan M Davis


More information about the Digitalmars-d mailing list