From 22500ac669ef089089458d27b90895945a4c8884 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sat, 9 Dec 2006 16:28:08 +0000 Subject: lout & latex engines: Fixed the output of `&prog-line'. * src/guile/skribilo/engine/latex.scm: Use `(srfi srfi-13)'. (&prog-line): Use markup option `:number' instead of `markup-ident' as the line number. * src/guile/skribilo/engine/lout.scm: Likewise. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-34 --- src/guile/skribilo/engine/latex.scm | 11 ++++++++--- src/guile/skribilo/engine/lout.scm | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/guile') diff --git a/src/guile/skribilo/engine/latex.scm b/src/guile/skribilo/engine/latex.scm index 8d5b88f..21ff6c5 100644 --- a/src/guile/skribilo/engine/latex.scm +++ b/src/guile/skribilo/engine/latex.scm @@ -18,7 +18,8 @@ ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ;;; USA. -(define-skribe-module (skribilo engine latex)) +(define-skribe-module (skribilo engine latex) + :use-module (srfi srfi-13)) ;*---------------------------------------------------------------------*/ ;* latex-verbatim-encoding ... */ @@ -997,8 +998,12 @@ ;*---------------------------------------------------------------------*/ (markup-writer '&prog-line :before (lambda (n e) - (let ((n (markup-ident n))) - (if n (skribe-eval (it (list n) ": ") e)))) + (let ((num (markup-option n :number))) + (if (number? num) + (skribe-eval + (it (string-append (string-pad (number->string num) 3) + ": ")) + e)))) :after "\\\\\n") ;*---------------------------------------------------------------------*/ diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index 6106f35..b10c4a2 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -24,6 +24,7 @@ (define-skribe-module (skribilo engine lout) + :use-module (srfi srfi-13) :autoload (ice-9 popen) (open-output-pipe) :autoload (ice-9 rdelim) (read-line)) @@ -1673,8 +1674,12 @@ ;; Program lines appear within a `lines @Break' block. (markup-writer '&prog-line :before (lambda (n e) - (let ((n (markup-ident n))) - (if n (skribe-eval (it (list n) ": ") e)))) + (let ((num (markup-option n :number))) + (if (number? num) + (skribe-eval + (it (string-append (string-pad (number->string num) 3) + ": ")) + e)))) :after "\n") ;*---------------------------------------------------------------------*/ -- cgit v1.2.3