Re: [Zim-wiki] html export template: center images

2010-12-04 Thread Ramiro Magno
Thank you both. Both are nice working solutions.

Cheers
Ramiro


On 4 December 2010 23:35, Bill Oldroyd  wrote:
> Hi Ramiro,
>
> Could you do this by making two changes?. It would mean all images would be
> centred.
>
> 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 
> :
>
>   output.append('' %
> (src, text, opt))
>
> Providing control over where individual images should be placed is
> considerably more complicated.
>
> Bill
>
> On Fri, Dec 3, 2010 at 2:55 PM, Ramiro Magno  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
>> Post to     : zim-wiki@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp
>
>
>
> --
> Bill Oldroyd
> Technical consultant for The European Library
>

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] html export template: center images

2010-12-04 Thread Bill Oldroyd
Hi Ramiro,

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

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 
:

  output.append(''
% (src, text, opt))

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

Bill

On Fri, Dec 3, 2010 at 2:55 PM, Ramiro Magno  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
> Post to : zim-wiki@lists.launchpad.net
> Unsubscribe : 
> https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>



-- 
Bill Oldroyd
Technical consultant for The European Library
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] html export template: center images

2010-12-03 Thread Ramiro Magno
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
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp