Dealing with bootstrap in html files #9497
-
Hi. I'm new to pandoc and got here via pypandoc. (and it looks like the google group is unavailable). I've got a question and am looking for some guidance. I'm trying to take an html that uses bootstrap (5) and create pdf or docx files. From what I've read, it looks like I should be defining a template. But before I try to figure out what that means, I was hoping some good soul had already solved this. So my questions:
Thanks, Here's a better description: Mostly I’m trying to control what goes next to what, as in there is a question and there is an answer. The desire is to put the question to the left of the answer. In HTML, there’s not a good way to do this without some kind of augmentation. I could use a table, and I could put the question into a column and the answer in a column (but that's a hack). Or I could use a description list (but that's a hack). Here's a specific example:
In a browser, this gives (the outer div says to put the child div’s on the same line): After pypandoc processing, it gives Question As in,
I can’t figure out what I need to do to incorporate the bootstrap classes so they pass through to the output. And for completeness, here's how I'm using pandoc:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Pandoc doesn't pay any attention to CSS, so this isn't a viable path if your target is docx. |
Beta Was this translation helpful? Give feedback.
Pandoc doesn't pay any attention to CSS, so this isn't a viable path if your target is docx.
If your target is pdf, you can simply use wkhtmltopdf or a similar tool to turn HTML directly into PDF.