# Documentation: how to add cross-references to functions in other modules?

**URL:** https://discourse.julialang.org/t/documentation-how-to-add-cross-references-to-functions-in-other-modules/88504
**Category:** Internals & Design
**Tags:** documentation, documenter
**Created:** [October 10, 2022, 3:57am UTC](https://discourse.julialang.org/t/documentation-how-to-add-cross-references-to-functions-in-other-modules/88504 "2022-10-10T03:57:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)
#### Post date: [October 10, 2022, 3:57am UTC](https://discourse.julialang.org/t/documentation-how-to-add-cross-references-to-functions-in-other-modules/88504/1 "2022-10-10T03:57:54Z")

</div>

I’m trying to add cross-references to some Julia docstrings, but I’m running into problems. Take for example the docstring for `Base.@sync` in `base/task.jl` (shortened):

```julia
"""
    @sync

Wait until all lexically-enclosed uses of [`@async`](@ref), [`@spawn`](@ref Threads.@spawn),
`@spawnat` and `@distributed` are complete.
"""

```

How does one add a cross-reference to `Distributed.@spawnat` to this docstring? None of the following work:

```julia
[`@spawnat`](@ref) # works in doc/src/manual/distributed-computing.md
[`@spawnat`](@ref Distributed.@spawnat)
[`Distributed.@spawnat`](@ref)

```

For instance, in the first case I get

```julia
Error: no doc found for reference '[`@spawnat`](@ref)' in src/base/parallel.md

```

(Is this related to the fact that in contrast to `Threads` one has to load `Distributed` before one can use the module name?)

---

<div class="post-metadata">

### Author: ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)
#### Post date: [October 11, 2022, 1:14pm UTC](https://discourse.julialang.org/t/documentation-how-to-add-cross-references-to-functions-in-other-modules/88504/2 "2022-10-11T13:14:29Z")

</div>

@mortenpi: Do you know the answer?
