Hypothes.is

9 views
Skip to first unread message

Sean Fitzpatrick

unread,
May 19, 2026, 12:09:10 PM (12 days ago) May 19
to PreTeXt development
There was a question today on the MathTech discord about using hypothes.is for note taking. We used to have support for this, but the previous mechnism for it no longer appears to work.

One of my projects still uses it, in theory, by adding the following to the web target in project.ptx:

<stringparams key="html.annotation" value="hypothesis"/>

Building HTML and inspecting source suggests that this is now ignored: I can't find anything in the page source that points to hypothes.is, so my conclusion is that PreTeXt no longer supports it (as oppposed to a change in their API or something like that).

I'm curious whether there is any value in figuring out how to resurrect it. (If the user base consists of me and one person on Discord, probably not.)
I don't recall if it was intentionally removed, or if it just fell by the wayside during the big push to overhaul HTML (back when we started bundling JS and CSS, etc.)

Rob Beezer

unread,
May 19, 2026, 12:19:41 PM (12 days ago) May 19
to prete...@googlegroups.com
> Building HTML and inspecting source suggests that this is now ignored

There is an "internal" boolean XSL variable, "b-activate-hypothesis". Search
xsl/pretext-html.xsl for that, and it looks like me that this is still supported
by PreTeXt (which does not mean that our old implementation is working).

BUT, it looks like the requisite template maybe got lost in a rearrangment of
the <head> and it only shows up on *some* pages. I can investigate more after
Drop-In.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/29e155f3-337f-4e80-ada9-ae265e3eff71n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/29e155f3-337f-4e80-ada9-
> ae265e3eff71n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sean Fitzpatrick

unread,
May 19, 2026, 12:21:51 PM (12 days ago) May 19
to PreTeXt development
Thanks. I'd join the drop-in but today is a PD day and I'm busy keeping my kids from killing each other

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDA0Ny5iZWV6ZXI.1779207579%40pnsh.

Andrew Scholer

unread,
May 19, 2026, 2:54:56 PM (12 days ago) May 19
to prete...@googlegroups.com
I just tested with the pretext script. The stringparam appears to work. You should end up with the chunk of JS shown below on pages. It does not get built into standalone pages that are built for interactives, though we could add it to those if desired.

  <script type="application/json" class="js-hypothesis-config">{
    "openSidebar": false,    "showHighlights": true,}
  </script>
  <script src="https://hypothes.is/embed.js" async="">

The loading does appear to block on everything else. In a complex page it can take a little bit for the hypothesis widgets to pop up.

Sean Fitzpatrick

unread,
May 19, 2026, 3:00:00 PM (12 days ago) May 19
to PreTeXt development
Ok, that's good to know. 
That suggests something is getting missed with the CLI, because I can't find this in the HTML I generated. 

Sean Fitzpatrick

unread,
May 19, 2026, 8:17:48 PM (11 days ago) May 19
to PreTeXt development
Ok, I think we've tracked down the culprit. 

When the CLI changed syntax in the project file from 1.0 to 2.0, there was also a change in the syntax for string parameters that I was not aware of.
Reply all
Reply to author
Forward
0 new messages