Zettelkasten Forum


[BUG] List continuation line indentation is broken when only the first character is monospace

edited February 2022 in The Archive

This feature request might be considered esoteric, but oh well.

MultiMarkdown Composer has a feature called elastic tabstops which allows indented text to be correctly aligned even when using a proportional font:

Rather than assigning a fixed number of spaces to a tab character, or a fixed width, tabs represent “columns” of text. Contiguous lines of text are examined to ensure that the columns are wide enough to contain the text in each line.

Why does it matter? My theme uses a monospaced font for all markdown syntax (-, *, >, etc.), but a proportional font for everything else. (I stole this idea from the brillant folks at Cultured Code.) As it right now however, when mixing proportional and monospaced fonts, The Archive doesn't align lists correctly.

Post edited by ctietze on

Comments

  • This seems like a great idea, although very few text editors support tabs in this way. Another dream tab feature would be individually customizable tabs. Tabs are originally a typewriter feature – tabs (short for tabulator) were intended for setting text in tables. On a typewriter, you could set tabs to any settings you wanted – eg, you might set tabs at positions 5, 25, and 40. This type of customized spacing would also be useful on a text editor – perhaps a small tab for a heading followed by a large one for a quotation – but most text editors only offer tabs that are at rigid intervals (eg, every 5 characters) which is less versatile. I won't hold my breath on that feature.

  • Years ago, I remember using some sort of text editor where tabs were set with a line of text. You entered a line of (I think) hyphens and vertical bars something like this
    -----|----------------|------|----
    and from that point in the text, tabs would be set at the positions of the vertical lines. This was handy because you could change tab settings in mid-document.

  • @DuncanMKZ that's a cool idea. word processor behave like that. If you remember the name of the text editor I'd be interested.

    my first Zettel uid: 202008120915

  • I was confused why you got such weird results because we are already computing indent not on character width but on however long the text of the list bullet is :)

    But the rub is that the first character of mixed-pitch texts apparently determines the paragraph style and we're using that. So the monospace - wins.

    I'll fix that limitation eventually, but it's a weird (although sexy, I admit) edge case, so please don't hold your breath :)

    Author at Zettelkasten.de • https://christiantietze.de/

  • @zk_1000 said:
    @DuncanMKZ that's a cool idea. word processor behave like that. If you remember the name of the text editor I'd be interested.

    I wish I could remember. It was a long time ago (1980s), I think it was on an old Apple II system I used to have. Might have been something like Peachtext or WordStar or Magic Window (there were hundreds of word processing programs back then). Many of them used a tab display with hyphens and exclamation marks to mark tab stops, but I seem to remember one of them using the same style to change the tabs in mid-document.

  • @ctietze said:
    I was confused why you got such weird results because we are already computing indent not on character width but on however long the text of the list bullet is :)

    But the rub is that the first character of mixed-pitch texts apparently determines the paragraph style and we're using that. So the monospace - wins.

    I'll fix that limitation eventually, but it's a weird (although sexy, I admit) edge case, so please don't hold your breath :)

    Thanks Christian!

Sign In or Register to comment.