Forum How do I...?

[Bug?] Figures repeated in 2 column format

neeraavi
Trying to convert an article from wikipedia using this command:

prince --no-author-style -s http://www.princexml.com/howcome/2008/wikipedia/wiki2.css http://en.wikipedia.org/wiki/Evolutionary_history_of_life -o a.pdf

Some of the figures appear two times instead of one.

For example,the following pictures are repeated twice instead of once.
Cross-section through a liposome.
Phanerozoic biodiversity as shown by the fossil record.

Now, if you modify the css to one column format, then some of the pictures are missing.
I think this is definitely a bug !
howcome
The figures appear twice in the markup, but one of the them have 'visibility: hidden' set. Prince disregards the author styles (as it is targeted to one-column screen presentations) and will therefore show the figure twice. The fix is quite simple, though:

[style="visibility:hidden"] { display: none }

I've added it to the style sheet here:

http://www.princexml.com/howcome/2010/wikipedia/wiki2-table-detect.css

The style sheet must be considered to be a proof-of-concept. Wikipedia's markup is a moving target and an external style sheet must therefore be updated regularly to keep track. The quality of the markup seems to deteriorate, too: the number of style attributes increase (bad) while the use of the class attribute goes down (also bad). Here are some notes:

http://www.princexml.com/howcome/2009/wikipedia/

-h&kon