← Back to team overview

zim-wiki team mailing list archive

Re: html export template: center images


Hi Ramiro,

Could you do this by making two changes?. It would mean all images would be

In /usr/share/zim/Templates/Default.html add a CSS statement

                  img.center { display: block; margin-left: auto;
margin-right: auto; }

and then in /usr/share/pyshred/zim/formats/html.py add class="center" the
string used for translating the element tag for an image to html <img ... />

                  output.append('<img src="%s"* class="center"* alt="%s"%s>'
% (src, text, opt))

Providing control over where individual images should be placed is
considerably more complicated.


On Fri, Dec 3, 2010 at 2:55 PM, Ramiro Magno <ramiro.magno@xxxxxxxxx> wrote:

> Hi
> is there a way of editing an html template such that all images get
> automatically centered?
> Thanks
> Ramiro
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki<https://launchpad.net/%7Ezim-wiki>
> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki<https://launchpad.net/%7Ezim-wiki>
> More help   : https://help.launchpad.net/ListHelp

Bill Oldroyd
Technical consultant for The European Library

Follow ups