The MWE and mockup below explain the intended effect. This is a classic visual guideline in programming editors, and I would like it to be applied to all the nested itemizes (for which I'm using the outlines package) in my document. (The goal is to get a nicer overview of the indentation in my university course notes.)

As shown, I would like the opacity of the vertical and horizontal bars to be configurable separately (I'm not fully convinced whether the horizontal bars are desirable, but it's nice to implement them just in case). The effect should ideally also withstand changes to the interline distance. Optionally, the small gap between the lines and the dots could be an extra global parameter.

Existing threads

There exist various posts that come close, but none seem to have this natural effect.

I've also found this post, which looks almost exactly like what I want (minus the horizontal lines); sadly, the accepted implementation is flawed, as it doesn't support lines that wrap around. (The supposed answer just puts a bar next to each bullet, not line and hence fails when a bullet runs across more than one line (either naturally or due to a line break). An example of the bad output is the second image below.

The solution might be found in threads that solve the same exact problem but for the algpseudocode package instead of outlines. The most popular seems to be this one. There is also this answer that takes care of taller-than-usual lines, and this thoroughly documented answer even handles algorithm lines (so, bullets) that span multiple text lines.


\documentclass[a4paper, 11pt]{article}


    \1 How doth the little crocodile 
        \2 Improve his shining tail,
        \2 And pour the waters of the Nile
    \1 On every golden scale!
        \2 How cheerfully he seems to grin
            \3 How neatly spreads his claws,
            \3 And welcomes little fishes in, \\
            with gently smiling jaws!
    \1 --Lewis Carroll


Desired output:

LaTeX itemize outline with descending lines next to it


The following image (on a slightly different example, for emphasis) shows the clear problem with the related post mentioned above:

Bad example


You must log in to answer this question.

Browse other questions tagged .