Cross referencing in Ddoc

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Dec 31 11:51:32 PST 2013


On Tue, Dec 31, 2013 at 09:08:07AM -0800, Andrei Alexandrescu wrote:
> On 12/31/13 4:26 AM, Jacob Carlborg wrote:
[...]
> >>>4. It doesn't rely on embedded HTML, as such will impede extraction
> >>>and formatting for other purposes.
> >
> >As far as I know this isn't very useful. For the other formats we
> >use, like PDF, it uses the HTML output as a base.
> 
> Again no. You are misinformed. The PDF manual is generated via LaTeX
> from the same ddoc sources as the HTML pages.
[...]

This is true.

I will note, however, that limitations in Ddoc make the LaTeX output
less than ideal. Many fine points of LaTeX formatting are ignored or
simply not possible (e.g., proper use of em- and en-dashes, proper use
of '.\ ', non-breaking spaces, hyphenation hints, etc.). In some cases,
postprocessing is needed to take full advantage of the LaTeX format
(esp. for display of math formulas, which is one of LaTeX's biggest
selling points).

Even for HTML, the lack of semantic support for paragraphs means XHTML
compliance is out of the question, and any proper tag nesting where
paragraphs are involved is a fragile hack that is likely non-HTML
compliant. But nobody notices this because most browsers are too
permissive in what they accept.

So even though I think Ddoc isn't as bad as some people make it out to
be, I'm still on the fence about it.


T

-- 
By understanding a machine-oriented language, the programmer will tend
to use a much more efficient method; it is much closer to reality. -- D.
Knuth


More information about the Digitalmars-d mailing list