Subset of #2, pandoc has output some rather verbose snippets for images. e.g. from BOSC_2014.mediawiki as on https://open-bio.org/wiki/BOSC_2014 we had: ``` [[Image:Eagle_logo_2013.jpg|120px|left|Eagle Genomics logo|link=http://www.eaglegenomics.com/]] ``` This showed the image without a caption below it, clickable, with tool tip "Eagle Genomics logo". After pandoc in https://github.com/OBF/wiki/edit/main/BOSC_2014.md we currently have: ```html <figure> <img src="Eagle_logo_2013.jpg" title="Eagle Genomics logo|link=http://www.eaglegenomics.com/" width="120" /> <figcaption>Eagle Genomics logo|link=<a href="http://www.eaglegenomics.com/">http://www.eaglegenomics.com/</a></figcaption> </figure> ``` Sometimes the caption is appropriate, but generally I'd want just something like this: ```html <a href="http://www.eaglegenomics.com/"> <img src="Eagle_logo_2013.jpg" title="Eagle Genomics logo" alt="[Logo]" width="120" /> </a> ``` Can we tweak pandoc's settings? Can we adjust the MediaWiki before calling pandoc? Or must we post-process the Markdown?
Activity
peterjc commentedon Feb 8, 2024
See https://www.mediawiki.org/wiki/Help:Images which suggests the caption should be last, not the link option.
peterjc commentedon Feb 8, 2024
Confirmed - our MediaWiki version is not following the documented order, if we change it then pandoc does more like what I want:
Currently:
It would appear the the MediaWiki software is more tolerant that their documentation.
Ensure image caption is after image options
peterjc commentedon Feb 8, 2024
LargelyPartly fixed via 1f820ae and preceeding commit, i.e. tweaked the mediawiki before calling pandoc.Now https://obf.github.io/wiki/BOSC_2014 looks much better, but still has:
In this page (and probably the other sponsor logos) we can drop the
<figcaption>Eagle Genomics logo</figcaption>line?peterjc commentedon Feb 8, 2024
Logged jgm/pandoc#9432 about Pandoc not capturing the image URL.
Remove <figure> and <figcaption>
peterjc commentedon Feb 9, 2024
I've tried tweaking the MediaWiki, e.g. we have examples like this:
If we change it for external links to this:
So that ought to work, but it seems a side effect was pandoc stopped using HTML for the logo placement tables, and the new tables didn't work.
Post-processing the markdown is probably our best bet - unless an unpaded pandoc works better.
peterjc commentedon Feb 9, 2024
OK, now we just need to recover and insert the image links - not actually that many as many are repeat sponsor logos.
Missed some URLs on sponsor logos