Reviewed and toggled most settings to get familiar with effects
What I’m trying to do
I like for my Markdown files to be well-formatted and readable as plaintext (in source mode), but also aesthetically rendered (only when in Preview or Read mode). The Live Preview and Reading modes format well-enough to satisfy the latter; however, my intuition or rather expectation is that Source mode would render plaintext, monospaced characters.
For example, # Header 1 is rendered as very large heavy text in Preview, but it is also rendered the same, including the # in Source mode. I tried toggling a variety of settings and it continues to style my source text, which is baffling and disconcerting, especially when it updates styling as I type. Even more, I prefer to have the same number underscores under a header text as there are in the header text. “1234” would have “----” like so,
1234
and it would render with a monospace font in source mode, but render with appropriate aesthetic styling in preview mode.
I hope I’ve described the issue well. It seems like a very logical expectation to me, and since I’m on day 1, hour 1 of evaluating Obsidian, surely I’m missing a setting for enabling this? Can someone guide me to how to enable monospace font and no auto-styling while in edit/source mode?
You should be able to achieve what you want with CSS snippets. I’m afraid I can’t give detailed instructions, but I’m sure the existing styles have a class to distinguish Source Mode. There are general Obsidian CSS resources in the forum.
Your expectation for Source Mode’s formatting makes sense. Until somewhat recently, Live Preview didn’t exist; there was only Edit (the current Source Mode, with essentially very fancy syntax highlighting but no rendering of images or other embeds) and Preview (if I remember the old names right). So when the developers added Live Preview, I imagine they didn’t consider stripping down Source Mode’s style.
Any number of equal signs or dashes in the line directly below the heading text should work, although Obsidian seems to need two dashes (unlike other Markdown editors) for H2
Atx header have six levels, with the levels correlating with the numbers of hashes (#) used.
Thanks all. Following those tips, and some trial and error, I settled on this. The result being all content appears to be using a monospace font in Source mode, and the underscores are of the same font-size as the headers they effect. So, the odd auto-styling in Source mode is no longer apparent.
Created a snippets folder in [My Notes]/.obsidian/snippets
Added a file named “Monospace Source Mode.css”, the extension .css was significant.