I tried that but I couldn't get the span to encompass multiple paragraphs, which is is what I would need to get page-break-inside to do what I need. Plus there's the fact that some of my questions contain multiple paragraphs, so inline elements just don't work well. The issue is that markdown doesn't have a good way to specify the difference between the beginning of the "ol" elements and the "li" element that I'm aware of so I can't put the a div inside the
  • that I could see. This works okay (it doesn't add the class to the li element directly as I envisioned, but fills it with a div which is a close next best option, and seems to work okay for the page breaking). 1.
    Question 1 A. A1 B. B1 C. C1
    2.
    Question 2 A. A1 B. B1 C. C1
    But I can't figure out any equivalent method using fenced divs, which I would prefer just for markdown prettiness. On Jun 3, 2018 10:03 AM, "Christophe Demko" wrote: You can also add classes to span 1. [Question]{.question} is valid Le dimanche 3 juin 2018 12:58:41 UTC+2, David Griswold a écrit : > > I am trying to create a document with a series of multiple choice > questions like so: > > 1. Question > A. Answer 1 > B. Answer 2 > C. Answer 3 > > 2. Question 2 > > ... > > This is working fine, but I want to add some CSS to help wkhtmltopdf break > correctly between questions only. To do that, I need some custom classes in > each question. > > Ideally, what I'd like is the html to look like > >
      >
    1. > Question >
        >
      1. Answer 1
      2. >
      3. Answer 2
      4. >
      >
    2. > Question 2 >
        >
      1. Answer 1
      2. >
      3. Answer 2
      4. >
      >
    > > Is there any way to do this (or achieve a similar result) directly in the > markdown? > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/ msgid/pandoc-discuss/c5388acd-cabd-4adc-9729-fd33d46191ed%40googlegroups.com . For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJ1Dfe1cd1S91gzOz_2-49jiGZzWzDuMzLmyG3J5B_%2BLJ1q-sQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.