pretext generate play-button

18 views
Skip to first unread message

Alex Jordan

unread,
Mar 5, 2023, 2:07:07 AM3/5/23
to prete...@googlegroups.com
With pretext/pretext/pretext, I would run:
pretext -c play-button
to generate the play-button.png image that can be used as a
placeholder for videos in print.

Can we add pretext generate play-button to the CLI?

Alex Jordan

unread,
Mar 5, 2023, 3:33:33 AM3/5/23
to prete...@googlegroups.com
When you run something like:
pretext build print
and the play-button.png is needed but missing, the LaTeX log has:
! Unable to load picture or PDF file 'generated/play-button/play-button.png'.

Maybe the CLI could recognize this and suggest that you run:
pretext generate play-button

Rob Beezer

unread,
Mar 5, 2023, 11:33:51 AM3/5/23
to prete...@googlegroups.com
Not sure I ever sent the memo to the CLI.

This was necessary to move static versions of interactives away from being
LaTeX-specific. Most of that is provisional, hence does not need to be
supported yet by the CLI, but the "video" part has been supported for LaTeX/PDF
output for a long time.

Rob

Steven Clontz

unread,
Mar 5, 2023, 11:41:20 AM3/5/23
to prete...@googlegroups.com
It's up to Oscar, but if this asset isn't actually generated based upon the authored source and doesn't risk an N+1 problem (only a single button is needed for arbitrarily-many elements), perhaps it should just be placed correctly as part of the `pretext build` process, and not require a separate generate step.


Steven Clontz


--
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/MTAwMDAxNi5iZWV6ZXI.1678034029%40quikprotect.

Alex Jordan

unread,
Mar 5, 2023, 2:35:25 PM3/5/23
to prete...@googlegroups.com
I like Steven's suggestion. Would it cover the latex build as well as
the epub (or is it kindle?) build? And would it work in a future where
the image is not just for videos, but also for interactives?

The status quo is that I can't use the CLI to build a PDF (or I don't
know the right way to use devscript to make it work). The tex file in
the temp folder wants to find that image in the temp "generated"
folder, so I can't treat that image as external either (without
authoring it as external in book source files).

Rob, is it worth just hard coding the image as a tikz drawing some day
in the XSLT? (And as inline svg for HTML/epub?) Or does the .png have
value as a separate file?
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/CAOWT6ThBU2X8tptz-SqpjpbbSUad2p-m7H7M1D2q9vMUnrCNvQ%40mail.gmail.com.

Rob Beezer

unread,
Mar 5, 2023, 3:33:07 PM3/5/23
to prete...@googlegroups.com
We were generating this image from TikZ for LaTeX. That requires an
installation with an executable LaTeX to create (and is a sledgehammer). Video
support in PreTeXt is better not requiring LaTeX to make an EPUB.

So this is the way it is going to go with PreTeXt.

The CLI can choose to find the image in the distribution, and always copy it to
where the CLI expects it to be, and then no changes need to be made to the
"generate" command.

@Alex - I'm sorry this has slowed you down. pretext/pretext is enabled to do
the right thing. The CLI should be soon. I had expected to resolve static
"interactive" more quickly than has been the case, so pushed these changes for
static "audio", "video", and "interactive" as a package. I'm trying to get UPS'
writers handbook out as an EPUB and "interactive" was holding back "video" was
holding back that progress.

Rob

Rob Beezer

unread,
Mar 5, 2023, 3:36:09 PM3/5/23
to prete...@googlegroups.com
> doesn't risk an N+1 problem

I don't understand what you mean by this.

Rob

