[Pmwiki-users] something like a <pre> tag

Patrick R. Michaud pmichaud
Mon Mar 1 10:06:48 CST 2004


On Sun, Feb 29, 2004 at 07:44:55PM +0100, Andreas 'ads' Scherbaum wrote:
> Hello all,
> 
> we are trying to use pmwiki to store all kind of information about our 
> process flow, code snippets, configs and so on (testing stage for now).
> Since we have a lot of plain text to copy into a site, it would be nice 
> to have something like the <pre> tag in html available. The [= =] 
> doesnt really fits our needs, it stops pmwiki from parsing the text, 
> but doesnt take care on the line breaks.

I don't understand this last part that [=...=] doesn't take care of
line breaks.  Does something like

      [=
    #include <stdio.h>

    int main(int argc,char* argv[]) {
        printf("Hello world\n");
    }

    =]

not work for you, with everything appearing on a separate line?  Note the
leading spaces prior to the first "[=", which causes the enclosed text
to appear in a <pre> section.  This is how I've done my program and
markup listings.

For another approach, you might also take a look at the program listing 
beautifier script at http://www.pmichaud.com/wiki/Cookbook/Beautifier, 
which I believe is currently being updated to be a bit easier to use
and to work more seamlessly with PmWiki 0.6.x.

Pm



More information about the pmwiki-users mailing list