Oh, I see. Well, in that case I guess I'll just have to stick with html blocks for the parts of the text that that has to be separately styled, it's not all that often. Or look for another tool. But I really like pandoc, so I think I'll stick around. Would be interesting to know why the design choice was made to not allow attributes for all elements, though. Seems to me that it would be a very useful feature. Thanks a lot for the information, now I can finally stop trying to figure this out. Kind regards, Mats On Sunday, June 18, 2023 at 12:04:49 AM UTC+2 Bastien DUMONT wrote: > Pandoc doesn't have classes and attributes for all elements. To set > attributes and classes on a paragraph, you must wrap it in a div as you > discovered. Then, either you change your CSS file to apply the required > formatting to all paragraphs inside a div of a given class, or you can > post-process the HTML file to pass the classes and the attributes on the > children paragraphs. > > Le Saturday 17 June 2023 à 01:47:12PM, Mats Holmberg a écrit : > > Hi all, > > > > I am trying to learn how to use pandoc and markdown for book writing > (creating > > epubs and html books). Overall it works splendidly, but I have a problem > that I > > don't know how > > to solve: hinting to pandoc which CSS style to use for my paragraph. > > . > > I know that i can simply wrap my text in a html block e.g.
> "no-indent">Text
. > > But then I can't use markdown in the html block. Some other markdown > parsers I > > have > > tested (MarkDiv, for example) have a syntax that goes something like this > > instead: > > {.no-indent}Text, which seems to work perfectly. I have tried the syntax > :::: > > {.no-indent} in pandoc, but that generates a