* Selecting CSS style for paragraph @ 2023-06-17 20:47 Mats Holmberg [not found] ` <0102580d-3f9a-407d-b089-54a8b51ab6f3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Mats Holmberg @ 2023-06-17 20:47 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1523 bytes --] 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. <p class="no-indent">Text</p>. 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 <div> around the whole thing which is not what i want. I have tried to go through all the extensions that are available in pandoc, but so far haven't found anything that works. I guess this might be kind of a noob question, but I have really tried to find a solution and failed. Is this a real problem, or am I overlooking something simple? Some combination of pandoc extensions or something like that? Any help will be immensely appreciated! Kind regards, Mats -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0102580d-3f9a-407d-b089-54a8b51ab6f3n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2056 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <0102580d-3f9a-407d-b089-54a8b51ab6f3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Selecting CSS style for paragraph [not found] ` <0102580d-3f9a-407d-b089-54a8b51ab6f3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2023-06-17 22:04 ` Bastien DUMONT 2023-06-17 23:16 ` Mats Holmberg 0 siblings, 1 reply; 3+ messages in thread From: Bastien DUMONT @ 2023-06-17 22:04 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 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. <p class= > "no-indent">Text</p>. > 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 <div> around the whole thing which > is not what i want. > > I have tried to go through all the extensions that are available in pandoc, but > so far haven't found anything that works. > > I guess this might be kind of a noob question, but I have really tried to find > a solution > and failed. Is this a real problem, or am I overlooking something simple? Some > combination of pandoc extensions or something like that? Any help will be > immensely > appreciated! > > Kind regards, > Mats > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/msgid/ > pandoc-discuss/0102580d-3f9a-407d-b089-54a8b51ab6f3n%40googlegroups.com. > > References: > > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/0102580d-3f9a-407d-b089-54a8b51ab6f3n%40googlegroups.com?utm_medium=email&utm_source=footer -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZI4t8ifcAPt1wZEn%40localhost. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Selecting CSS style for paragraph 2023-06-17 22:04 ` Bastien DUMONT @ 2023-06-17 23:16 ` Mats Holmberg 0 siblings, 0 replies; 3+ messages in thread From: Mats Holmberg @ 2023-06-17 23:16 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 3493 bytes --] 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. <p class= > > "no-indent">Text</p>. > > 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 <div> around the whole > thing which > > is not what i want. > > > > I have tried to go through all the extensions that are available in > pandoc, but > > so far haven't found anything that works. > > > > I guess this might be kind of a noob question, but I have really tried > to find > > a solution > > and failed. Is this a real problem, or am I overlooking something > simple? Some > > combination of pandoc extensions or something like that? Any help will be > > immensely > > appreciated! > > > > Kind regards, > > Mats > > > > -- > > You received this message because you are subscribed to the Google Groups > > "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2] > https://groups.google.com/d/msgid/ > > pandoc-discuss/0102580d-3f9a-407d-b089-54a8b51ab6f3n%40googlegroups.com. > > > > References: > > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2] > https://groups.google.com/d/msgid/pandoc-discuss/0102580d-3f9a-407d-b089-54a8b51ab6f3n%40googlegroups.com?utm_medium=email&utm_source=footer > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/08ff7f6f-6f3c-48da-b52e-ce0a219841d6n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 5283 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-17 23:16 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-06-17 20:47 Selecting CSS style for paragraph Mats Holmberg [not found] ` <0102580d-3f9a-407d-b089-54a8b51ab6f3n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2023-06-17 22:04 ` Bastien DUMONT 2023-06-17 23:16 ` Mats Holmberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).