I tried to format some lyrical verses with Markdown: Example
I tried all command like > and : , but they did not work.
Any ideas!
Hajo
I tried to format some lyrical verses with Markdown: Example
Heya!
I’m new to CSS and HTML and Obsidian customization myself but I think that’s something that a .css snippet might be best for. You were trying to get an indent on all line following the first, right? The closest I managed to get was by using this .css snippet:
.poem {
text-indent: -2em;
line-height: 1;
width: 30em;
margin: 5em;
text-align: left;
}
Which gave me this:
When written like so:
You can change all of the values in the snippet so that everything looks how you want it, but from what I’ve tried, the text-indent must always be a negative value when using this method.
Thanks I will try it.
Hajo
[quote=“Eerieona, post:2, topic:100184”]
Hello,
it worked, but was for my project a little bit too much work (several thousand verses).
Thanks anyway. I will look for easier solutions.
Hajo
Because markdown reserves indents for code blocks, you’re probably better off using a rich-text app like a word processor for this purpose. You can still store the files in your vault and use the Open With plugin to open them in an appropriate app from Obsidian’s file manager.
You can also play around with the settings like Settings > Editor > Strict line breaks, or consider whether you can add two space characters at the end of the lines in a verse to make the line shift happen. Both of these are less obtrusive compared to having to insert <br> in all the poetry.
Another simplistic solution, if the line breaks are already in there is to enclose the entire text in a code block, and then use CSS to change the font to something more likeable. That should preserve the line breaks, and possibly allow for you to add some formatting to the single lines in question. (In other words, first change the text into pure code display, and then reformat into nice looking text again. This can be done using cssclasses
on the files in question, so that you don’t mess with every code block all across your vault)
There are other options available. It would help to know a bit more about your requirements.