readme.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Summary
  2. ===========
  3. This plug-in finds any `div class="figures"` tags in the output, finds the image contained inside each one,
  4. then checks the dimensions of the image file and adds the appropriate style="width: ???px;" to both the img tag
  5. and it's containing div.figure tag.
  6. Assuming that the image is 250px wide, it turns output like this:
  7. <div class="figure" style="width: 250px;">
  8. <img style="width: 250px;" alt="map to buried treasure" src="/static/images/image.jpg" />
  9. <p class="caption">
  10. This is the caption of the figure.
  11. </p>
  12. <div class="legend">
  13. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  14. tempor incididunt ut labore et dolore magna aliqua.
  15. </div>
  16. </div>
  17. into output like this:
  18. <div class="figure" style="width: 250px;">
  19. <img style="width: 250px;" alt="map to buried treasure" src="/static/images/image.jpg" />
  20. <p class="caption">
  21. This is the caption of the figure.
  22. </p>
  23. <div class="legend">
  24. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  25. tempor incididunt ut labore et dolore magna aliqua.
  26. </div>
  27. </div>
  28. TODO: Currently only does the first figure, not all of them