On 3/5/23 08:41, Steven Clontz wrote:
> It's up to Oscar, but if this asset isn't actually generated based upon the
> authored source and doesn't risk an N+1 problem (only a single button is needed
> for arbitrarily-many elements), perhaps it should just be placed correctly as
> part of the `pretext build` process, and not require a separate generate step.
>
>
> Steven Clontz
> https://clontz.org <https://clontz.org> - steven...@gmail.com
> <mailto:steven...@gmail.com>
>
>
> On Sun, Mar 5, 2023 at 10:33 AM Rob Beezer <bee...@privacyport.com
> <mailto:bee...@privacyport.com>> wrote:
>
> Not sure I ever sent the memo to the CLI.
>
> This was necessary to move static versions of interactives away from being
> LaTeX-specific.  Most of that is provisional, hence does not need to be
> supported yet by the CLI, but the "video" part has been supported for LaTeX/PDF
> output for a long time.
>
> Rob
>
> On 3/4/23 23:06, Alex Jordan wrote:
> > With pretext/pretext/pretext, I would run:
> > pretext -c play-button
> > to generate the play-button.png image that can be used as a
> > placeholder for videos in print.
> >
> > Can we add pretext generate play-button to the CLI?
> >
>
> --
> 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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxNi5iZWV6ZXI.1678034029%40quikprotect <https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxNi5iZWV6ZXI.1678034029%40quikprotect>.
>
> --
> 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/CAOWT6ThBU2X8tptz-SqpjpbbSUad2p-m7H7M1D2q9vMUnrCNvQ%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-dev/CAOWT6ThBU2X8tptz-SqpjpbbSUad2p-m7H7M1D2q9vMUnrCNvQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Alex Jordan

unread,
Mar 5, 2023, 3:45:42 PM3/5/23
to prete...@googlegroups.com
> We were generating this image from TikZ for LaTeX. That requires an
installation with an executable LaTeX to create (and is a sledgehammer). Video
support in PreTeXt is better not requiring LaTeX to make an EPUB.

I was not suggesting requiring LaTeX to make an EPUB. My comment
before was to only be using tikz for the actual LaTeX build.

And then for HTML or EPUB, this image could be written as an inline
svg. Or now that I think about it, if EPUB has trouble with inline
svg, then it could be an img element with the png data just written
into the src attribute.
> 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/MTAwMDAzMC5iZWV6ZXI.1678048567%40quikprotect.

Steven Clontz

unread,
Mar 5, 2023, 3:56:39 PM3/5/23
to prete...@googlegroups.com
Don't forget that

pretext devscript -c play-button

may work right now.


>n+1 problem

A problem where you run something n+1 times for n+1 objects, when you really can just run it 1 time for all the objects at once.

Rob Beezer

unread,
Mar 5, 2023, 4:04:22 PM3/5/23
to prete...@googlegroups.com
A key design criteria is to have the pre-processor make static versions of
interactive goodies *in legal PreTeXt* as much as possible. Then, LaTeX, EPUB,
Kindle, (Jupyter?), braille, and tomorrow's new format, do not need to be
crafting SVG for this, PNG for that.

So basically a "preview" image in a static format is *basically" being achieved
with something like

<image source="generated/play-button.png"/>

Now that is not entirely accurate because we built a small bit of extra/private
XSL to support pointing to images on the non-external side. So far, I think
that is the only hack to support static formats.

Rob

Alex Jordan

unread,
Mar 5, 2023, 4:06:05 PM3/5/23
to prete...@googlegroups.com
I see this image as exceptional. It is not an external image provided
by the author. And it is not an image that is generated from some code
or reference that the author provided. It is generated, but by PTX
itself. So it feels different. Right now the only similar thing that
comes to mind is the "draft text" background image.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/CAOWT6Ti4k2v%3D0KT37CjcoU4H_%3DmT0Ege5yF9vBpZhaTnR4pFjw%40mail.gmail.com.

Rob Beezer

unread,
Mar 5, 2023, 4:08:46 PM3/5/23
to prete...@googlegroups.com
On 3/5/23 12:56, Steven Clontz wrote:
> A problem where you run something n+1 times for n+1 objects, when you really can
> just run it 1 time for all the objects at once.

Not "n times for n objects"? What's the "1" about? That's where you lost me. ;-)

Anyway, we only have 1 image and we are using it M times. ;-)

Rob

Rob Beezer

unread,
Mar 5, 2023, 4:17:20 PM3/5/23
to prete...@googlegroups.com
It is different. And so being handled differently.

