[Pmwiki-users] More on attachments

John Rankin john.rankin at affinity.co.nz
Wed Nov 20 15:11:07 CST 2002

I'd like to put forward a different approach for consideration. Is there a =
way of separating wiki-markup from its presentation? Using the %% idea to =
illustrate the principle, suppose I write:

%booktitle%A Tale of Two Cities%%

Now imagine a style page (could be wiki-wide or group specific, for =
argument's sake let's assume it's group-specific) called by convention =

I type %%booktitle at the start of a line and Save. Clicking on the =
booktitle? link takes me to a form where I choose attributes for booktitle.=
 When I save, booktitle is rendered according to the attributes selected. =
When I look at A Tale of Two Cities, it displays with those attributes.

I can see several benefits coming from this approach:
- consistency across pages -- authors don't have to remember what the =
presentation convention is (or know what HTML attributes are), we just go =
to the GroupStyles page to see what's available (and we can add to them)
- ease of maintenance -- we can change presentation convention in one =
place and all pages using that convention will change
- more interesting searches -- could I type %booktitle% in a search box =
and get all pages that refer to books?? how about searching for %=

I can see problems:
- which attributes are valid where (as was pointed out earlier in this =
- harder to learn, maybe
- teaching authors to use names that describe purpose rather than look (%=
green% that renders red)

Summary: %semanticmarkup% + wikistylepage =3D greater control and more =
John Rankin
john.rankin at affinity.co.nz

On Wednesday, 20 November 2002 12:38 PM, Patrick R. Michaud <pmichaud at sci.=
tamucc.edu> wrote:
> I don't know if this [use of {{..}}] goes against the pmwiki philosophy,=20
> but I think it should be considered.

I'm definitely considering it.  But I don't know that I like introducing=20
the double braces--I think the markup just starts to look too ugly with
too many symbols in there, and ugly syntax scares away authors.  Something
about =20
   {{color=3Dgreen class=3Dsuperlinks [[http://www.pmichaud.com/toast Pop-=
makes my eyes and skin crawl.

On the other hand, if someone wanted to have an entire paragraph in a
particular font, that would definitely argue in favor of the braces,
since double-brackets probably won't nest.

I'm going to want to think long and hard about this one before committing
to anything.  All suggestions, comments and ideas will be *greatly*=20

Here's another idea, borrowing slightly from the Twiki syntax.  We could
use double-% for defining sets of attributes that should be included
in the enclosed text up to the next double-%.  An empty %% or the end of
the line would mark the end of the attribute span.  Examples of the wiki
markup and possible HTML output:

   %color=3Dgreen% This text is green %%
	<span color=3Dgreen>This text is green</span>

   %color=3Dgreen% http://www.w3c.org is green %%
	<span color=3Dgreen><a href=3Dhttp://www.w3c.org>http://www.w3c.org</a>
          is green </span>

   %color=3Dgreen% green %target=3D% http://www.w3c.org is not green %%
        <span color=3Dgreen>green</span>
        <a href=3Dhttp://www.w3c.org target=3D_blank>http://www.w3c.org</a>=

  	  is not green

   %color=3Dgreen% green %target=3D color=3Dgreen% http://www.w3c.org is =
green %%
	<span color=3Dgreen>green</span>
	<span color=3Dgreen><a href=3Dhttp://www.w3c.org target=3D_blank>
          http://www.w3c.org</a> is green</span>

   %color=3Dgreen% [[http://www.w3c.org]] %%
	<span color=3Dgreen><a href=3Dhttp://www.w3c.org>[1]</a></span>


I kinda like the double-% because it makes it clear what is and is not
considered an attribute.  I kinda dislike the double-% because it's hard
to see what range of text the attribute spans.  I kinda like the
double-% because turning an entire paragraph into a different color
is simply a matter of placing %color=3Dgreen% at the beginning of the

This all just goes to show how difficult it is to create good markup.  :-)


Pmwiki-users mailing list
Pmwiki-users at pmichaud.com

More information about the pmwiki-users mailing list