# How to Put Sublists into Docstrings?

Hi all,

I was reviewing a PR recently and was trying to correct a small error in their docstring. Here is the docstring:

"""
latex(text::LaTeXString, pos::Point, object::Symbol; valign::Symbol = :top, halign::Symbol = :left)

Add the latex string text to the top left corner of the LaTeX path.
Can be added to Luxor.jl graphics via [Video](@ref).

**NOTES:**
- **This only works if tex2svg is installed.**
It can be installed using the following command (you may have to prefix this command with sudo depending on your installation):

npm install -g mathjax-node-cli

- **The latex method must be called from within an [Object](@ref).**

# Arguments
- text::LaTeXString: a LaTeX string to render.
- pos::Point: position of the upper left corner of the latex text. Default: O
- can be written as x, y instead of Point(x, y)
- object::Symbol: graphics objects defined by Luxor.jl. Default :stroke.
- :stroke - Draws the latex string on the canvas. For more info check Luxor.strokepath
- :path - Creates the path of the latex string but does not render it to the canvas.


What I was expecting by creating sublists in the Arguments section, the bullets would be indented neatly like this:

# Arguments

• text::LaTeXString: a LaTeX string to render.
• pos::Point: position of the upper left corner of the latex text. Default: O
• can be written as x, y instead of Point(x, y)
• object::Symbol: graphics objects defined by Luxor.jl. Default :stroke.
• :stroke - Draws the latex string on the canvas. For more info check Luxor.strokepath
• :path - Creates the path of the latex string but does not render it to the canvas.

Instead, the rendered docstring looks like this:

As one can see, the bullet for pos now contains the sub-bullet and the stroke and path sub-bullets were not rendered. Could anyone explain or help me figure out why this Markdown syntax does not work in docstrings?

Thank you!

~ tcp

This looks like a bug. If you don’t get a reply here, please check existing issues and open one if necessary.

1 Like

What Julia version are you using? It works as expected on Julia 1.5. (Julia 1.6 has another list display bug, but it does not look as in your screenshot).

1 Like

I use 0-day julia. Same problem.

Ah that might be it then - I am using Julia 1.6.0-rc3. I’ll look to see if an issue is opened on Julia

Issue opened since I could not find anything else referencing this phenomena: https://github.com/JuliaLang/julia/issues/40169

2 Likes