In the early days we did not want authors to go find something in the
distribution and copy it over to a LaTeX build or to the right relative location
for an HTML build.

I don't miss those days.

Now we have managed directories, pretext/pretext, PreTeXt-CLI. Put these images
where they can be found reliably and copy them over where they can be consumed
reliably, without much (any?) intervention by an author.

And forgot to say earlier: we still have SVG for HTML (iirc), and PNG will be
most universal, especially for Kindle which caps the number of SVG. We don't
want an M+1 problem there. ;- ;-) ;-)

Rob

Oscar Levin

unread,
Mar 5, 2023, 4:45:19 PM3/5/23
to PreTeXt development
I don't understand exactly when this image is needed, but it doesn't seem like anything that is worth "generating" at all.  It seems like it is analogous to a font or the PreTeXt logo or the css/javascript.  Thus it should either be fetched from a remote CDN each time it is needed like those other things, or should be shipped as a static asset with pretext.  I'm strongly in favor of the latter (as I am for all the static assets mentioned here, but I understand we have a ways to go first).

So, should this go in pretext/pretext as copying that static shipped file to the right spot?  That would be more flexible than having a separate function for the CLI.  

Alex Jordan

unread,
Mar 5, 2023, 4:46:57 PM3/5/23
to prete...@googlegroups.com
> It is different. And so being handled differently.

But not differently in the aspect I was thinking about. It is going
into the temp folder's "generated" folder, alongside the images that
are truly generated from author things. It's a blurring of lines (I
think it may be the "hack" you referred to.)

Along with generated and external, we could have "provided"? Only used
when PTX makes something?
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyOC5iZWV6ZXI.1678051039%40quikprotect.

Alex Jordan

unread,
Mar 5, 2023, 4:50:02 PM3/5/23
to prete...@googlegroups.com
Oscar, I think that is what happens. The pretext/pretext/pretext -c
play-button command copies the image from a support folder in the
repo. Right now, it copies it into the generated folder. But the CLI
does not yet.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/814b04b2-6380-49a9-a5be-cdd3d43de1aen%40googlegroups.com.

Rob Beezer

unread,
Mar 5, 2023, 4:54:51 PM3/5/23
to prete...@googlegroups.com
On 3/5/23 13:45, Oscar Levin wrote:
> should be shipped as a static asset with pretext.

It is.

> So, should this go in pretext/pretext as copying that static shipped file to the
> right spot?

It is.

Rob Beezer

unread,
Mar 5, 2023, 4:59:43 PM3/5/23
to prete...@googlegroups.com
On 3/5/23 13:46, Alex Jordan wrote:
> But not differently in the aspect I was thinking about. It is going
> into the temp folder's "generated" folder, alongside the images that
> are truly generated from author things.

pretext/pretext copies it into the "generated" folder of the author's source.
So an author could commit it as part of the project's repo. THEN it gets copied
to a temporary folder as part of a build.

> Along with generated and external, we could have "provided"? Only used
> when PTX makes something?

Unnecessary complexity. It *is* generated. From the copy in the PreTeXt
distribution. Not from an author's source. But what's the difference? Nobody
ever said/assumed that "generated" was strictly a function of an author's source.

Rob

Alex Jordan

unread,
Mar 5, 2023, 5:03:06 PM3/5/23
to prete...@googlegroups.com
> Nobody ever said/assumed that "generated" was strictly a function of an author's source.

False! I assumed that :)

Not worth continuing the discussion. I will make sure no author images
have label="play-button" to avoid the clash and carry on.
> --
> 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/MTAwMDAwNC5iZWV6ZXI.1678053582%40quikprotect.

Rob Beezer

unread,
Mar 5, 2023, 5:15:35 PM3/5/23
to prete...@googlegroups.com
On 3/5/23 14:02, Alex Jordan wrote:
> False! I assumed that :)

<hehe/>

> Not worth continuing the discussion. I will make sure no author images
> have label="play-button" to avoid the clash and carry on.

