# "path+anchor-\>tag", or, get bluebox given path+anchor

**URL:** <https://racket.discourse.group/t/path-anchor-tag-or-get-bluebox-given-path-anchor/3165>\
**Category:** Questions & Answers\
**Tags:** scribble, xref\
**Created:** [September 11, 2024, 3:03pm UTC](https://racket.discourse.group/t/path-anchor-tag-or-get-bluebox-given-path-anchor/3165 "2024-09-11T15:03:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [September 11, 2024, 3:03pm UTC](https://racket.discourse.group/t/path-anchor-tag-or-get-bluebox-given-path-anchor/3165/1 "2024-09-11T15:03:08Z")

</div>

There exists [xref-tag-\>path+anchor](https://docs.racket-lang.org/scribble/xref.html#%28def._%28%28lib._scribble%2Fxref..rkt%29._xref-tag-~3epath%2Banchor%29%29).

I don't see the reverse -- anything like "`xref-path+anchor->tag`".

Is it possible for me to write this myself, and if so, how?

* * *

Why I ask: Given a documentation path + anchor, I want to look up a bluebox using [`fetch-blueboxes-strs`](https://docs.racket-lang.org/scribble/blueboxes.html#%28def._%28%28lib._scribble%2Fblueboxes..rkt%29._fetch-blueboxes-strs%29%29), but that takes a `tag`.

[Why I ask that: I have a documentation path and anchor from `check-syntax` analysis, and would like to use that -- at a time where I no longer have the original expanded syntax, and therefore can't use [`xref-binding->definition-tag`](https://docs.racket-lang.org/scribble/xref.html#%28def._%28%28lib._scribble%2Fxref..rkt%29._xref-binding-~3edefinition-tag%29%29).

Although it's possible to synthesize some identifier from source text, that's not always reliable.

Although it's possible to eagerly calculate this for all path+anchor annotations, that's wasteful and slow.]

---

<div class="post-metadata">

**Author:** ![greghendershott](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/greghendershott/32/98_2.png) [@greghendershott](https://racket.discourse.group/u/greghendershott)\
**Post date:** [September 11, 2024, 7:21pm UTC](https://racket.discourse.group/t/path-anchor-tag-or-get-bluebox-given-path-anchor/3165/2 "2024-09-11T19:21:00Z")

</div>

Oh. Duh. The anchor _is_ the tag, albeit HTML-ified to be a suitable anchor.

The `syncheck:add-docs-menu` supplies that original tag value, as well as the HTML-ized anchor equivalent.

So I think I'm all set. (Will wait to close the question until I confirm.)
