bids-specification icon indicating copy to clipboard operation
bids-specification copied to clipboard

improve admonition handling code

Open Remi-Gau opened this issue 1 year ago • 1 comments

Currently admonition removal deletes the entire admonition "directive" during the pdf build

!!! note "foo bar"

    LOREM ispum

becomes this

LOREM ispum

From personal experience (and seeing @oesteban work with them) it adds mental load when writing them by having to keep in mind this extra rule "don't put anything meaningful in the title of the admonition".


I could try to make this a bit nicer by making the code do this:

This:

!!! note "foo bar"

    LOREM ispum

becomes this

**Note**: foo bar
LOREM ispum

@oesteban @effigies @sappelhoff

Any thoughts?

Remi-Gau avatar Mar 27 '24 14:03 Remi-Gau

That would be a great start, and honestly, I am not sure the PDF rendering should get much further than that.

Perhaps it would be a better effort to set the correct HTTP metadata headers in the document so printing to PDF does generate a nice-looking document.

Markdown-based slides engines rely on the browser's printing feature to do that. I think CI/CD can run chrome or firefox headlessly and print out a PDF.

oesteban avatar Mar 27 '24 14:03 oesteban