[pmwiki-users] Using inote markup as a systemwide LatestNews flag/sticky

John Rankin john.rankin at affinity.co.nz
Thu Aug 11 19:15:28 CDT 2005


On Friday, 12 August 2005 10:51 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Thu, Aug 11, 2005 at 05:21:01PM +0100, K.A.Bouton wrote:
>> I have been looking into postitnotes, stickynotes and inotes.
>> Has one takenover from the others?
>
>I'm currently pushing for a new version of postit/stickynotes, based
>on wikistyles.  I've put some examples at 
>http://www.pmwiki.org/wiki/Test/Sidenotes .
>
>[snip]
>Hope this helps...?
>
>Pm

This raises an issue which I have been dodging for a while.
I would welcome advice and help.

It's *really* *really* hard to transform wikistyles and style blocks 
into print for our wikipublisher typesetting project. I think I'm 
missing something at the conceptual level.

<background>
To typeset a wiki page collection, we transform it to a print-oriented
xml dtd, then transform that to LaTeX, then process the LaTeX. So every
wiki markup element has an intermediate xml tag. Anything that we can't 
deal with comes out as regular xhtml tags, which then get removed.
</background>

<issue>
What to do with >>blocks<< -- the best idea we have come up with is
to treat these as LaTeX mini-pages and wrap them in a <group> tag
on output from pmwiki. The problem, as I see it, is that the 
>>block<< markup is based on html style rules, ie presentation,
whereas both the print dtd and LaTeX are structure-oriented.

Some style attributes are meaningful for print and others are not.
The structure of LaTeX mini-pages is AFAIK not as flexible as css. 

Where I'm stuck is how to map wiki structures like >>sidenote<<
and %sidenote% into something other than xhtml in a way that
is meaningful. Most wiki markup is intrinsically simple to
deal with, because it describes what the object is and we just 
have to map it to a corresponding print element. HTML css
is a tougher nut.

A simple example: {=a small note=} is easy to translate into
a marginal note for printing. But how do we decide what to do 
with %stickynote%a small note% and having decided, how to we
then apply the correct markup rule?
</issue>

<whatWouldHelp>
1. detailed comments in scripts/wikistyles.php that explain
   how the code actually works -- please!

2. advice on how to translate a given named style into the 
   correct print-oriented inline tag and attributes

3. advice on how to translate a named block style into
   the correct print-oriented block tag and attributes

4. a clever idea and rules for how to translate css into
   print-oriented attributes

5. at worst, a way to turn a style block into an image
   that we embed in the print output
</whatWouldHelp>

I *think* what we have to do is create pre-defined styles
that use the pmwiki names, but use a different set of tags, 
attribute names and attribute values.

I don't understand how to handle arbitrary user-defined 
styles, unless we have a general way to translate css 
into something that LaTeX always understands.
Simple case: background-color -- only works if the 
text avoids certain markups.

Somehow, it feels as if I'm going about this the wrong
way. A new perspective would be timely.
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list