[racket] scribble ++xref-in and PDF

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jan 11 17:09:50 EST 2012

Cross-reference information is somewhat renderer-specific. The
information about whether `lambda' is a syntax or variable binding
turns out to be the same for HTML and Latex, which is why `raco
scribble ++xref-in setup/xref load-collections-xref --pdf' often works,
but section links are different for HTML and Latex.

I've previously considered adding a `raco setup' mode that builds
Latex/PDF cross-reference files for all installed documentation (and
then add something like a `load-collections-latex-xref' function to
`setup/xref'). Now, though, I think it might be easier and better for
the renders to collude so that the Latex renderer can use the HTML
renderer's cross-reference files. Neither renderer keeps a superset of
the other's information right now, but maybe the HTML information could
become a superset of the Latex information.

I'll investigate and report back.

At Wed, 11 Jan 2012 13:38:51 -0500, David Van Horn wrote:
> Scribble chokes whenever I use ++xref-in setup/xref 
> load-collections-xref and --pdf.  Here's an example:
> $ cat try.scrbl
> #lang scribble/manual
> @title{Try}
> @secref["numbers" #:doc '(lib "scribblings/guide/guide.scrbl")]
> $ raco scribble ++xref-in setup/xref load-collections-xref --html try.scrbl
>   [Output to try.html]
> $ raco scribble ++xref-in setup/xref load-collections-xref --pdf try.scrbl
> cadr: expects argument of type <cadrable value>; given '#((doc #"guide" 
> #"numbers.html") ("Numbers") #t (part "numbers"))
>   === context ===
> /Users/dvanhorn/Documents/git/racket/collects/scribble/latex-render.rkt:237:4: 
> render-content method in ...ble/latex-render.rkt:47:2
> /Users/dvanhorn/Documents/git/racket/collects/scribble/base-render.rkt:693:4: 
> render-content method in render%
> ...
> Is this a bug or am I doing something wrong?
> David

Posted on the users mailing list.