Skip to content

Second Attempt: Add <veil>, an inline reveal/hide element for guided …#2886

Open
geoff-cox wants to merge 1 commit into
PreTeXtBook:masterfrom
geoff-cox:veil-element-take-two
Open

Second Attempt: Add <veil>, an inline reveal/hide element for guided …#2886
geoff-cox wants to merge 1 commit into
PreTeXtBook:masterfrom
geoff-cox:veil-element-take-two

Conversation

@geoff-cox
Copy link
Copy Markdown
Contributor

Hopefully, this is a clean merge. I tested it before the original PR, but didn't retest it. Perhaps you could take it for a spin, or I could later.

Summary

This PR introduces a new PreTeXt element, , to hide inline and block content until the "reveal" button is clicked. This version focuses more on the HTML side of the element and only offers minimal support for print.

HTML

  • Renders a compact “reveal” button.
  • On click/Enter/Space, hidden content is revealed inline with a thin accent border; clicking inside the revealed area hides it again.

LaTeX/Print

  • Inline veils print as their content underlined via \uline{…}.
  • Multiline/block veils are printed plainly (no underline).
  • Veils inside math are not supported yet; content is printed as-is with a warning.
  • Hiding content in print is not supported yet. Further dev discussion is necessary.

Testing

  • Added a section in the sample-article.ptx containing a comprehensive list of test samples.

No schema or publisher-variable changes are included in this PR; those can follow in a subsequent change.

@geoff-cox geoff-cox closed this Jun 2, 2026
@geoff-cox geoff-cox reopened this Jun 2, 2026
@geoff-cox geoff-cox marked this pull request as ready for review June 2, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant