From 560cb82e9c6984d338b5367cd15109746a6dd844 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 28 Jan 2008 19:02:25 +0100 Subject: doc: Improve rendering of `prgm' and `disp' in Lout. * doc/modules/skribilo/documentation/manual.scm (prgm): Specialize Lout output. (disp): Likewise. --- doc/modules/skribilo/documentation/manual.scm | 34 ++++++++++++++------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'doc/modules') diff --git a/doc/modules/skribilo/documentation/manual.scm b/doc/modules/skribilo/documentation/manual.scm index 9fddcaf..90a0c68 100644 --- a/doc/modules/skribilo/documentation/manual.scm +++ b/doc/modules/skribilo/documentation/manual.scm @@ -207,34 +207,36 @@ (source :language language :file file)) (else (source :language language (the-body opts))))) - (pr (cond - (line - (prog :line line sc)) - (else - (pre sc)))) + (pr (prog :line line sc)) (f (frame :margin 5 :border 0 :width *prgm-width* (color :margin 5 :width 100. :bg c pr)))) (resolve (lambda (n e env) ;; Same trick as for `ctrtable': don't center frames (which ;; are actually `@Tbl') in Lout. (if (engine-format? "lout" e) - (! "\n@LP\n@DP\n$1\n@LP\n" f) + (! "\n@LP\n@ID @F { $1 }\n@LP\n" pr) f))))) ;*---------------------------------------------------------------------*/ ;* disp ... */ ;*---------------------------------------------------------------------*/ (define-markup (disp :rest opts :key (verb #f) (line #f) (bg *disp-color*)) - (if (engine-format? "latex") - (if verb - (pre (the-body opts)) - (the-body opts)) - (center - (frame :margin 5 :border 0 :width *prgm-width* - (color :margin 5 :width 100. :bg bg - (if verb - (pre (the-body opts)) - (the-body opts))))))) + (cond ((engine-format? "latex") + (if verb + (pre (the-body opts)) + (the-body opts))) + ((engine-format? "lout") + (! "\n@ID { $1 } # disp\n" + (if verb + (pre (the-body opts)) + (the-body opts)))) + (else + (center + (frame :margin 5 :border 0 :width *prgm-width* + (color :margin 5 :width 100. :bg bg + (if verb + (pre (the-body opts)) + (the-body opts)))))))) ;*---------------------------------------------------------------------*/ ;* keyword ... */ -- cgit v1.2.3