I’m not able to create any space in preview mode, not matter how many line breaks I have. (looks fine in edit mode)… According to a few posts it’s either not possible w/o html or using some kind of backslash, but then other posts seem to indicate it works with more than one break, or turning the setting for strict line breaks should do something. for me that setting has no effect either way. Guess I’m not getting it.
The setting for strict line breaks only has to do with what is understood as the beginning of a new paragraph. In normal markdown, there has to be an empty line between two paragraphs - if you just enter one single line break, markdown doesn’t interpret it as a new paragraph.
There are two possible solutions to your problem:
The first one is with css - you can define more space between two paragraphs. This setting, however, then would apply to every paragraph.
If you just want to insert more space between two lines/paragraphs from time to time, the only solution is to use html. <br> is the html syntax for “line break”. Try to include several of these and see how it looks in preview mode!
Copy the code from my previous post into an empty file, save this file under “spaces-between-paragraphs.css” (you can chose any file name, but don’t change the .css ) into the folder .obsidian/snippets and activate your snippet in Settings → appearance.
i did everything you mentioned, but doesn’t see to have any effect. could it be my theme? I even tried various different “em” values and also went back to the settings are reloaded the snippets (do I have to do this every time I make a change?) In any case, my spacing looks the same in edit and preview modes. I also clicked off the file and back to it in case it needed to refresh.
cool. i just copied pasted into the file, but not seems to work, but I’m confused… this seems to only put extra space at the very top of the doc. I thought this would allow more space between paragraphs… no matter how many line-breaks I put in in edit mode, preview mode compresses all the text together. How do you add space between sections and paragraphs in markdown?
I hadn’t meant to respond to a necrothread, but it came up below a thread I was reading and seemed to be left unresolved.
In case anyone reads this in future, I think there are two root issues:
One is markdown’s problematic use of whitespace (it counts it out like a miser or and abolishes space that does not have a markdown ratified purpose); the outcome is that what you see in edit may not closely resemble what is produced in review/preview/print. It makes no difference how many blank lines you add, you’ll still end up with one only. Unfortunately, if you want to use whitespace in markdown, you need a good understanding of how markdown handles it and how to get around its restrictions.
The second is terminology. There is frequently a lack of clarity between lines and paragraphs. Pressing an Enter key in Obsidian, as in most traditional markdown editors, gives you a new line, not a new paragraph as you would get in Word, Ulysses, Scrivener, Roam etc. People mimic paragraphs by using CSS to add padding between lines, but they are still only lines unless there is a blank line above and below.
There is a feature request for an option to use Enter for new paragraphs instead of new lines.