pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Make `brandlogo@source` act the same as `image@source` (or vice versa)

Open StevenClontz opened this issue 4 years ago • 3 comments

It seems that brandlogo's source attribute looks for external/images/SOURCEURL, but image's source attribute looks for external/SOURCEURL.

StevenClontz avatar Feb 18 '22 21:02 StevenClontz

Can you explain "seems'? ;-) Sample article has a book-cover-... file that shows up just fine. Code looks good to me, at least in the managed directories case. But I think old-style as well. Where are you seeing this?

https://github.com/rbeezer/mathbook/blob/311fea0493adb096289efc668a1056584dccb401/xsl/pretext-html.xsl#L12314-L12334

rbeezer avatar Feb 20 '22 04:02 rbeezer

Sample article has:

<brandlogo ... source="misc/book-cover-google-art-project.jpg" />

and later on it has:

<image ... source="images/cubic-function.png">

And in output here: https://pretextbook.org/examples/sample-article/html/section-5.html

it looks for:

<img src="external/misc/book-cover-google-art-project.jpg" ...>

and

<img src="external/images/cubic-function.png" ...>

So at least here, it looks like the two things are in sync. Is there maybe a specific production method where they are out of sync? Like with or without a publisher file? With versus without managed images?

Alex-Jordan avatar Feb 20 '22 06:02 Alex-Jordan

Okay, yeah, if this is a bug, it's subtle. I can confirm that with a fresh pretext new book, using <image source="frog.jpg"/> and <brandlogo source="frog.jpg"/> match up:

  • https://github.com/StevenClontz/crispy-palm-tree/tree/main/assets
  • https://github.com/StevenClontz/crispy-palm-tree/blob/main/source/docinfo.ptx#L40
  • https://github.com/StevenClontz/crispy-palm-tree/blob/main/source/ch_pretext-features.ptx#L44
  • https://stevenclontz.github.io/crispy-palm-tree/sec_ptxfeat-blocks.html#p-35

@sean-fitzpatrick can you share the work-in-progress where we found this issue?

StevenClontz avatar Feb 21 '22 20:02 StevenClontz