From a24b5dbd2dc91b6fc3088c77a946fd8931e7e7dd Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Fri, 8 Dec 2006 08:19:12 +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: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-87 --- src/guile/skribilo/engine/latex.scm | 11 ++++++++--- src/guile/skribilo/engine/lout.scm | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) 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