[pmwiki-users] Re: New feature proposal - need help with markup selection

chr at home.se chr at home.se
Wed Mar 16 08:09:36 CST 2005


On Wed, 16 Mar 2005, Joachim Durchholz wrote:

> I propose two extensions with a very useful synergy: substitutions, and 
> repeat groups.
> 
> 
> Substitutions are supposed to work as follows:
> * Writers insert markup that assigns a value to a symbol.
> * Writers use the symbol in other places of the page. When rendering, 
> PmWiki substitutes the values for the symbols.

Just so you know, this can partially be implemented using (:include:),
e.g.  like this:

	Bla bla lba.. (:include {$Name}#par:) bla bla...

	(:if false:)
	[[#par]]This paragraph can be included many times...
	(:ifend:)

Although I'm not sure (:include:) supports including from the same page
yet (it will sometime though).

> * It can be used to decouple table layout from table contents, like this:
> 
> || &TH1  || &TH2  ||
> || &TD1a || &TD2a ||
> || &TD1b || &TD2b ||

That's a nice idea.. I've often been annoyed when trying to make tables 
with lots of text in one of the cells.. A drawback with using (:include:) 
there is that "(:include {$Name}#par:)" is a bit too big... &par is much 
shorter..

> &TD1a = This is a very lengthy text that goes into the very first table 

You migh consider doing the definition of the macro as say:

	(:defmacro TD1a:) [=This is a very lengthy text that goes into the 
second cell of the first line.=]

I'm skipping the rest... trying to keep my posts short :-)

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list