URLs to interactive content

90 views
Skip to first unread message

Rob Beezer

unread,
Feb 8, 2023, 2:46:29 PM2/8/23
to prete...@googlegroups.com
We make a "standalone" page for each audio, video, and interactive. You get it
with an HTML build. Specify a base-URL in your publisher file and we can point
to it from static formats (e.g. braille could point to audio).

Many of these interactive items already have served versions/instances on other
people's servers. For example, YouTube videos and GeoGebra materials. Many do
not, say a "custom" Javascript interactive. So in some cases the standalone
page might be the only place where the content is isolated.

The standalone page is nice since it still looks like your book. But maybe the
"real" version is better than embedding it into a branded page?

Three places where URLS can go - inside the QR code, and there is room for up to
two links (standalone page, served instance). Links get footnotes in the PDF
with URLs. These could be killed.

* Which URLs and where? Note the current version is not what would be my first
choice, since any new effort will hinge on this discussion.

Oscar Levin

unread,
Feb 8, 2023, 9:55:20 PM2/8/23
to prete...@googlegroups.com
I don't know why I would want a standalone page for such content.  I want anyone linking to that content to go to it's spot in the book.  In particular, if a student has the paperback and scans the qr code for a video, if they are taken to (the anchor of) that video in the chapter, then they don't have to scan the next qr code, but just scroll down.

Or if someone opens up 5 links to interactives in 5 tabs, it would be helpful for them to "place" these in their context, helping them differentiate between the interactives.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyNy5iZWV6ZXI.1675885588%40quikprotect.

Sean Fitzpatrick

unread,
Feb 8, 2023, 10:11:03 PM2/8/23
to PreTeXt development
I think if I have a book full of YouTube videos (which I do), and a student is using the print version because they prefer that over HTML, I want the QR code for the video to open the video directly, in the YouTube app on their phone. It should bypass the HTML book completely.

I don't want to send them to the embedded version in the HTML textbook, where they're going to see the exact same content they already have in print.

Steven Clontz

unread,
Feb 8, 2023, 10:20:05 PM2/8/23
to PreTeXt development
I don't necessarily like the assumption that every PreTeXt document must have a public hosted web version.

In any case, for any server-based asset (YouTube, interactive iframe, etc) I'd expect the QR code to go directly to the media at its host, not the possibly-nonexistent public HTML build of the document. See https://en.wikipedia.org/wiki/Principle_of_least_astonishment - a YouTube video reference should send a reader to YouTube. If your web build host goes down, the QR code is useless unless it points directly to YouTube. If YouTube goes down, you're out of luck either way.

Rob Beezer

unread,
Feb 9, 2023, 11:54:24 AM2/9/23
to prete...@googlegroups.com
On 2/8/23 19:20, Steven Clontz wrote:
> I don't necessarily like the assumption that every PreTeXt document

We aren't talking about every document, only those which have interactive
content that really only performs well in HTML output.

> must have a public hosted web version.

The publisher must set a base URL to opt-in, so this is not a requirement. No
base URL, no links to standalone pages.

So I don't understand your objection.

And just to be clear, some interactive content ("authored") is not being served
anywhere else, so the book (Oscar-option) or a standalone page are the only
places to go.

> In any case, for any server-based asset (YouTube, interactive iframe, etc) I'd
> expect the QR code to go directly to the media at its host, not the
> possibly-nonexistent public HTML build of the document.
> See https://en.wikipedia.org/wiki/Principle_of_least_astonishment -

Sure, that seems like common sense. But I would not be astonished to be sent to
a dedicated page that has the book's title, etc. And it sounds like Oscar would
take it a step further, and he thinks a reader should be taken into the HTML
version of the book itself.

So I don't think that principle is much help towards making a decision here.

Rob

Rob Beezer

unread,
Feb 9, 2023, 11:56:15 AM2/9/23
to prete...@googlegroups.com
On 2/8/23 18:55, Oscar Levin wrote:
> I don't know why I would want a standalone page for such content.

No distracting promotional logos for commercial endeavors? Or more accurately,
only discreet logos for non-profit projects you contribute to? ;-)

> I want anyone
> linking to that content to go to it's spot in the book.

OK, add this as a third destination for this discussion.

Rob

Oscar Levin

