Open rbeezer opened 6 months ago
Check the template matching image and condition on the existence of a generated directory. Good chance there maybe other similar failures to respect aspects of the publication file.
Commenting to see updates, as I'm still interested in modernizing some of the slideshow stuff (on the js side, at least). (I haven't been using generated or CLI on that project yet, for what it's worth, but I'm hoping to upgrade that before Spring 2025, the next time I teach that course.)
Message ID: @.***>
Sounds like #2156 addresses this, correct?
I just checked a slideshow that I have.
Images are in the assets
directory, and I have
<directories external="../assets" generated="../generated-assets"/>
within the source
section of my publication file.
Including an image with <image source="foo.svg"/>
works as expected. (This was not the case when I wrote the slides last fall.)
However, width attributes (either on the image
element or on an enclosing sidebyside
) are not respected.
However, width attributes (either on the
image
element or on an enclosingsidebyside
) are not respected.
I certainly expect this on the image element, I have some hacked code that solves that problem which I'd like to contribute after helping with #2159. I never had problems with sidebyside
so I'd have to check that out.
Including an image with
<image source="foo.svg"/>
works as expected. (This was not the case when I wrote the slides last fall.)
Weirdly, this works for my complex slides too, but not when I mess with the sample slideshow - ?!?
Including an image with
<image source="foo.svg"/>
works as expected. (This was not the case when I wrote the slides last fall.)Weirdly, this works for my complex slides too, but not when I mess with the sample slideshow - ?!?
I should point out that I am NOT using the CLI for the sample slideshow yet (that would be, as #2159 points out. another level of difficulty). The publisher file is being recognized (as I can tell from changing other entries) - any ideas on an extra step I might need to take, something with the pretext
script? That's been alluded to various times recently.
No, I figured it out. It's weird. Instead of using
it's using
which defaults to external
(intentionally hard-coded!) for backwards compatibility. I just posted to -dev about this.
However, width attributes (either on the
image
element or on an enclosingsidebyside
) are not respected.I certainly expect this on the image element, I have some hacked code that solves that problem which I'd like to contribute after helping with #2159. I never had problems with
sidebyside
so I'd have to check that out.
Yeah, I have code like <sidebyside widths="60% 20%">
and it definitely behaves as expected. Is there something different you're doing there?
If you use the CLI, images are copied over where you expect them to be.
I have a slide with:
<sidebyside widths="45% 45%>
<image source="foo.svg"/>
<p>Some text</p>
</sidebyside>
and the image only takes up about 30% of the first SBS panel. If I edit the HTML file to add width="100%"
to the image element, it scales to fill the panel.
Probably if you use .jpg
or .png
, you get the native size of the image (or it scales down?)
Does your sidebyside
behave as expected because you are using the hacked code you mention?
Probably? I can't check now, unfortunately.
On Fri, Jul 19, 2024, 14:31 Sean Fitzpatrick @.***> wrote:
Does your sidebyside behave as expected because you are using the hacked code you mention?
— Reply to this email directly, view it on GitHub https://github.com/PreTeXtBook/pretext/issues/2155#issuecomment-2239877694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRQ4BMVC4IHJLPLY3RH53ZNFLOVAVCNFSM6AAAAABGP2BTHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZHA3TONRZGQ . You are receiving this because you commented.Message ID: @.***>
Probably? I can't check now, unfortunately.
See my woeful guess at https://github.com/PreTeXtBook/pretext/issues/2159#issuecomment-2240675420
Check the template matching
image
and condition on the existence of agenerated
directory. Good chance there maybe other similar failures to respect aspects of the publication file.Obsoletes: https://github.com/PreTeXtBook/pretext-cli/issues/717