Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color at page break affects folios and other frames #1659

Closed
Omikhleia opened this issue Dec 16, 2022 · 2 comments
Closed

Color at page break affects folios and other frames #1659

Omikhleia opened this issue Dec 16, 2022 · 2 comments
Assignees
Labels
bug Software bug issue
Milestone

Comments

@Omikhleia
Copy link
Member

SILE 0.14.5

If some colored text is split at page boundary, the color also affects the folio number and other frames (e.g. footnotes)

MWE:

image

\begin[papersize=a8,class=book]{document}
\use[module=packages.color]
\font[size=14pt]

Lorem ipsum dolor sit amet some random raw text for example.

Lorem ipsum.

Lorem ipsum dolor\footnote{Note} sit amet some random raw \color[color=red]{text for example of color lorem ipsum}.
\end{document}

(The critical apparatus I am typesetting contains "unclear" parts and "emendations", I was considering using colors for them, e.g. a light gray for unclear words and some dark gray for emendations - But I wouldn't have expected the color to span over the folios, footnotes, margins, etc. if the colored part of a sentence happens to be page-broken.)

@alerque
Copy link
Member

alerque commented Dec 23, 2022

Interesting problem. I guess we need a color push/pop in the frame break hook eh?

@alerque alerque added the bug Software bug issue label Dec 23, 2022
@alerque alerque added this to the v0.x.y milestone Dec 23, 2022
@alerque
Copy link
Member

alerque commented Dec 23, 2022

Hmm. This is somewhat messier than I first imagined. We can't just add a frame enter/leave hook that pushes/pops the default color because all we're going to end up with is the footnote and folio frames popping back to the (wrong) color. We can't add a hook that only works on the current frame ID because the next frame may or may not have the same ID.

I think the right answer is probably that we need a hook to run whenever we switch typesetters, or a way to stuff information like the current color into the typesetter state and then make sure the backend updates it as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
None yet
Development

No branches or pull requests

2 participants