1

The documentation for scribble (the Racket documentation tool) says that “Cross references within […] documents rendered together are always resolved”, but the file a.scrbl below fails to reference the section in file b.scrbl

a.scrbl:

#lang scribble/base
@secref["sectag" #:doc "b.scrbl"]

b.scrbl:

#lang scribble/base
@section[#:tag "sectag"]{A section}

When compiling them with scribble --html a.scrbl b.scrbl, I get:

Warning: some cross references may be broken due to undefined tags:
 (part ("/path/to/b.scrbl" "sectag"))

How do I reference a section in b.scrbl from a.scrbl?

Suzanne Soy
  • 3,027
  • 6
  • 38
  • 56

1 Answers1

2

It seems to work if you remove the #:doc argument.

#lang scribble/base
@secref["sectag"]

This might create an ambiguity though if you use the same tags in both documents, so you may have to change tag names or use your own tag prefixes.

I'm not sure why the relative path for #:doc doesn't work as you expect. Maybe it is only used for referring to collection-installed documents.

Asumu Takikawa
  • 8,447
  • 1
  • 28
  • 43
  • I found out that scribble has a tagging system, where the tag prefixes for the whole document can be specified with `@title[#:tag-prefix …]{…}`. I suppose that's what you meant by "… or use your own tag prefixes". – Suzanne Soy Jun 16 '16 at 21:54