PDF export without Callouts

I have a group of notes where I export them to PDF constantly, but I have information I’d like to hide in callouts that shouldn’t be exported to the PDF. I was attempting to use callouts that are collapsed by default, but PDF export (probably rightly) exports the entire callout’s content along with the rest of the note.

Is there a way to “hide” callouts from PDF export? Or, if there’s another means of accomplishing the same sort of thing, I’m up for hearing it. However, I don’t want to use YAML for this.

I’ve used this before with success to hide certain code blocks in exports:

You may be able to write a custom > [!no-print] callout, use alt text on any callout ( > [!note|no-print] ) and/or a .print export rule so certain ones you’ve tagged aren’t shown in the exported PDF. I’ll have a look later.

Yeah, this seems working. A CSS snippet of:

.print {
    .callout[data-callout-metadata~="no-print"] {
        display: none;

and in any callout that you don’t want exported, add |no-print. e.g.

> [!example|no-print] NO PRINT!
> Duis aute irure dolor in reprehenderit

1 Like

Amazing, thank you! I figured a CSS snippet was the way to go here, but I didn’t know enough about how to get there from here. Have a great one! :smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.