macmillanpublishers / htmlmaker_js

Repo for testing and finalizing htmlmaker javascript implementation
0 stars 1 forks source link

Wrap illustration paras in figure #6

Closed nelliemckesson closed 7 years ago

nelliemckesson commented 7 years ago

Illustration paragraphs should be wrapped in a figure. This should happen in htmltohtmlbook.js. There are multiple pieces to this: you'll need to select any of the illustration paragraphs (caption, illustration holder, source), and wrap them in a figure container, and then convert the actual illustration holder to an img tag containing the image filename. The figure parent will also need a unique id that must be the first attribute in the element. For example:

<figure id="d1e24847" class="Illustrationholderill">
  <img src="images/Nnedi Okorafor.jpg" alt="Nnedi Okorafor.jpg"/>
  <p class="IllustrationSourceis">Photograph by Anyaugo Okorafor-Mbachu</p>
</figure>

See the following locations in the XSL for the old handling:

https://github.com/macmillanpublishers/bookmaker/blob/master/core/htmlmaker/wordtohtml.xsl#L148 https://github.com/macmillanpublishers/bookmaker/blob/master/core/htmlmaker/wordtohtml.xsl#L563

nelliemckesson commented 7 years ago

Done and tested