[Pmwiki-users] Newbie struggles with embedding pgm listings and cmd examples

Bruce Files BFILES
Wed Nov 3 08:25:48 CST 2004


>>> "Patrick R. Michaud" <pmichaud at pobox.com> 11/3/2004 8:49:53 AM >>>
>On Wed, Nov 03, 2004 at 08:22:33AM -0600, Bruce Files wrote:
>> But I find myself continually struggling with something that should
be
>> easy - embedding chunks of mono-spaced, plain-text program listings
or
>> command examples.  I've gone over the Text Formatting Rules and the
>> other doc repeatedly, but I can't seem to find an easy way to do
this.

>Use space+[= for monospaced plain-text program listings.

Interesting, if I do this:
- - - -
* Copy the sample files delivered with [=ClearCase=] into your
''[=os390=]'' folder:

-> [=copy "c:\program files\rational\clearcase\samples\*.*"
c:\ccstore\os390=]
 
* Create a file called '''stunnel.conf''' that contains the following
lines:
- - - -
my copy cmd no longer wraps, but I lose the monospace font

if I do this:
- - - -
* Copy the sample files delivered with [=ClearCase=] into your
''[=os390=]'' folder:

 [=copy "c:\program files\rational\clearcase\samples\*.*"
c:\ccstore\os390=]
 
* Create a file called '''stunnel.conf''' that contains the following
lines:
- - - -
my copy cmd no longer wraps, and I get the monospace, but now the
indent is gone - I guess I can use spaces to pad it over, but I'm
fighting the tool again.

>> I tried coding this all sorts of ways, but I found it nearly
impossible
>> to (a) prevent the command example from wrapping and (b) preserve
the
>> number context.

>Alas, there's not presently a good way to preserve the number context
and
>make use of monospace formatting, short of introducing a new markup.
>What would you like it to be?

>(Yes, it would be possible to get [@...@], or any other markup
sequence you
>might care to define, to always generate <pre> sections.) 

What I could live with would be a syntax like
[@
   my block of monospace formatting starts here
   with no wrapping or processing
   and the outer number/paragraph context is retained
   and it continues until it sees a 'closing'
@]

Even better would be a syntax that allows formatting to be applied
across the entire block, for example:
->[@
this is my block of monospace code
every line in this block will be indented
because of the '->' preceeding the [@
it continues until a closing 
@]

>Pm

Thanks,
Bruce







More information about the pmwiki-users mailing list