I'm not sure that can happen, since we control "generated". An image derived
from an @xml:id (not yet from @label?) should go elsewhere. (?)

Rob

Alex Jordan

unread,
Mar 5, 2023, 5:21:19 PM3/5/23
to prete...@googlegroups.com
You're right, since we subfolder the generated folder with
"latex-image", "asymptote", etc. This is putting play-button.png in
the root of generated. I lost sight of the middle layer of
subfoldering.
> --
> 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/MTAwMDAzNi5iZWV6ZXI.1678054533%40quikprotect.

Alex Jordan

unread,
Mar 5, 2023, 5:22:06 PM3/5/23
to prete...@googlegroups.com
Er, no. Not in the root. In a play-button subfolder which is better.

Alex Jordan

unread,
Mar 5, 2023, 5:41:06 PM3/5/23
to prete...@googlegroups.com
Oscar, if you are in there for play-button, qrcode is also not there yet.

I ran these:
pretext devscript -p publication/publication.xml -c play-button src/orcca.ptx
pretext devscript -p publication/publication.xml -c qrcode src/orcca.ptx

And then I can do:
pretext build print

So we're aiming to do whatever makes sense to get those things built
without using devscript.

Oscar Levin

unread,
Mar 5, 2023, 6:49:49 PM3/5/23
to PreTeXt development
Alex,

qr-code is available in the CLI, although not as a `pretext generate qrcode`.  Is that how you expected to use it?  

The rough model I have in my head is that `pretext generate <asset>` should be called when you want to generate any generatable content for the source type <asset>.  For example, you would write `pretext generate latex-image` if you want to get all the required output formats of the source type latex-image (for your default target).  If you have sageplot and asymptote, you might want svg's for all of these, but `pretext generate svg` would not be appropriate; the user should not need to know what format the assets should be generated into.

If you can describe your workflow, that will help decide what should be generated when.  Is it true that the only time we would put the play-button is when you are generating youtube?

The question remains whether some assets should be always generated on every build, or whether a user should need to remember to generate crucial things before building.

Alex Jordan

unread,
Mar 5, 2023, 7:26:30 PM3/5/23
to prete...@googlegroups.com
I was running:
pretext build print

where "print" is a valid target in the project file that makes a PDF.
The LaTeX compilation choked on missing play-button.png, so I ran:
pretext devscript -p publication/publication.xml -c play-button src/orcca.ptx
and then tried again:
pretext build print

I got an inch further. This time the LaTeX compilation choked on
missing QR code image files. So I tried:
pretext generate qr-codes
but "qr-codes" is not a valid "pretext generate" command. (You wrote
this is available in the CLI; what makes the QR codes then if not
pretext generate?)
So then I did:
pretext devscript -p publication/publication.xml -c qr-code src/orcca.ptx
and tried again:
pretext build print
And it built successfully.

For both things, the pretext devscript is placing files in the
project's generated folder. Either in:
generated-assets/play-button/
or in:
generated-assets/qr-code/
Then the generated-assets folder is copied to the temporary folder as
"generated/". Then the .tex file is looking for images to insert from
folders generated/play-button/ and from generated/qr-code/.

Ideally if you run:
pretext build print
it would be good if it recognized the project will need the QR-codes
and the play-button image. And then just make them one step ahead of
building the PDF when they are needed. With the play-button, it's
super fast and harmless to overwrite what was already there. With the
QR-codes, also harmless to overwrite, but maybe can take up time? So
maybe good to not automatically remake them? I don't know.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/76eea14b-9662-45c5-94b0-edccf2022be5n%40googlegroups.com.

Rob Beezer

unread,
Mar 5, 2023, 7:36:49 PM3/5/23
to prete...@googlegroups.com
The "component" in the pretext/pretext script is "qrcode". And that identifier
is used consistently.

Below seems to have "qr-code" consistently. Might some of your observations be
different?

Rob

Alex Jordan

unread,
Mar 5, 2023, 7:37:46 PM3/5/23
to prete...@googlegroups.com
> Is it true that the only time we would put the play-button is when you are generating youtube?

