On 1/8/13 3:31 PM, Philippe Sigaud wrote:
On Wed, Jan 9, 2013 at 12:12 AM, Walter Bright
<[email protected]>  wrote:
Take a look at the generated PDF: http://erdani.com/d/dlangspec.pdf

Looks good to me.

Yes, that has indeed quite a palatable appearance. I see you defined 2
or 3-cols tables, that's a good idea. Too bad DDoc macros do not
accept numerical arguments :) I guess in the end a 4-cols version will
be necessary, if only for the big tables in std.algorithm.

Yah, though note that these macros were only necessary because I was doing unusual stuff subheadings for TABLE_3ROWS and multiline paragraph for TABLE_2ROWS. If special stuff is not required you can use TABLE2 for up to 10 columns.

I also like your use of the `listings` package. How did you 'disable'
the automatic colouring DMD insert in code samples?

I defined these guys:

D_COMMENT=$0
D_STRING=$0
D_KEYWORD=$0

It's also good to keep in mind that when I prepared the kindle version,
which has a small screen, I had to rather ruthlessly pare down the length of
preformatted lines like the code examples.

Same here. I have a big tutorial on templates on github. Following
your advice, Walter, I found ways to convert it into .epub or .mobi (I
converted it from LaTex to Markdown). And, indeed, even 60-chars lines
tend to be too long for these screens. That's a pretty harsh limit! I
still have to scan the entire doc to find the longest lines.

Maybe I can start converting it to a big Ddoc file...

I reached a sort of weird conclusion that ddoc is a redoubtable documentation source format. (I'm not sure whether it's better than Markdown or not as I'm not very fluent with Markdown.) One great thing about ddoc is that macros are infinitely flexible, and the expansion rules are not as weird as other macro systems such as M4.

The table use case is telling - as soon as I needed a special table form I could just encode that as a macro. I think with Markdown you get to generate one kind of table but if you want to fine-tune any particular table you just can't.


Andrei

Reply via email to