Trac figure macro

Trac figure macro
Login

Trac figure macro

Note: This is an obsolete and long abandoned project!

This is a very simple plugin for Trac which allows you to include figures in your wiki pages, in the spirit of MoinMoin. Three macros are provided:

Figures are created like this (see WikiMacros for more information on the [Image] macro):

Some normal text...

{{{
#!SomeFigure
[[Image(something...)]]

Any wiki-formatted caption text...
}}}

Some normal text...

This macro is inspired by the NewsFlashMacro by coderanger, and it is released under the public domain. It works under Trac 0.10 and (from version 0.2.0 on) under 0.11 as well.

Downloading the plugin

You may find the source of the released versions of this plugin at the tag list, or you may clone its Fossil repository at https://elvil.net/fossil/trac-figure.

Installing and enabling the macro

To install the macro plugin, follow the instructions in TracPlugins (i.e. easy_install or drop the egg in your plugins directory), include the following lines in your TracIni and restart if necessary:

[components]
figure.* = enabled

Examples

The Figure macro

{{{
#!Figure
[[Image(martian_hand.jpeg)]]

A Martian hand seizes the Earth (or was it an aubergine?).
}}}

The LeftFigure macro

{{{
#!LeftFigure
[[Image(martian_hand.jpeg)]]

A Martian hand seizes the Earth (or was it an aubergine?).
}}}

The RightFigure macro

{{{
#!RightFigure
[[Image(martian_hand.jpeg)]]

A Martian hand seizes the Earth (or was it an aubergine?).
}}}

Ivan Vilata i Balaguer