PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
264 stars 206 forks source link

Style aside-like in LaTeX #1501

Open mitchkeller opened 3 years ago

mitchkeller commented 3 years ago

aside-like is being dumped into LaTeX without any styling to distinguish it from a p (or perhaps paragraphs). Please add styling for this.

jjrsylvestre commented 1 year ago

Haven't fully tested this, but a Greg's L is nice for this:

\tcbset{ asidestyle/.style={
    bwminimalstyle, runintitlestyle, blockspacingstyle, after title={\space},
    enhanced,
    breakable,
    frame hidden,
    after skip={2.5ex},
    overlay unbroken={
        \draw[thin] ([shift={(-0.75ex,-0.5ex)}]frame.north west)--([shift={(-0.75ex,-0.75ex)}]frame.south west)--([shift={(4ex,-0.75ex)}]frame.south west);
    },
    overlay first={
        \draw[thin] ([shift={(-0.75ex,-0.5ex)}]frame.north west)--([shift={(-0.75ex,-0.75ex)}]frame.south west);
    },
    overlay middle={
        \draw[thin] ([shift={(-0.75ex,-0.5ex)}]frame.north west)--([shift={(-0.75ex,-0.75ex)}]frame.south west);
    },
    overlay last={
        \draw[thin] ([shift={(-0.75ex,-0.5ex)}]frame.north west)--([shift={(-0.75ex,-0.75ex)}]frame.south west)--([shift={(4ex,-0.75ex)}]frame.south west);
    }
} }
rhinopotamus commented 1 month ago

Not proposing this as a solution because it required a lot of fiddling elsewhere, but here is a blog post with custom xsl to make asides into margin notes.