PDF caption display

Context: Pressbooks.com - PDF export
Theme: McLuhan

Issue is that PDF places caption on upper right of image rather than below the image in web view, as per PDF example:
PDF-CAPTION

Please advise,

Sounds odd; haven’t seen before. The image you provided doesn’t give us much to go on. Including the underlying HTML or a link to webbook where this is occurring would be helpful in helping others understand and troubleshoot.

Although still in development, the following example is public:

https://sherrimelrosepublications.pressbooks.com/

Help yourself.
Cheers,
Steve

Quick glance – looks like this image has had ‘align-none’ selected/applied to it and that this may be producing the oddities in the PDF export. If you choose a different alignment choice what happens to the export? If its related to align-none that sounds like a bug to be filed – would probably belong in the McLuhan repo: https://github.com/pressbooks/pressbooks-book/issues

I followed your idea on alignment with Image Details > Display Settings > Align > Left

The result was correct placement of the caption in PDF. Hence, is there a CSS trick as a workaround to apply left align to all images?

I am assuming not so I went with search and replace of align=“alignnone” with align=“alignleft” .

thanks,
Steve

However, the PDF result is worse than “alignnone” except when the image/caption is in a table cell. The following example is what happens when using “alignleft” in PDF:
PDF test

Hence, “alignnone” is a poor display of caption but image placement is really messed up when other alignments are used. Is that a bug in McLuhan?

Yes, I suspect there’s an alignnone caption display bug in PDF exports. Should be reported to the Pressbooks-book repo. It sounds like you think there may also be an align-left/right bug in PDF exports when images are placed inside of textboxes. We generally ask folks to do a quick search/check of existing issues in a GitHub repo and then file bugs using the template provided in each repo. For example https://github.com/pressbooks/pressbooks-book/issues/new

Only “alignnone caption display bug in PDF exports.”
I have no idea about images in tables except that it works, but will not be recreating the entire site with images in tables :wink:

As you wish, I will file a report if it hasn’t already been done for McLuhan.

Cheers,
S.