Recent Changes · Search:

Support the Project



edit SideBar


This recipe lets people upload scalable vector graphics images that take advantage of the capabilities of modern web browsers.

The problem is that the Wikibook PDF server and LATEX cannot handle svg images directly. Currently, authors also need to provide a version of the image in PDF that Wikipublisher can pass to the Wikibook server.

The solution is to create a markup rule that makes it easy to upload both svg and pdf versions of an image. We also need to make sure that regular links to pdf files are not mis-interpreted as images.

svg.php Δ provides a solution. It recognises markup of the form:

    Attach:image-name.svg | Text of image caption

In HTML, the image caption becomes a link to a file called image-name.pdf. In PDF, it uses the pdf file as the source for the image.

To use the recipe, put the script in the cookbook/ directory and add the following to local/config.php, after loading the wikipublisher extensions:


This recipe modifies the Cookbook:Svg script. In future, it may be feasible to convert the svg file into pdf on the Wikibook server. However, at the moment, the ImageMagick convert command only has limited svg support.

Contributors: John Rankin and Markus Heinzer?, Sunday, 21 March 2010.

« Show Attach Links as Footnotes | Cookbook | Typeset a Page List »

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 21 March 2010 at 07:53 PM