Last modified: 2012-02-29 09:48:04 UTC
Created attachment 8583 [details] Example of ignored tag in PDFs Would love to have it so if a PDF is generated, the syntax highlighting is shown in the document as it appears on the wiki page. Currently, the formatting isn't shown and the wiki tag can be seen (which is not very helpful). Is there any way to have it so the highlighting works within a generated PDF? Would be very helpful if possible.
The extension used to generate the PDF's can be found here (in case you need it): http://www.mediawiki.org/wiki/Extension:Collection
This probably should be moved under collection, unless the plugin is supposed to do something for the printable version, but doesn't. Looking at http://en.wikipedia.org/w/index.php?title=User:Reedy/Test&printable=yes at the moment, it looks fine I used <source></source> and it generated a PDF that looks fine.. http://en.wikipedia.org/w/index.php?title=Special:Book&bookcmd=download&collection_id=00598fd294bdb2b3&writer=rl&return_to=User%3AReedy%2FTest It seems to be <syntaxhighlight></syntaxhighlight> isn't supported, but <source></source> is
link gives "Internal Server Error"
Thank you for the feedback Reedy. Your quick response is appreciated. It appears that you are right in that the <source> tag will work for PDFs, however the <syntaxhiglight> tag will not. I will try and use this tag instead and should I have anymore issues, I will open a bug for the collection extension. I'll mark this as resolved.
Reopening: I'm glad there's a workaround for this, but I think the extension nonetheless needs to be changed to support <syntaxhighlight>.
The syntaxhighlight tag will now be treated exactly like a source tag. https://github.com/pediapress/mwlib/commit/571c2059cd8b9eb757740063e3d6cfd4a2b55580 Note that the wikipedia renderservers haven't been updated yet.