Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include the docstring for a function from another package in my Julia docs?

Tags:

julia

I have a function defined in a different package which I include and then export from my Julia package. I now want to include the docs for that function in my docs using Documenter.jl. What sort of @ref syntax would I need to do this? The documenter docs don't seem to covet this use case.

like image 240
logankilpatrick Avatar asked Nov 15 '25 15:11

logankilpatrick


1 Answers

That is what we do in MeasureTheory, feel free to take a look at https://github.com/cscherrer/MeasureTheory.jl/blob/master/docs/make.jl. Our goal was to include docstrings from MeasureBase as well, and all it takes are some tweaks to the make.jl file:

  • include both packages in the modules argument to makedocs
  • setup doctests for both packages

Note that MeasureTheory re-exports MeasureBase, otherwise we would need to add using MeasureBase at the start of the file too.

like image 186
Guillaume Dalle Avatar answered Nov 18 '25 05:11

Guillaume Dalle