pretext icon indicating copy to clipboard operation
pretext copied to clipboard

revealjs images should use visible-id

Open kcrisman opened this issue 4 years ago • 3 comments

Currently, as far as I understand the code, revealjs conversion requires a source attribute for images. That is not the PTX way (though I definitely understand it is still somewhat experimental, and @StevenClontz and friends have done something very impressive thus far if I can even try to use it!).

As is done throughout the html conversion, the visible-id variable should be used. This provides a nice way to deal with it that is already used in PTX elsewhere, and comes from the pretext-common stylesheet. I don't know if exactly the same code as in the html can be used, but at least it should provide a guidepost.


Example. In typical PTX code, the following will give a nice name in the pretext/pretext script:

      <image xml:id="test-figure">

In fact you don't even need that, but let's say it makes things a bit easier.

Instead, here we need the quite redundant

      <image xml:id="test-figure" source="images/test-figure.svg">

(or we have to already have generated the image). If you don't even have an xml:id (a pretty reasonable expectation for when people are just starting a project), it's even worse - I know, because I tried. In any case, what is currently needed to use the pretext/pretext script and the revealjs conversion is going to be pretty tedious for any nontrivial project.

kcrisman avatar Jan 21 '21 13:01 kcrisman

Is this obsoleted by #2156 ? It looks like that defaults to the html template now (though I don't understand <xsl:apply-imports/> very well).

kcrisman avatar Jul 19 '24 14:07 kcrisman

The apply-imports tells reveal.js to insert the existing HTML template. Which is good, because visible-id has already been replaced by unique-id! This should ensure that any time the id name changes 'upstream', it flows through to the slides.

So in short, "yes", I think.

sean-fitzpatrick avatar Jul 19 '24 17:07 sean-fitzpatrick

Okay, then Rob or someone can close this.

kcrisman avatar Jul 19 '24 18:07 kcrisman