Zettelkasten Forum


Indenting without changing text to a code block

Is it possible to indent a paragraph of text WITHOUT making it into a code block?

I know TheArchive uses Markdown, which treats indented text as a code block. But I would like to indent paragraphs to show a hierarchy of ideas. Paragraphs often contain tags (either web links or TheArchive's own bracketed links), and if the paragraph is indented, the links stop being active. (As a writer, code blocks have very little use to me.)

Is there a way of turning off the default "code block" formatting when indenting a paragraph with tabs?

Duncan

Comments

  • @DuncanMKZ

    I usually do this by bulleting each paragraph and then using tab to indent underlying paragraphs (to several levels, if you want).

  • Indenting in Markdown has some syntax restrictions. Check out this guide.
    Basic Syntax | Markdown Guide

    Various hacks work in the editor but will not be processed correctly in a "Live Preview" or when the note is exported. You might have to modify the way you format "to show a hierarchy of ideas." Here is a sample:

    In The Archive editor

    In Live Preview

    Will Simpson
    I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • @DuncanMKZ If you don't want the result to look like a code block, you can tweak the theme to not apply a different color. But you'll still not get bold/italics etc in the code block as long as you treat the note as Markdown.

    To see how to disable Markdown highlighting completely, see: https://forum.zettelkasten.de/discussion/2097/disable-markdown-and-just-use-plain-text

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

  • Thanks for the thoughtful answers.

    @ctietze
    It is not so much about how the results look as how they work. The power of TheArchive comes from its links. Indented text instantly becomes a code block, and all links are inactivated.

    Obviously, Markdown was designed primarily as a way to create HTML documents, but I would guess that most Zettelkasten enthusiasts use it simply as a way to add a light layer of formatting within a plain text file, and probably won't be putting it online.

    I already have thousands of text files created in BBEdit and Ulysses, where my text is aligned left, and quoted material (often containing links) is indented with a tab. (Tabs are a fast and convenient way to indent multiple paragraphs of text.) TheArchive does a great job of working with this set... except that none of the indented links work, because they read as "code".

    I have noticed a couple of workaround. Indenting with 1-3 spaces will indent without destroying links, and indenting a paragraph separated without a blank line above will also avoid code blocks.

    I would be interested in trying a version with Markdown off (although it's mostly the detested code block I want to disable). I've seen references to "Cutting Edge" releases. That sounds interesting. Where can I find those?

  • edited February 2022

    @DuncanMKZ You can switch the update channels in the app's general preferences. After restarting the app, the "Debug" menu will be available.

    If you really want to trick Markdown processors in general into not treating indented blocks as code, you may want to experiment with non-standard whitespace characters. Non-breaking spaces (⌥+Space on most keyboard layouts) can help. There are others you might want to try: ​​https://qwerty.dev/whitespace/ -- but depending on the Markdown tools, these will still be treated as indenting spaces.

    As you said: It's just the way Markdown works :)

    I strongly suggest picking up indenting with leading list bullet characters like - instead for proper outlines. We'll likely not be going to break the Markdown renderer in The Archive anytime soon, at least not on purpose ;)

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

  • @ctietze

    What excellent suggestions. And yes, I agree the bullet characters are a good way to go. I didn't understand how it worked at first, but I now see this is what @Will and @GeoEng51 were talking about above.

    So, to retain links in indented text the format would be something like...

    Text text text about some important point.

    • indented text about that point [[with link]]
    • another block of text with [[another link]]

    And TheArchive does a nice job of indenting the block, even if it's many lines. I can also reformat my old documents to this format quite easily using a grep type search. That should work for my purposes.

    Thanks, everyone.

    Duncan

  • And (for the benefit of those who might be looking for the same answer) in this case, the "plain text" would look like this, with each bullet being (eg) a hyphen aligned to the left margin, followed by a tab or series of spaces.

    Text text text about some important point.
    
    -    indented text about that point [[with link]]
    -    another block of text with [[another link]]
    
  • Glad to hear this works for you! :)

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

Sign In or Register to comment.