Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [asciidoc-lang-dev] Proposing olinks

On 2/18/21 2:48 PM, Dave Gauer wrote:
>> This is purely speculative, but I can imagine a 1-1 mapping when
>> converting AsciiDoc files to web pages, but the same sources documents
>> ending in one or two large PDF when transforming it for print. Or is
>> this a total non-sense?
> 
> 
> Yes, that makes complete sense!
> 
> The 1:1 mapping problem has also bothered me because the output of a
> book (EPUB, PDF) vs. website (directory of HTML) are likely totally
> different things and in these scenarios, needing to link to "documents"
> or "sections in documents" in that output is just...WRONG.



Actually, I'm having a complete change of heart about the current state
of the "xref" usage as it stands right now.

If we think of

    xref:foo.adoc[Foo]

or

    xref:foo.adoc#bar[Foo Bar]

as "a cross-reference link to the content AUTHORED in the document
foo.adoc", then it suddenly doesn't matter what the output filename(s)
might be.

There doesn't even need to be an actual file named "foo.adoc" (it could
be an entry in a database table), but this is the canonical name of
another document it in cross-references.

Flipping it around to think of it as a cross-reference to the AsciiDoc
source document rather than to an output file stands the entire problem
on its head and suddenly I'm totally happy with it, file extension and all!

Dan, is this how you think of xrefs?

Sorry for all the mailing list traffic in the last ten minutes as I
worked through this in my head and on the keyboard. :-)

-Dave Gauer


Back to the top