ORCCA has
video[@youtubeplaylist]

not
video[@youtube]

Maybe you are saying the CLI automatically makes the QR codes when doing:
pretext generate youtube


But that does not help for @youtubeplaylist. At present we don't make
thumbnails for @youtubeplaylist. So maybe a lot of this is wrapped up
in @youtubeplaylist being overlooked.

Alex Jordan

unread,
Mar 5, 2023, 7:41:03 PM3/5/23
to prete...@googlegroups.com
Anything with "qrcode" versus "qr-code" is just me making typos in
this thread. When I incanted the right thing for the devscript, I was
looking at the functions in pretext/pretext/pretext.

I don't think there is an explicit way to make QR codes with the CLI.
I'm piecing it together that it comes automatically from
pretext generate youtube
But see my last post. ORCCA has video[@youtubeplaylist], not video[@youtube].
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyOC5iZWV6ZXI.1678063007%40quikprotect.

Oscar Levin

unread,
Mar 5, 2023, 8:50:34 PM3/5/23
to PreTeXt development
I've added play-button "generation" to the cli, when you run `pretext generate youtube`.  You will also now get qr codes for youtubeplaylists.  I think.  

Should be ready for tomorrow's nightly.

You are right that there is no way to generate only qr-codes.  You can generate qr-codes by generating assets for youtube or interactive (or all).

Rob Beezer

unread,
Mar 6, 2023, 12:11:06 AM3/6/23
to prete...@googlegroups.com
On 3/5/23 17:50, Oscar Levin wrote:
> You are right that there is no way to generate only qr-codes.  You can generate
> qr-codes by generating assets for youtube or interactive (or all).

And "audio". "video/@source", "video/@vimeo", and perhaps more that I am
forgetting.

QR code generation is super-fast. Why not just "audio", "video", "interactive"?
No matter what.

Rob
> https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNi5iZWV6ZXI.1678054533%40quikprotect <https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNi5iZWV6ZXI.1678054533%40quikprotect>.
> > >>
> > >> --
> > >> 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/76eea14b-9662-45c5-94b0-edccf2022be5n%40googlegroups.com <https://groups.google.com/d/msgid/pretext-dev/76eea14b-9662-45c5-94b0-edccf2022be5n%40googlegroups.com>.
> > >
> >
> > --
> > 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/MTAwMDAyOC5iZWV6ZXI.1678063007%40quikprotect <https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyOC5iZWV6ZXI.1678063007%40quikprotect>.
>
> --
> 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/119250a1-e502-452f-aec1-457eedb9c6can%40googlegroups.com <https://groups.google.com/d/msgid/pretext-dev/119250a1-e502-452f-aec1-457eedb9c6can%40googlegroups.com?utm_medium=email&utm_source=footer>.

kcri...@gmail.com

unread,
Mar 6, 2023, 8:40:59 AM3/6/23
to PreTeXt development

I've added play-button "generation" to the cli, when you run `pretext generate youtube`.  You will also now get qr codes for youtubeplaylists.  I think.  


This kind of thing actually came up in the talk I gave last week, because of exactly YouTube and pretext build print; I didn't know what to do to fix that.  Since other "generate" options usually need to be invoked even for HTML output, I didn't think to use pretext generate.  Subsection 5.2.4: Generating assets: pretext generate does allude to YouTube, but doesn't have the level of granularity for pretext generate youtube, and even pretext generate --help has this sort of 'hidden' in the options.  I hesitate to suggest an expansion of the Guide, given that elsewhere it's been said that it's already very long, but a comprehensive web reference to every option beyond the man-page style --help messages could be useful.  Especially if people are now being shied away from the command line at all ... 

Alex Jordan

unread,
Mar 6, 2023, 12:38:37 PM3/6/23
to prete...@googlegroups.com
Oscar, is there an assumption that if I have video[@youtube] in a
project that I *want* the thumbnails? As mentioned, ORCCA does not
have video[@youtube]. But if it did, the thumbnails would be less
desirable than the play-button. (The same applies to if we one day can
make thumbnails for @youtubeplaylist.) These videos are recordings of
an overhead note-taking session and they just don't make appealing or
informative thumbnails.

