[Pmwiki-users] Re: right and center alignment

Christian Ridderström chr
Sun Feb 8 13:30:56 CST 2004


On Sat, 7 Feb 2004, John Feezell wrote:

> On Sat, 7 Feb 2004 17:28:36 -0700, Patrick R. Michaud <pmichaud at pobox.com> 
> wrote:
> 
> > Anyone have proposed markups for right-justified and center-justified
> > paragraphs?  John Rankin has been using a leading '>' to indicate
> > right-alignment but has expressed that he's not very happy with it.
> > I'd like to see if we can come up with a good markup for this.
> >
> > In PmWiki 0.6-beta I've been using '->' to indicate indented text
> > (and other sites have been doing similar things), so it's probably
> > not a good choice for this.
> >
> > In some sense we could do best by introducing it as a WikiStyle
> > (%align=right%, %align=center%)--anyone in favor of that?

I'm positive to this approach.

How about introducing

	%style=par-right%
and
	%style=par-center%
where 'par-right' and 'par-center' the names of two CSS styles? (The user 
can just think of them as paragraph styles). Then we could also in general 
allow
	%style=<style-name>%

although I'm not sure on what the resulting HTML should (SPAN-element?). 
Here's a mockup:
	http://www.md.kth.se/~chr/pmwiki/right.shtml

> > If done this way, I'm thinking that %align=right% or %align=center%
> > anywhere in a markup line would cause the entire line of markup to be
> > right or center justified (and having both %align=right% and
> > %align=center% in a line would be somewhat unpredictable).

If we want to keep the behaviour that %<something>%..%% only work on the 
elements within, we could use this alternative markup:

	[[style:par-right]] and [[style:par-center]]

or possibly

	[[style-par:right]] and [[style-par:center]]

to really emphasize that it's a style that will affect the entire 
paragraph.

> >
> > Ideas, comments, suggestions?
> >
> > Pm
> >
> 
> For me, the simplier the markup the better.  So how about:
> > |     or     >>|     right-justify
> <|>    or     <<|>>   center-justify
> |<     or       |<<   left-justfy
>

You seem to mean 'short' with 'simple' here. However, I'm not convinced
that this will be used *that* much, and would prefer a more obvious (but
slightly longer) markup. (And instead allow a local alias that the admin
can activate for sites that do use this very often).

We could ask JR how often he writes pages that are right/center justified.

> The markup would be placed at the start of a line. 

That would be neccessary with the markup you suggested above.

> [The markup] would continue in effect until alternate markup is
> encountered.

Do we really write centered paragraphs so often? I think it'd be 
better to force a new 'center'-command for each paragraph.

In addition, I'm not very keen on markup suggestion above. There should
definitiely not be a space in '> |', which leaves us the two alternatives:

	>|	or	>>|
	<|> or <<|>> (looks like a wiki trail IMO)

(where I skipped '|<' or '|<<' since IMO left should be the standard
alignment).

The markup in the right column seems a little bit to close to the one used
for wiki trails IMO (which we might want to extend the syntax of in the
future). Actually, isn't this also markup for a wiki trail:
	 <|TrailPage|>

In addition, I've been musing on using  (hey, it rhymes ;-)

	> asfadsfa
	> > bla bla
	> > bla bla
	> asdfasd
	> > bla bla
as markup that pmwiki recognizes as coming from an e-mail (i.e.  the user
did a copy&paste on it).

Oh, and from the point of view of e-mail, we'll find it annoying to
discuss this markup on the mailing list ;-9

> ...probably wouldn't occur naturally in typical text.

I'm not sure... unless you mean 'typically wouldn't occur in a natural
text' ;-)

> The keystrokes are all in shift mode and easy to type.

I don't think that's very important here ;-)  (i.e. back to my
argument about how this occurs).

> They also relate to -> and --> that indicate indented text.

If we want to relate to -...->, how about this (from the top of my
head).

	--<>	centered paragraph
	-->>	right alighned paragraph

they don't feel that obvious to me, but the "logic" would be that they
are based on '-->', and for the centered paragraph there's an '<'
inserted, and for the right aligned there's an extra '>'. Of course,
'-<>' and '-->>' could be used just as well.

/Christian

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







More information about the pmwiki-users mailing list