Assistance in resolving this would be greatly appreciated, as putting code in our PDF’s is one of our must-have features. See an example here: http://wikiserver.eeinternet.com/Main/WikiPublisherBeautiferGlitches
In general, PmWiki recipes that follow PmWiki coding conventions will play with Wikipublisher. This means recipes that emit either wiki markup or define variables for every HTML tag used. The general solution is to map the recipe output to the corresponding wikibook xml tags. The solution lies in the recipe, rather than in Wikipublisher. Unfortunately, while PmWiki itself is “markup agnostic”, many recipes are not. See Markups.
As I did spend some time finding a solution, here is my proposal to save your time ;) ## Sourceblock markup function Latex Text Code?($args, $text) { $text = preg_replace(“/\n[^\\S\n]*$/”, “\n”, $text); $opt = Parse Args?($args); if(@$opt[‘lang’]) { return “<tbook:verbatim class=‘$opt[lang]’>”.Keep($text).”</tbook:verbatim>”; } else { return “<tbook:verbatim>”.Keep($text).”</tbook:verbatim>”; } } Markup(‘sourceblock’, ‘>markupend’, “/\\(:source(\\s+.*?)?\\s*:\\)[^\\S\n]*\\[([=@])(.*?)\\2\\]/sei”, “Latex Text Code?(PSS(‘$1’), PSS(‘$3’))”); Markup(‘sourceblockend’, ‘>sourceblock’, “/\\(:source(\\s+.*?)?\\s*:\\)[^\\S\n]*\n(.*?)\\(:sourcee?nd:\\)/sei”, “Latex Text Code?(PSS(‘$1’), PSS(‘$2’))”); ## End of sourceblock markup I hope that’s of some use ;)
|