From 699590eb680344df7283943e5b0f32667deae615 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 24 Jun 2007 19:53:02 +0000 Subject: eq/lout: Use the new `@BypassNumber' option for numbered displays. * src/guile/skribilo/package/eq.scm (eq)[number]: Default to `#t'. * src/guile/skribilo/package/eq/lout.scm (eq): Use `@CAND'/`@CAD' instead of `@IAD' (because `@IAND' is broken). Handle `:number'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-119 --- src/guile/skribilo/package/eq.scm | 2 +- src/guile/skribilo/package/eq/lout.scm | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo/package/eq.scm b/src/guile/skribilo/package/eq.scm index 211a9bd..31b297d 100644 --- a/src/guile/skribilo/package/eq.scm +++ b/src/guile/skribilo/package/eq.scm @@ -238,7 +238,7 @@ a symbol representing the mathematical operator denoted by @var{m} (e.g., (inline? 'auto) (align-with #f) (renderer #f) (div-style 'over) (mul-style 'space) - (number #f)) + (number #t)) (new container (markup 'eq) (ident (or ident (symbol->string (gensym "eq")))) diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm index 017b1f8..dff7c66 100644 --- a/src/guile/skribilo/package/eq/lout.scm +++ b/src/guile/skribilo/package/eq/lout.scm @@ -61,12 +61,14 @@ :before (lambda (node engine) (let* ((parent (ast-parent node)) (displayed? (is-markup? parent 'eq-display)) - ;;(number (equation-number-string node)) - ) - ;; FIXME: Use NUMBER when `@BypassNumber' is available. - (format #t "~a{ " - (if (and displayed? (not (*embedded-renderer*))) - "\n@IAD " "")))) + (number (equation-number-string node))) + ;; Note: The `@BypassNumber' option appeared in Lout 3.36. + (if (and displayed? (not (*embedded-renderer*))) + (display (if (string? number) + (string-append "@CAND @BypassNumber { \"" + number "\" }") + "@CAD"))) + (display " { "))) :action (lambda (node engine) (display (if (inline-equation? node) "@OneRow @OneCol @E { " -- cgit v1.2.3