unread,
Feb 9, 2023, 12:20:51 PM2/9/23
to PreTeXt development

> I don't know why I would want a standalone page for such content.

No distracting promotional logos for commercial endeavors? Or more accurately,
only discreet logos for non-profit projects you contribute to? ;-)

Oh, yeah, I see why you would prefer a standalone page to a youtube page: Okay, I'm going to learn how to do the chain rul...why yes, I would rather watch a video about this new board game, thank you youtube!

But then, I'm thinking of content in my book as something I made or curated for my students, not as an external reference that they might want to look at for additional information.  Youtube is just a useful hosting platform for the videos that are part of the book.  They are still part of the book, so should be viewed inside the book.

If I were to refer a student to someone else's source, I would have a link to that in all versions, not embed it inside the book.

Steven Clontz

unread,
Feb 9, 2023, 12:29:00 PM2/9/23
to PreTeXt development
> We aren't talking about every document, only those which have interactive content that really only performs well in HTML output.

I think it's reasonable to include a <youtube> element in a PreTeXt document that's only targeting print.

> The publisher must set a base URL to opt-in, so this is not a requirement. No base URL, no links to standalone pages.

Ah, I might have misunderstood! If QR codes point to the host of the media whenever the base URL is not set (e.g. when you don't plan to host your book as HTML anywhere canonical), then you're right: I have no objections.

>  some interactive content ("authored") is not being served anywhere else

I agree - obviously in this case you want to point to either the book or a standalone page, and I have no strong preference which myself. But for hosted content I think that having QRs point directly to the host and not the book should at least be a publisher decision (if not the default).

Steven Clontz

unread,
Feb 9, 2023, 12:31:33 PM2/9/23
to PreTeXt development
I think the default behavior for authoring content in PreTeXt aiming only for print should always, whenever possible, not rely on the assumption that someone is maintaining a web version. Someday we want folks writing documents in PreTeXt not intended for the open web, just as is done in LaTeX currently.

Rob Beezer

unread,
Feb 9, 2023, 12:43:43 PM2/9/23
to prete...@googlegroups.com
On 2/9/23 09:28, Steven Clontz wrote:
> I think it's reasonable to include a <youtube> element in a PreTeXt document
> that's only targeting print.

Understood.

> Ah, I might have misunderstood! If QR codes point to the host of the media
> whenever the base URL is not set (e.g. when you don't plan to host your book as
> HTML anywhere canonical), then you're right: I have no objections.

No base URL set, then we have to decide what to do. No option for book itself,
and no option for a standalone page. So we hope the thing is hosted somewhere
(YouTube, Desmos, etc.). Not implemented right now, since I (wisely!) wanted to
see this discussion through.

> should at least be a publisher decision (if not the default).

I didn't want to say it. ;-) But maybe we are going there. I don't think
anybody wants more than one QR code. (Maybe none!). We could easily stack zero
to three links: book, standalone, server. There could be a preference for the
QR code's payload.

Rob

> On Thursday, February 9, 2023 at 11:20:51 AM UTC-6 oscar...@gmail.com wrote:
>
>
> > I don't know why I would want a standalone page for such content.
>
> No distracting promotional logos for commercial endeavors? Or more accurately,
> only discreet logos for non-profit projects you contribute to? ;-)
>
> Oh, yeah, I see why you would prefer a standalone page to a youtube page:
> Okay, I'm going to learn how to do the chain rul...why yes, I would rather
> watch a video about this new board game, thank you youtube!
>
> But then, I'm thinking of content in my book as something I made or curated
> for my students, not as an external reference that they might want to look
> at for additional information.  Youtube is just a useful hosting platform
> for the videos that are part of the book.  They are still part of the book,
> so should be viewed inside the book.
>
> If I were to refer a student to someone else's source, I would have a link
> to that in all versions, not embed it inside the book.
>
> --
> 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...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/2f85c295-f5d5-4ffb-8e73-0232b65fdfffn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-dev/2f85c295-f5d5-4ffb-8e73-0232b65fdfffn%40googlegroups.com?utm_medium=email&utm_source=footer>.

David Austin

unread,
Feb 9, 2023, 4:15:25 PM2/9/23
to prete...@googlegroups.com
I haven't followed this whole thread, but I make standalone pages for the interactives in ULA since a few others have wanted to adapt them into their own classroom activities with slight changes to what's in the book.

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwMS5iZWV6ZXI.1675964622%40quikprotect.

