PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
264 stars 208 forks source link

add support for background images in slideshows #1434

Open kcrisman opened 3 years ago

kcrisman commented 3 years ago

Both beamer and revealjs support background images for slideshows. Currently for the revealjs I have a clunky workaround just in the revealjs conversion frontmatter

     <xsl:choose>
         <xsl:when test="($reveal-navigation-mode = 'default') or ($reveal-navigation-mod
e = 'grid')">
             <section>
+            <xsl:attribute name="data-background-image">
+              <xsl:text>images/BG-blue.png</xsl:text>
+            </xsl:attribute>
                 <section>
                     <h1>

and similarly for the slides themselves. But this could be a publisher option pretty easily, as the publisher-variables file already has some support for slideshows.

Whether this would be on the author/publisher's head if the image size or other attributes were not appropriate for use in the given conversion is something I'm agnostic about. This is probably a long-term "wishlist" issue, though I think I see where it would have to happen and how to do it, in principle; anyway, consider this a placeholder for now.

rbeezer commented 3 years ago

Shortly, I will push an update for reveal.js at #1605. Then I believe @Alex-Jordan wants to add this feature. It was discussed somewhere else recently, as well.

rbeezer commented 3 years ago

@Alex-Jordan - if you work on this, I'd like to begin with static images, so we preserve the ability to make Beamer slideshows.