From 2c4f1e959082d20ea03f93274571316ffde5d0cc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 24 May 2012 00:06:21 +0200 Subject: doc: lout: Render examples in a colored box. * doc/modules/skribilo/documentation/api.scm (le)[inline-definitions-proc]: Add @SkribiloExample. * doc/modules/skribilo/documentation/manual.scm (example)[lout]: Use @SkribiloExample. (le): Set the `includes' custom to include `diag'. * src/guile/skribilo/engine/lout.scm (frame): Mark the trick about @Floater. --- doc/modules/skribilo/documentation/api.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'doc/modules/skribilo/documentation/api.scm') diff --git a/doc/modules/skribilo/documentation/api.scm b/doc/modules/skribilo/documentation/api.scm index 873e03a..8626282 100644 --- a/doc/modules/skribilo/documentation/api.scm +++ b/doc/modules/skribilo/documentation/api.scm @@ -93,9 +93,28 @@ (let ((defs (engine-custom le 'inline-definitions-proc))) (engine-custom-set! le 'inline-definitions-proc (lambda (e) - (string-append (defs e) "\n" - "def @DocHeading right x\n{\n" - "{ Helvetica Base } @Font x\n}\n")))) + (string-append + (defs e) "\n" + "def @DocHeading right x\n{\n" + "{ Helvetica Base } @Font x\n}\n" + + " +# The `example' markup. +def @SkribiloExample named @Title {} right x { + @B { @Title } + @Floater + @OnePage { No } + @Location { Display } + @Format { + @Diag { @CurveBox + outlinestyle { noline } + paint { rgb 0.95 0.95 0.87 } + font { 0.9f } + break { 0.9fx } + @HExpand @Body } } + { x } +}\n\n" + )))) (markup-writer 'doc-markup :action (lambda (n e) -- cgit v1.2.3