aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2006-12-08 08:19:12 +0000
committerLudovic Court`es2006-12-08 08:19:12 +0000
commita24b5dbd2dc91b6fc3088c77a946fd8931e7e7dd (patch)
tree95b21f40f3e421b5d176e89ceb62e8090fe6f4e4
parent434bc748f845dd776392fcf2a9762a509070e251 (diff)
downloadskribilo-a24b5dbd2dc91b6fc3088c77a946fd8931e7e7dd.tar.gz
skribilo-a24b5dbd2dc91b6fc3088c77a946fd8931e7e7dd.tar.lz
skribilo-a24b5dbd2dc91b6fc3088c77a946fd8931e7e7dd.zip
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
-rw-r--r--src/guile/skribilo/engine/latex.scm11
-rw-r--r--src/guile/skribilo/engine/lout.scm9
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")
;*---------------------------------------------------------------------*/