Alex Jordan

unread,
Feb 9, 2023, 4:36:22 PM2/9/23
to prete...@googlegroups.com
We have:

(A) in the book:
https://pretextbook.org/examples/sample-article/html/section-interactive-authored.html#figure-37

(B) naked:
https://pretextbook.org/examples/sample-article/html/interactive-archimedian-spiral-if.html

(C) standalone page:
https://pretextbook.org/examples/sample-article/html/interactive-archimedian-spiral.html

I get a lot of use out of (B) when managing a course through an LMS.
In the LMS, I can write a web page as part of a module, and embed (B)
directly when I need to. Embedding (A) and (C) into these LMS pages
usually adds layers that are either distracting or take up too much
valuable screen real estate.

And this is for a book where I am the primary author! So I do value
the surrounding content from (A). But at different times I have to
teach the course (i) in-person (ii) remotely over Zoom and (iii)
asynchronously online. The modality factors into how I can best
deliver things like the interactives.

So I am not sure if this is part of the conversation right now, but I
want to put it out there that easy access to (B) is a nice thing to
have. In my case, I know enough about using a browser's inspector that
I can locate (B) using either (A) or (C), but most of the ORCCA using
faculty do not consider themselves as knowing how to use a web
browser's dev tools. For the sake of general instructors using a PTX
book, is it on the table to make (B) easy to get?
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/CANXmVMDt8wzSKMWAndu4oHS4iSGg8cK-QZFPD4Bf%2B%3DqiDdrJ5Q%40mail.gmail.com.

Jean-Sébastien Turcotte

unread,
Feb 10, 2023, 10:42:21 AM2/10/23
to PreTeXt development
I would also add that Alex's B and C will load much faster than A will. If a user is using print, it could be because they can't access a fast reliable internet provider. The loading time might make a difference there.

Rob Beezer

unread,
Feb 27, 2023, 1:28:49 PM2/27/23
to prete...@googlegroups.com
This thread was supposed to finish off the last hurdle to making "interactive"
official. Misplaced optimism, I guess. ;-) So a restart.

We have up to three instances of an "interactive".

1. In the book, as published (base URL in publisher file).

2. In a standalone page, site given by a base URL.

3. On a publicly available server, for example YouTube, or Desmos.

A QR code can only have one URL in it. And one QR code is enough (too much for
some folks).

Proposal: Publisher switch, options like, "none", "book", "page", "server".
(Not sure what "server" falls back to if an "interactive" does not live on a
server? Maybe not "book".)

It is easy enough to "stack" links below the QR code. Add a fourth useful link
- Alex's suggestion of the raw iFrame for embedding elsewhere (LMS).

Proposal: four yes/no publisher switches: "link-book", "link-page",
"link-embed", "link-server".

Let's see (...consults Oscar's textbook...) that is 64 possible configurations.

Rob Beezer

unread,
Mar 2, 2023, 5:32:12 PM3/2/23
to prete...@googlegroups.com
Should I interpret silence, from those with an opinion earlier, as assent?

Rob

Alex Jordan

unread,
Mar 2, 2023, 6:00:21 PM3/2/23
to prete...@googlegroups.com
I don't have an opinion, but I I do have an observation.

The stacked links you describe remind me of the links to archived
images. For that, we use a single space-separated string (in docinfo,
not yet in the publisher file, last I checked). Like "eps pdf png svg
tex". Is that any better than four separate boolean switches?

Or is it worse? And when image archiving migrates to the publisher
file it should become a bunch of booleans?

Or is it totally appropriate to do them differently, because one case
has four well-defined options. And the other case is open-ended?
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwMC5iZWV6ZXI.1677796330%40quikprotect.

Rob Beezer

unread,
Mar 2, 2023, 6:08:36 PM3/2/23
to prete...@googlegroups.com
Thanks, that is a good suggestion. If it gets too wide the QR code might get
too big. I'll have to experiment. (And this is static only.)

The archiving has a crazy on/off tree hierachy thing going. In "docinfo". Not
sure how/if that is going to migrate.

Oscar Levin

unread,
Mar 2, 2023, 6:24:42 PM3/2/23
to prete...@googlegroups.com
Yes, my silence says you do indeed have that counting question correct.

