pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Guide: change xml:id to label for generated images

Open sean-fitzpatrick opened this issue 7 months ago • 4 comments

The section on images in the guide does not reflect the change that was made from using xml:id on the <image> element to using a label on the tag indicating the type of generated image.

  • I was not 100% sure that this change affected sageplot and mermaid as well, but I guessed it was unlikely that we'd be inconsistent on this
  • The use of <description> (without a <p>) to provide the alt text is supported but doesn't match the instructions at the top of the page. I wondered if these should be changed to <shortdescription>.

sean-fitzpatrick avatar Jun 10 '25 21:06 sean-fitzpatrick

Thanks, @sean-fitzpatrick! Just back from being off-duty.

  • "top of the page" - where exactly?
  • Mermaid images are not being handled correctly. I may post on -dev. So this part will have to wait, I guess.
  • There is an xref to rna-codons-figure, which has moved off an @xml:id. Likely the @xml:id needs to be on figure (and should use a different string/value) and then the label can be used on the latex-image and the existing image files will be OK.

rbeezer avatar Jun 15 '25 17:06 rbeezer

It looks like I was too enthusiastic about moving xml:ids and took one off of figure as well as image.

Not near a computer today but I'll get a fix in tomorrow. I don't think I trust myself to attempt it on a phone.

"Top of the page" means the beginning of this section.

sean-fitzpatrick avatar Jun 15 '25 17:06 sean-fitzpatrick

I put the xml:id back on the figure. Apoligies for the over-zealous removal! It looks like it wasn't included in the example code on line 2651. I put it there as well for consistency.

sean-fitzpatrick avatar Jun 16 '25 15:06 sean-fitzpatrick

In anticipation of #2560 I've left my changes in place for the mermaid instructions, but I can adjust those if it turns out we can't make mermaid work the same as the other formats.

sean-fitzpatrick avatar Jun 16 '25 15:06 sean-fitzpatrick

I'm closing this, because I forgot to create a new branch for it, which means I can't do a clean pull request for a different issue. I'll make a new PR on a branch, once I get my copy of master reset.

sean-fitzpatrick avatar Jun 26 '25 12:06 sean-fitzpatrick