Is there a CLI workflow to get a PDF with QR codes for
YouTube(Playlist)? videos, but the videos use the play-button.png?



On Mon, Mar 6, 2023 at 5:41 AM kcri...@gmail.com <kcri...@gmail.com> wrote:
>
>
>
>
> I've added play-button "generation" to the cli, when you run `pretext generate youtube`. You will also now get qr codes for youtubeplaylists. I think.
>
>
>
> This kind of thing actually came up in the talk I gave last week, because of exactly YouTube and pretext build print; I didn't know what to do to fix that. Since other "generate" options usually need to be invoked even for HTML output, I didn't think to use pretext generate. Subsection 5.2.4: Generating assets: pretext generate does allude to YouTube, but doesn't have the level of granularity for pretext generate youtube, and even pretext generate --help has this sort of 'hidden' in the options. I hesitate to suggest an expansion of the Guide, given that elsewhere it's been said that it's already very long, but a comprehensive web reference to every option beyond the man-page style --help messages could be useful. Especially if people are now being shied away from the command line at all ...
>
> --
> 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/521e155d-6c26-4d70-a4d0-e40a718459acn%40googlegroups.com.

Rob Beezer

unread,
Mar 6, 2023, 1:40:54 PM3/6/23
to prete...@googlegroups.com
An author controls the preview.

A fixed attribute value yields the play button.

A file of your own can be the preview.

A thumbnail is generated iff you don't have the necessary attribute.

Oscar Levin

unread,
Mar 6, 2023, 8:31:13 PM3/6/23
to prete...@googlegroups.com
So again I guess I don't understand what the correct workflow should be.  From the CLI standpoint, we can build your specified source into a specified output format.  If you have elements in your source that require additional processing, then you can use generate to process those items.  We have some support for producing fewer or more output format of generated assets.  But which asset output format is used should never be decided at the CLI level.  That is either an author or publisher decision, so should be specified in your source or in the publication file.

Right now, pretext generate youtube will create previews and the play button PNG.  Which thing does the build process put in your latex?  No idea.

Steven Clontz

unread,
Mar 6, 2023, 8:41:37 PM3/6/23
to prete...@googlegroups.com
I think it's somewhat reasonable to put play-button.png in the right place for every build with a video, and not require a generate. For example, is the play-button used for non-YouTube videos?

Rob Beezer

unread,
Mar 6, 2023, 10:01:07 PM3/6/23
to prete...@googlegroups.com
On 3/6/23 17:41, Steven Clontz wrote:
> For example, is the
> play-button used for non-YouTube videos?

Yes, the "generic" preview image (that is what it is) is "play-button.png". It
can be used on *any* video.

video/@preview="generic"

It was requested as a fig leaf for music videos whose default previews were too
racy.

Rob

Oscar Levin

unread,
Mar 6, 2023, 10:27:52 PM3/6/23
to prete...@googlegroups.com
The play-button will be generated whenever you run pretext generate or pretext generate youtube.  

My next project is to add some checking for required components that should be generated or else the build will fail, and generate those automatically, which will mean anytime you have source that needs play-button, you will get it.  But this will take a little longer.

--
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.

kcri...@gmail.com

unread,
Mar 7, 2023, 12:36:46 PM3/7/23
to PreTeXt development
Right now, pretext generate youtube will create previews and the play button PNG.  Which thing does the build process put in your latex?  No idea.


According to Subsection 4.29.1: Video Element it puts the preview in unless you specify generic or provide a path to a specific file.

On a related note, there are a few small bugs I'd like to look at in this, but it's a pretty tangled web to figure out what happens with which xsl file where.    Most of it seems to be in pretext-common.xsl but other stuff related to YouTube is in various other extract or assembly places.  Anyone know where the "YouTube:" gets added to the LaTeX file, before the URL under the screen grab? 
Reply all
Reply to author
Forward
0 new messages