# How to document a struct with two constructors?

**URL:** <https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453>\
**Category:** General Usage\
**Tags:** question, documenter\
**Created:** [March 1, 2025, 2:39pm UTC](https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453 "2025-03-01T14:39:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 1, 2025, 2:39pm UTC](https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453/1 "2025-03-01T14:39:54Z")

</div>

```julia
using Parameters, StaticArrays

const MVec3 = MVector{3, Float64}

"""
    Section

Represents a wing section with leading edge, trailing edge, and aerodynamic properties.

# Fields
- `LE_point::MVec3` = zeros(MVec3): Leading edge point coordinates
- `TE_point::MVec3` = zeros(MVec3): Trailing edge point coordinates
"""
@with_kw mutable struct Section
    LE_point::MVec3 = zeros(MVec3)
    TE_point::MVec3 = zeros(MVec3)
end
"""
    Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})

Constructor for Section that allows to pass Vectors of Float64 as point coordinates.
"""
function Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})
    Section(MVec3(LE_point), MVec3(TE_point))
end

```

How can I document the second version of the constructor? It does not appear in the html file created by Documenter.jl .

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 1, 2025, 3:04pm UTC](https://discourse.julialang.org/t/how-to-document-a-struct-with-two-constructors/126453/2 "2025-03-01T15:04:05Z")

</div>

Found the answer myself. I just need to use both signatures in the .md file that is used by Documenter.jl:

````julia
```@docs
Section
Section(LE_point::Vector{Float64}, TE_point::Vector{Float64})
.```

````

(The dot in the last line should not be there.)
