What I’m tryng to do
I’m trying to make different paragraphs in a single Obsidian note have different, customizable font sizes, while maintaining the original Markdown formatting (bullets and numbering, bold, italics, and various headers). The selected font sizes will also be retained when using the note to produce a Slides or Advanced Slides presentation.
Things I have tried
I’ve tried several methods:
Obviously, <small>smaller paragraph text</small> and <big>larger paragraph text> work, but I can’t choose or customize the size.
<p style="font-size: 18px">paragraph text<p> retains basic Markdown formatting only on headers.
<font size=6>paragraph text</font> also fails to retain Markdown formatting.
I’ve switched (also with the help of ChatGPT) to different versions of CSS that work perfectly in the Obsidian note but don’t want to “pass” into the presentation (I’m pasting the most sophisticated version here)…
Since Markdown is about indicating what things are rather than how they look, it might help us to know what the purpose of the different sizes is.
When you post example Markdown, HTML, or other code, please mark it as code to prevent the forum software from rendering or garbling it. Thanks! (I’ve edited your post to do this.)
Thanks for the clarification, CawlinTeffid.
I’m new to the forum and didn’t understand what was meant by “mark as code”… it’s clearer now, I won’t repeat the mistake.
The purpose of resizing text is to make the most of Advanced Slides; in fact, using different sizes would allow me to combine images and text more effectively (as I wrote, none of the methods I’ve tried seem to transfer the different font sizes to the slides… in Obsidian notes, however, more or less all work, some are better at preserving the formatting of lists, bold, etc.).
I hope to hear some good news or at least some helpful suggestions from the forum.
You could use one of Obsidian’s existing markdown elements as a container for your font sizes. That would help maintain markdown compatibility, which HTML typically doesn’t.
Here’s an example using callouts.
(Pretend I didn’t typo “large” twice in every image. The second one was supposed to say, “larger”.)
Oh I didn’t realize Advanced Slides doesn’t use vault CSS snippets. Took a quick look at the plugin and presume you already know about
larger
<!-- element style="font-size:1.5em" -->
but don’t like it because it renders in only Advanced Slides, not in Slides or the note.
If it’s that you want it to work in all three and with markdown, then you might have to use both snippets and Advanced Slides’ Element Annotations on each styled element in your slide.