[pmwiki-users] Re: preformatted text
chr at home.se
chr at home.se
Fri Aug 12 02:40:10 CDT 2005
On Fri, 12 Aug 2005, Patrick R. Michaud wrote:
> current markup for this is space+[=...=], as in
>
> [=
> Here is some monospace text. Note
> the space before the initial bracket+equals.
> =]
..
> However, new authors are often surprised by [@...@] when it contains
> multiple lines -- the newlines are folded into a single output line
> (as @@[=...=]@@ would do), whereas many authors expect the result
> to have the newlines preserved in preformatted text.
I'd just assumed that [@...@] only works when placed on a single line.
> So, perhaps we can reduce author surprise and add our needed markup
> by saying that [@...@] around text with newlines results in a
> <pre>...</pre> block instead of <code>...</code>.
Sounds potentially brilliant!
The result of the following:
[@
A preformatted line
@]
seems obvious to me, but what would the result be of this markup:
A normal line [@What is
this text???@]
Will you ghet "What is" on the same line as "A normal line", or will it
start on a line of its own? (I have a vague memory that <pre>..</pre>
introduces a new line by itself)
> 2. Introduce explicit (:pre:) ... (:preend:) directives. Another
> possibility is to just introduce explicit directives for
> preformatted text. The only qualm I have with this is that it
> can look a little more verbose than I'd like -- especially the
> "(:preend:)" part.
>
> (:pre:)
> Here is some
> monospaced text
> spread across multiple lines.
> (:preend:)
This looks perfectly fine to me. It might also be slightly more intuitive
for new authors, especially as the structure (:XXX:)..(:XXXend:) is
getting more common in the markup. I might even prefer (:pre:) over [@ for
consistency... it's a difficult choice.
> 3. Try to create preformatted div wikistyles. I've played with this
> a bit, but it again becomes an issue of dealing with initial and
> trailing newlines. The best I can come up with so far is
>
> >>pre<< Here is some
> monospaced text
> spread across multiple lines
> >><<
I can't quite see the advantage of this over (:pre:)...(:preend:). In
addition, how would I write the following using div wikistyles:
(:pre:)
We will now illustrate a so called div wikistyle:
>>wikistyle<<
This would be within a wikistyle.
>><<
(:preend:)
In conclusion, my vote is on 1 and/or 2, but not 3.
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list