[Pmwiki-users] Re: include part of a page syntax, revisited

Christian Ridderström chr
Wed Jun 16 02:27:40 CDT 2004


On Tue, 15 Jun 2004, Patrick R. Michaud wrote:

> I'd like to revisit a discussion we held previously about potential
> syntaxes for including parts of other pages.  The current syntax is
> 
>     [[include:PageName#start#end]]
> 

> I'd like to extend this markup somehow to be able to support including a
> portion of a page starting from any anchor to include the remainder of
> the page or the next N lines, paragraphs (delimited by blank lines) or
> anchors.  For orthogonality's sake it might be nice to be able to
> include N lines/paragraphs/anchors before an ending anchor, but I
> haven't come up with any real uses for this so it won't hurt if it's not
> supported.

I actually very recently (yesterday) needed to include several lines after
an anchor (right now only the line with the anchor was included). My
conclusion about using the current syntax:

* Using [[include:Tests#speed-desc-begin#speed-desc-end]] was to 
  complicate because the anchors become long and you need two of them.

* It would have been very nice if [[include:Tests#speed-desc]] would have 
  included the entire paragraph instead of a single line. With paragraph I 
  here mean until there's an blank line.

What I wanted to accomplish was to use wiki pages to document various 
tests of the hardware that I'm working with. A group of tests could be 
described together with its results on a page. What I wanted to achieve 
was a summary page, where I preferably could write something like:

	[[include:SpeedTest#test1-desc-and-status]]
	[[include:SpeedTest#test2-desc-and-status]]

which would include:
* A link to the test (i.e. where it's described and the results are)
* A quick description of what the test does
* A short summary of the resulst

Right now I'd have to write everything on a single line which gets a bit 
too much. What I'd really like is if each test description could look like 
this:

	[[table]]				
	[[cellnr]]Link				
	[[cell]]Brief description
	[[cell]]Status summary

	[[cellnr]][[#test1-desc-and-status]]
	SpeedTest#test1-desc-and-status
	[[cell]]Testing minimum speed of axes.
	[[cell]]Maximum speed is 10 m/s

	[[tableend]]

where the description is done as a table. Before the anchor there's a few
lines that gives each column in the table a title. Then you have the 
anchor and the actual description. Finally, after a blank line, you have 
the end of the table.

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list