# \`@ref\` across files in Documenter.jl

**URL:** <https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110>\
**Category:** General Usage\
**Tags:** documenter\
**Created:** [April 6, 2020, 2:20pm UTC](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110 "2020-04-06T14:20:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crinders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crinders/32/8434_2.png) [@crinders](https://discourse.julialang.org/u/crinders)\
**Post date:** [April 6, 2020, 2:20pm UTC](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110/1 "2020-04-06T14:20:55Z")

</div>

I have split my module into multiple files. I want to cross reference across files.

index.md:

````nohighlight
# A
```@autodocs
Pages = ["A.jl"]
Modules = [MyModule]
` ``

# B

```@autodocs
Pages = ["B.jl"]
Modules = [MyModule]
` ``

````

A.jl:

```julia
@doc """ mystruct """
struct mystruct end

```

B.jl:

```julia
@doc """ my second struct which is totally different from [my other struct](@ref mystruct)
struct mystruct2 end

```

I’ve tried:

- `@ref MyModule.mystruct`
- `@ref `mystruct` `

But `Documenter.jl` cannot resolve the symbol. If I do this within the same file. There’s no issue using `@ref mystruct`. Also just using `[`mystruct`](@ref)` works across files. Is there a flag that would allow this?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 6, 2020, 3:46pm UTC](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110/2 "2020-04-06T15:46:36Z")

</div>

[https://github.com/JuliaDocs/Documenter.jl/issues/781](https://github.com/JuliaDocs/Documenter.jl/issues/781)

---

<div class="post-metadata">

**Author:** ![crinders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crinders/32/8434_2.png) [@crinders](https://discourse.julialang.org/u/crinders)\
**Post date:** [April 6, 2020, 10:59pm UTC](https://discourse.julialang.org/t/ref-across-files-in-documenter-jl/37110/3 "2020-04-06T22:59:39Z")

</div>

What is strange, is that `[my text] (@ref mystruct)` within the same file does work.
