From 23f211f16da7d70fd2049bcc5f3565ca6602c81f Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Wed, 4 Apr 2007 16:22:32 +0000 Subject: `eq' package: Properly handle auto-inlining. * src/guile/skribilo/package/eq.scm (inline-equation?): Use `find1-up' instead of `find-up'. This fixes a bug. (eq): Properly pass the `:inline?' options through the `options' slot. * src/guile/skribilo/package/eq/lout.scm (eq): When inline, enclose equation in `@OneRow @OneCol' so that it is not breakable. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-46 --- src/guile/skribilo/package/eq.scm | 12 ++++++------ src/guile/skribilo/package/eq/lout.scm | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo/package/eq.scm b/src/guile/skribilo/package/eq.scm index 7ad39d8..8b4d325 100644 --- a/src/guile/skribilo/package/eq.scm +++ b/src/guile/skribilo/package/eq.scm @@ -19,7 +19,7 @@ ;;; USA. (define-module (skribilo package eq) - :autoload (skribilo ast) (markup? find-up) + :autoload (skribilo ast) (markup? find1-up) :autoload (skribilo output) (output) :use-module (skribilo writer) :use-module (skribilo engine) @@ -124,9 +124,9 @@ a symbol representing the mathematical operator denoted by @var{m} (e.g., (let ((i (markup-option m :inline?))) (case i ((auto) - (not (find-up (lambda (n) - (is-markup? n 'eq-display)) - m))) + (not (find1-up (lambda (n) + (is-markup? n 'eq-display)) + m))) ((#t) #t) (else #f))))) @@ -217,9 +217,9 @@ a symbol representing the mathematical operator denoted by @var{m} (e.g., (class class) (loc &invocation-location) (options `((:div-style ,div-style) (:align-with ,align-with) - (:mul-style ,mul-style) + (:mul-style ,mul-style) (:inline? ,inline?) ,@(the-options opts - :ident :class + :ident :class :inline? :div-style :mul-style :align-with))) (body (let loop ((body (the-body opts)) (result '())) diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm index 5633ae4..d0d9570 100644 --- a/src/guile/skribilo/package/eq/lout.scm +++ b/src/guile/skribilo/package/eq/lout.scm @@ -66,7 +66,7 @@ "\n@IAD " "")))) :action (lambda (node engine) (display (if (inline-equation? node) - "@E { " + "@OneRow @OneCol @E { " "@Eq { ")) (let ((eq (markup-body node))) ;;(fprint (current-error-port) "eq=" eq) -- cgit v1.2.3