Effective D book?

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Jun 16 14:00:20 PDT 2013


On Sun, Jun 16, 2013 at 07:58:20AM -0400, Andrei Alexandrescu wrote:
> On 6/15/13 11:55 AM, H. S. Teoh wrote:
> >I'm curious about how you manage to factor out / abstract away the
> >niggling details of LaTeX, like the use of ".\ " after an
> >abbreviation (to make it produce only an inter-word space, as opposed
> >to the extra space at the end of a sentence),
> 
> ABBRDOT = .\$(SPACE)
> 
> >m-dash
> 
> MDASH = ---
> 
> >vs. n-dash
> 
> NDASH = --
> 
> >, etc., some of which are quite specific to LaTeX but are quite
> >necessary if you're going for print-quality typesetting. And what
> >about embedded \footnote's?
> 
> FOOTNOTE = \footnote{$0}

But it doesn't address the problem of how to make $(FOOTNOTE ...) work
correctly with HTML output. Is it suppressed completely? Post-processed
to appear in a footnote DIV? Something else?


> >Section references?
> 
> SECREF = \ref{sec:$0}
> 
> >Do you have macros for all of them?
> 
> Yah. All of the above would go into a latex.ddoc macros file. Then
> the html.ddoc file would contain things like
> 
> ABBRDOT = .$(SPACE)
> MDASH = —
> etc.
> 
> >Does it make it a bit cumbersome to type?
> 
> Most likely, but this is the price to pay for supporting multiple
> formats. Then, LaTeX wasn't exactly designed for ease of typing, so
> the marginal cumbersomeness shouldn't be high.
[...]

Or rather, LaTeX *was* designed for ease of typing, but not for ease of
auto-generation / parsing. Many of the quirks of LaTeX syntax is to make
it easy to type certain formatting elements, but it comes at the expense
of consistency of syntax, which is what makes it tricky for systems like
DDoc to generate output for (and rather hard for external programs to
parse correctly).


T

-- 
This is a tpyo.


More information about the Digitalmars-d mailing list