Skip to content

Conversation

@geoff-cox
Copy link
Contributor

Summary

This PR introduces a new PreTeXt element, , for hiding inline and block content until the button labelled "reveal" 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
Copy link
Contributor Author

@rbeezer, I finally got some time to work on this. Let me know what you think. I am colorblind, so the colors may need adjusting. I don't know what goes into the schema, so I'll wait for some guidance on where I should begin.

@geoff-cox geoff-cox marked this pull request as ready for review August 20, 2025 20:45
@rbeezer
Copy link
Collaborator

rbeezer commented Aug 20, 2025

Some merge conflicts when I try to rebase this. Generally you should not need to merge master into your topic branch. Not sure if that is where the problem lies.

Can you:

  • Start a rebase onto master.
  • Resolve merge conflicts.
  • Do a force push here.

If that does not make sense, or sounds dangerous, we can walk through it during a drop-in?

@geoff-cox
Copy link
Contributor Author

geoff-cox commented Aug 21, 2025

@rbeezer, It is scary, but I used the resolve conflict editor here and removed the <<<<<<< veil-draft-pr and >>>>>>> master flags for the overlapping code in xsl/pretext-latex-common.xsl. Then I committed the changes. Is that sufficient? I'm seeing "No conflicts" on my end.

@geoff-cox
Copy link
Contributor Author

@rbeezer. Just bumping this PR to see if you got a chance to try it out and if there was anything else I could do to modify or improve it.

@rbeezer
Copy link
Collaborator

rbeezer commented Oct 21, 2025

Sorry, I've been off-duty for about a month, and had forgotten the status on this one.

If I remember right the lasst time I tried to grab thiis PR to review, I had even more trouble than the time before.

The PR/branch should not show any merge commits, and really should be just a few commits (at most) based on a recent (most recent) commit that has been pushed to the repository.

Are you able to make it to Monday Drop-In online sessions? They'll move to Tuesday in a couple weeks or so.

@geoff-cox
Copy link
Contributor Author

@rbeezer
Thanks for getting back to me. I wasn't able to make it into the drop-in this week. I'll try for next week. I am thinking the easiest approach would be to start with a fresh clone of PreText and resubmit the PR.

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.

2 participants