summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtes2006-12-09 16:28:08 +0000
committerLudovic Courtes2006-12-09 16:28:08 +0000
commit22500ac669ef089089458d27b90895945a4c8884 (patch)
tree95b21f40f3e421b5d176e89ceb62e8090fe6f4e4
parentfedce06edf8768b927ca91fb22ade620ac77ec2a (diff)
downloadskribilo-22500ac669ef089089458d27b90895945a4c8884.tar.gz
skribilo-22500ac669ef089089458d27b90895945a4c8884.tar.lz
skribilo-22500ac669ef089089458d27b90895945a4c8884.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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-34
-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")
;*---------------------------------------------------------------------*/