[pmwiki-users] Display text (actually C++ sample code) in a predifined-size with scrollers

Olivier Planchon olivier.planchon at gmail.com
Mon Apr 18 08:19:10 CDT 2011

Many thanks, Peter.
I have scrolled the web for hours in the quest of such a recipe.
SourceBlock is my choice for code, as suggested by Xavier. I still love the
direct way you first showed. I will be using it for everything else than
Thanks again. This helps me a lot.

Have a good day, Olivier

On 18 April 2011 18:21, Peter Bowers <pbowers at pobox.com> wrote:

> On Mon, Apr 18, 2011 at 11:30 AM, Olivier Planchon
> <olivier.planchon at gmail.com> wrote:
> > I want to display C++ code in my pmWiki pages.
> > I want to limit the size allowed to display the code, like in the (:input
> > textarea name [=value=] rows=n cols=n:) form, where [=value=] will be
> tens
> > or hundreds lines of C++ code.
> I got this from the release notes sections of some of HansB's recipes
> -- I think it'll do what you want:
> (:div style="height:12em; padding:.4em; border:1px solid #dddddd;
> background-color: #f8f8f8; overflow: auto;":)
> [@
> Code goes here.  Adjust the height and etc. in the style configuration
> above.
> @]
> (:divend:)
> See http://www.qdk.org/pmwiki/index.php?n=Test.Scroll to see it in
> action with some random PHP code.
> You don't have to use [@...@] if you have a preferred way to display
> it (see below) -- this is just a quick way to make sure nothing in the
> code is interpreted as markup for your page.
> You might also be interested in these resources for displaying code:
> * http://www.pmwiki.org/wiki/Cookbook/Syntaxlove
> * http://www.pmwiki.org/wiki/Cookbook/SourceBlock
> -Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20110418/531442db/attachment.html>

More information about the pmwiki-users mailing list