[pmwiki-users] TextFormatting: [+ big +] vs. '+ big +'

Patrick R. Michaud pmichaud at pobox.com
Fri Jun 23 11:49:33 CDT 2006

On Fri, Jun 23, 2006 at 08:34:11AM +0100, Marc Cooper wrote:
> Unrelated, but I'd like an option to be added to the [+big+], [-small-] 
> markup to allow the scale to be changed. Currently I override it, but 
> allowing it to be customized in the PmWIki-way would be better, imo.

Currently PmWiki scales [+...+] and [-...-] so that each larger text
size is 1.2 times larger than the previous size.  (The value of 1.2 is
suggested by CSS2.)

One can redefine the [+...+] and [-...-] markups to use any scaling
factor desired (or look up scale values from a table, or any other
desired approach).  For example, to make each larger text size
1.1 times larger than the previous size, use the following in

    ## [+big+], [-small-]
      "'<span style=\'font-size:'.(round(pow(1.1,$2strlen('$1'))*100,0)).'%\'>'.

(Note that 11/10 is 1.1 -- I use the fractional value here because it ends up
being slightly more precise in floating point than typing "1.1".)


More information about the pmwiki-users mailing list