How to create a quote that is under a list with correct indentation?

What I’m trying to do

I am journaling in Obsidian. New to Obsidian/Markdown so I apologize if my question is unclear.

What I’m trying to do is:

- date 1
> "quote"

\- name of person who said it

The problem is: the blank line between quote & name breaks the indentation. The quote is still indented under date 1, but the name is not.

I tried using tab/4 spaces on the name, but that creates a script block inside of indenting.

Is there any way I can get the name to be indented correctly?

Hello.

This?

- date 1
> "quote"
> 
> \- name of person who said it

this seems to be the cleanest-looking solution out there, but it does include the name as part of the block quote.

1 Like

This should make the quote and the paragraph after it part of the list item. The way you had it, the quote wasn’t part of the list item even tho it’s indentation looked similar.

- date 1

    > "quote"
    
    \- name of person who said it

Indenting text under a list item makes it part of the list item. I’m not absolutely sure you need the space between the list item and the quote but it’s generally safest to put blank lines between blocks in Markdown.

EDIT: Additional solution for if you also put HTML breaks between the list items: How to create a quote that is under a list with correct indentation? - #9 by CawlinTeffid

2 Likes

Apologies. I misunderstood the output wanted. Hope that the post above this one provides what you want.

Thank you!! This does seem to work well, but I encountered new problems when trying to implement it.
The complete format that I use to write my journal is:

###### year
- date
    text
<br>
- date
    text
<br>

This format worked well until now. I was able to have a blank line between each list item and the texts were folded nicely under each list item.

For this specific situation, following the format & your reply, the journal was supposed to look like this:

###### year
- date 1
    > "quote"
    
    \- name of person
<br>
- date 2
    text 2
<br>

However, when I tried to add the <br> after “name of person”, somehow the quote is no longer a quote, just text with > in front.

I also tried to add a blank line before <br>, but that makes all the following list items (date 2) plain text with - in front instead of lists.

If I don’t add the <br>, there won’t be any blank line between “name of person” and “date 2”

This is so puzzling and doesn’t make sense to me. Is there any way I could achieve what you have in your previous reply, and have a blank line?

I can’t edit this post anymore, but in the last 4 paragraphs, I forgot to make <br> an in-line code, which caused the weird breaks. Sorry.

I fixed it for you.

I don’t know why that produces that behavior, but indenting the break to make it part of the list item seems to fix it.

Also, instead of using a break you could use a CSS snippet to add bottom margin to list items that abut list items. (That won’t affect editing view, or at least it’s a bad idea to let it affect it, but you can just type a newline.)

Thank you!!! This works!

(I moved the solution mark to the comment that more directly answers the original question so future readers won’t be confused, and linked from there to the expansion.)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.