# Include partial content from another scribble document

**URL:** <https://racket.discourse.group/t/include-partial-content-from-another-scribble-document/3100>\
**Category:** Questions & Answers\
**Tags:** scribble\
**Created:** [August 15, 2024, 11:22am UTC](https://racket.discourse.group/t/include-partial-content-from-another-scribble-document/3100 "2024-08-15T11:22:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nik](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@nik](https://racket.discourse.group/u/nik)\
**Post date:** [August 16, 2024, 8:50am UTC](https://racket.discourse.group/t/include-partial-content-from-another-scribble-document/3100/4 "2024-08-16T08:50:14Z")

</div>

Thanks for the pointers. This helps already, although I now realize that I didn't phrase my question precise enough.

With `dynamic-require` I can assign the `doc` to a variable and then reference the part (or other content) as I want to, so that's good. I now have two follow-up questions:

1. When I render both documents, I now have a warning about multiple keys (`WARNING: collected information for key multiple times`). Is there an easy way of renaming the tags that I include?
2. Is there a more convenient way of referencing other content? Ideally I could use something like the tagging function from scribble, but instead of linking to the content, it would just include it.

Currently, my files are as follows.  
`use.scrbl`:

```scheme
#lang scribble/base

@(require scribble/core)

@(define x (dynamic-require "doc.scrbl" 'doc))

@(car (part-blocks x))
@(car (part-parts x))

```

and `doc.scrbl`:

```scheme
#lang scribble/base

text

@section{s1}
content

```

When I now call `scribble {doc,use}.scrbl` I get the following output/warning:

```scheme
WARNING: collected information for key multiple times: '(index-entry (part "s1")); values: (list '("s1") (list (element #f '("s1"))) (part-index-desc)) (list '("s1") (list (element #f '("s1"))) (part-index-desc))
WARNING: collected information for key multiple times: '(part "s1"); values: '#(("s1") (part "s1") (1) #<path:doc.html> #f) '#(("s1") (part "s1") (1) #<path:use.html> #f)
 [Output to doc.html]
 [Output to use.html]

```

I am not sure if the warning is important, but I suppose if I now wanted to link to the section, then scribble would rightfully trip up as it does not know which one to refer to. So I suppose renaming would be a good idea.

To expand on this point a bit more, in the document above, I can now reference the section `s1` via `@secref["s1"]` and get a link to the part/section. What would be nice is another function that essentially works like `secref` but instead includes the content (possibly renaming the tag to a unique string) in the document where the function is called.

---

_[View the full topic](https://racket.discourse.group/t/include-partial-content-from-another-scribble-document/3100)._
