[plt-scheme] for-label-based hyperlinks when building with scribble command-line executable

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Oct 1 09:15:31 EDT 2008

At Tue, 30 Sep 2008 14:55:50 -0500, "Casey Klein" wrote:
> When I build the following with scribble --html, the identifier
> `big-bang' in the typeset code is underlined in red:
> #lang scribble/doc
> @(require scribble/manual (for-label teachpack/htdp/world))
> @schemeblock[(big-bang width height r world0)]
> I apologize if I should be able to figure this out from the
> documentation, but what do I need to do to turn identifiers like this
> one to hyperlinks?

Up to now, the only way was to put the document in a Planet package or
collection and build it with `setup-plt'.

Setup PLT knows about all the installed documentation, and it arranges
for cross-reference information (which is embedded in "in.sxref" files)
to be loaded when building a document. Scribble tools like `scribble',
in contrast, are supposed to be independent from the specific
application of Scribble to installed PLT Scheme documentation.

In SVN, I've added `++xref-in' command-line flag to `scribble'. The new
flag takes a module and identifier, and it calls the corresponding
function to get cross-reference information (as defined by the `xref'
type from `scribble/xref').

In particular, the `setup/xref' module provides
`load-collections-xref', which is essentially the part of Setup PLT
that finds all the cross-reference information for installed
documentation. (Note the difference between the general interface
`scribble/xref' and the application-specific glue `setup/xref'.)

Use the new flag like this to build "doc.scrbl" with hyperlinks to
installed docs:

  scribble --html ++xref-in setup/xref load-collections-xref doc.scrbl


Posted on the users mailing list.