# 'undefined tag' when building package scribble

**URL:** https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624
**Category:** Questions & Answers
**Tags:** question, package, scribble
**Created:** [December 28, 2023, 1:59pm UTC](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624 "2023-12-28T13:59:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![houpt](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@houpt](https://racket.discourse.group/u/houpt)
#### Post date: [December 28, 2023, 1:59pm UTC](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624/1 "2023-12-28T13:59:50Z")

</div>

Long time, first time.

I've posted my first package('circular-layout') to [pkgs.racket-lang.org](http://pkgs.racket-lang.org), and the process was very easy -- except I get some cross-reference errors when the documentation is built by 'raco pkg install'. The documentation looks fine, except all the references to functions/structs in the module are underlined in red. By searching I've found some reports of this sort of problem in the past, but not a solution -- or at least not a solution I understand.

There are only a few structs and procedures documented in the source .rkt files, and provided out by proc-doc/names and struct\*-doc like so:

```scheme
(provide

(proc-doc/names make-cl-edge (->* (#:source string? #:target string?) (#:label string? #:width number? #:directed boolean?) cledge?)
                (( source target)( [label ""] [width 1] [directed #t]))
                @{ An convenience constructor for a @racket[cledge], with default width of 1, no label, and 'directed' by default (i.e., an arrow is drawn at the target end). }))

```

The one scribble file at 'circular-layout/scribblings/circular-layout.scrbl' references the parent module and extracts from the source file at 'circular-layout/circular-layout.rkt'

```scheme
#lang scribble/manual
@(require scribble/extract)

...

@section[#:tag "reference"]{Reference}

@defmodule["circular-layout"]

@include-extracted["../circular-layout.rkt"]

```

The info.rkt file includes the line:

```scheme
(define scribblings '(("scribblings/circular-layout.scrbl" ())))

```

However, installing the package gives the following warnings to all the module tags referenced by `@racket[<tag>]`:

```scheme
raco setup: 0 running: <pkgs>/circular-layout/scribblings/circular-layout.scrbl
raco setup: WARNING: undefined tag in <pkgs>/circular-layout/scribblings/circular-layout.scrbl:
raco setup: ((lib "circular-layout/circular-layout.rkt") cledge)
raco setup: ((lib "circular-layout/circular-layout.rkt") make-cl-edge)
...

```

And in the final html all the 'undefined tags' are underlined in red.

I suspect I haven't specified the 'module-paths' properly, or need another form of require or defmodule, but can't figure out what's missing.

---

<div class="post-metadata">

### Author: ![joeld](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joeld/32/38_2.png) [@joeld](https://racket.discourse.group/u/joeld)
#### Post date: [December 29, 2023, 9:03am UTC](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624/2 "2023-12-29T09:03:00Z")

</div>

Never used srcdoc before but I am confused by the part of your first code block that looks like `@{ An convenience ...}` . That doesn’t seem like correct [@ syntax](https://docs.racket-lang.org/scribble/reader.html). Is it a typo?

Also, what is the #lang line for this .rkt file — is it `#lang at-exp racket`, or just `#lang racket`?

Even with `#lang at-exp racket`, if you try to do something like `(define x @{foo})` you will get an error complaining that the string `"foo"` is not a procedure.

---

<div class="post-metadata">

### Author: ![houpt](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@houpt](https://racket.discourse.group/u/houpt)
#### Post date: [December 31, 2023, 5:55pm UTC](https://racket.discourse.group/t/undefined-tag-when-building-package-scribble/2624/3 "2023-12-31T17:55:43Z")

</div>

Sorry, I should have clarified that I use `#lang at-exp racket` for my source code, just so it is easier to write the srcdoc (i.e. the description of proc-doc/names) in Scribble.

The `@{<text body>}` is just syntactic sugar for `("<test body>")`, but makes it clearer when embedding Scribble formatting like `@itemlist[]`in the text body. Can't remember where I picked that habit up.

In any case, I don't think that factors into the cross ref linking issue, but I'll try rewriting without at-exp.