This does seem to give maximal flexibility.  So I'm definitely in favor.

David Austin

unread,
Mar 3, 2023, 9:00:51 AM3/3/23
to prete...@googlegroups.com
I'm still working on the counting problem, but I'm in favor of your proposal. 

David

Rob Beezer

unread,
Aug 15, 2023, 12:40:20 PM8/15/23
to prete...@googlegroups.com
Following up with Alex on his (B) below, which I want to support.

In the "spiral" example below, we have manufactured a minimalist, but complete,
web page containing some JS specific to the demo, maybe a div or canvas for the
actual thing to live on the page, etc. Where born in HTML we use this page in
an iFrame construction. Good - it provides (B) as well and we know its location.

Now, consider a Desmos "material". It is already an iFrame. More precisely,
Desmos supports a URL we create and use in an iFrame element. We just plop that
iFrame+URL onto the page where born. We do not even make the page like we make
for the "spiral" since we do not need it in order to have an iFrame - it is one.

What should (B) provide in the latter case? Just the URL that Desmos expects us
to use? Or should we make a minimalist page whose only real content is the same
iFrame we place where born? Does this mean an LMS would embed a page with an
iFrame into an iFrame? Is that so bad?

Maybe my confusion/hesitancy rests on "embed (B)
directly" and I need to know more precisely where (B) is going (or how it is
going)? There's a fair bit of refactoring to make this happen, so I need to
understand it better before I go off trying stuff.

Perhaps a Drop-In chat will be easier if the question, or answer, is not obvious.

Rob

Alex Jordan

unread,
Aug 23, 2023, 4:06:45 PM8/23/23
to prete...@googlegroups.com
Here's what I'm thinking. Sites often provide "embed code". For
example at a YouTube video on YouTube's site, there is currently a
Share button that leads to a popup where there is an "Embed" button,
which provides a copyable:

<iframe width="560" height="315"
src="https://www.youtube.com/embed/YtkIWDE36qU?si=vOJBENRUibXpG5gr"
title="YouTube video player" frameborder="0" allow="accelerometer;
autoplay; clipboard-write; encrypted-media; gyroscope;
picture-in-picture; web-share" allowfullscreen></iframe>

For (B), all *I* need is a URL and I am comfortable writing the iframe
element mysself. But instructors who are managing content in a web
page or LMS may need a little more, and appreciate getting this whole
thing and pasting it where the LMS tells them to.

1. Could you provide (B) as complete iframe code, not just a URL?
2. Its src would of course be what you need it to be in the case of
the "spiral" example and other such things.
3. Its src should be the simplest thing it can be in the case of like
a Desmos material. Personally I would try to avoid the PTX-constructed
intermediate page for these, but I see how it would be easier to
maintain if it were all just uniform.

> I need to know more precisely where (B) is going

Here is a quick recording of what I go through when I am managing
something in my LMS, which is D2L. If that's not helpful, no problem
and let me know.
https://spot.pcc.edu/~ajordan/temp/embed.mov
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxMy5iZWV6ZXI.1692117618%40quikprotect.

Rob Beezer

unread,
Aug 24, 2023, 1:35:44 PM8/24/23
to prete...@googlegroups.com
Thanks, Alex, for putting this together. I had these bits and pieces floating
around and this helps clarify what is being suggested.

It is straightforward (iirc) to make the URL that goes into iframe/@src. And
you and I and lots of other folks know what to do next. But I agree that is not
helpful for most people and is not what you typically see.

I can also make the whole "iframe" element, including the pixels for width and
height. But here's the rub - how to deliver that in a static context, such as a
PDF. We can deliver a URL via the hyperref package, with the hope that a PDF
reader has a "Copy Link Address" type feature. But some of these URLs are huge
(CalcPlot3D) so there is no good place to put them out in the open.

So I guess I'm convincing myself this is not a feature for static, but rather a
feature for HTML. Maybe a cute, unobtrusive, button hanging off the
bottom-right corner of an interactive that says "Embed" and behaves like folks
expect ("copy and paste this code..."). This is not a link away from static to
dynamic, it is "raw" HTML for another purpose, and there is no reason not to
deliver it (somehow) in the HTML version.

Rob
Reply all
Reply to author
Forward
0 new messages