From 40220a2365104a2807caf2fcf895f83e1a21539a Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 24 Jun 2007 19:52:01 +0000 Subject: eq: Implemented equation numbering. * src/guile/skribilo/package/base.scm (chapter): Augmented environment to include `equation-env' and `equation-counter'. * src/guile/skribilo/package/eq.scm: Use `(skribilo resolve)'. (equation-number-string): New. (eq)[:number]: New option. Handle it. * src/guile/skribilo/package/eq/lout.scm (eq): Prepare to handle `:number'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-118 --- ChangeLog | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index addd806..be980d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,39 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-06-24 19:52:01 GMT Ludovic Courtes patch-118 + + Summary: + eq: Implemented equation numbering. + Revision: + skribilo--devo--1.2--patch-118 + + * src/guile/skribilo/package/base.scm (chapter): Augmented environment to + include `equation-env' and `equation-counter'. + + * src/guile/skribilo/package/eq.scm: Use `(skribilo resolve)'. + (equation-number-string): New. + (eq)[:number]: New option. + Handle it. + + * src/guile/skribilo/package/eq/lout.scm (eq): Prepare to handle + `:number'. + + modified files: + ChangeLog src/guile/skribilo/package/base.scm + src/guile/skribilo/package/eq.scm + src/guile/skribilo/package/eq/lout.scm + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-100 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-101 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-102 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-103 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-104 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-105 + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-106 + + 2007-06-23 07:41:59 GMT Ludovic Court`es patch-117 Summary: -- cgit v1.2.3 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 --- ChangeLog | 20 ++++++++++++++++++++ src/guile/skribilo/package/eq.scm | 2 +- src/guile/skribilo/package/eq/lout.scm | 14 ++++++++------ 3 files changed, 29 insertions(+), 7 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index be980d9..bcbcb1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,26 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-06-24 19:53:02 GMT Ludovic Courtes patch-119 + + Summary: + eq/lout: Use the new `@BypassNumber' option for numbered displays. + Revision: + skribilo--devo--1.2--patch-119 + + * 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'. + + modified files: + ChangeLog src/guile/skribilo/package/eq.scm + src/guile/skribilo/package/eq/lout.scm + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-107 + + 2007-06-24 19:52:01 GMT Ludovic Courtes patch-118 Summary: 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 From 2390ce80ff4805d5253fea4dcfd932dd660a4c16 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 24 Jun 2007 19:53:32 +0000 Subject: eq: Updated doc for `:number'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-120 --- ChangeLog | 15 +++++++++++++++ TODO | 5 +++++ doc/user/eq.skb | 7 ++++++- 3 files changed, 26 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index bcbcb1a..eebe94f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,21 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-06-24 19:53:32 GMT Ludovic Courtes patch-120 + + Summary: + eq: Updated doc for `:number'. + Revision: + skribilo--devo--1.2--patch-120 + + + modified files: + ChangeLog TODO doc/user/eq.skb + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-108 + + 2007-06-24 19:53:02 GMT Ludovic Courtes patch-119 Summary: diff --git a/TODO b/TODO index f98b32c..c40a461 100644 --- a/TODO +++ b/TODO @@ -15,6 +15,11 @@ into a `--compat=XXX' command-line option. Left margin doesn't display well when CSS is being used. +* Small Items, Known Bugs + +** `eq' package: Handle `:number' in the HTML back-end + + * Longer-Term Items ** Add a `if-engine' markup to avoid hacks with `engine-format?' diff --git a/doc/user/eq.skb b/doc/user/eq.skb index fb8c3ef..ff46b5c 100644 --- a/doc/user/eq.skb +++ b/doc/user/eq.skb @@ -1,6 +1,6 @@ ;;; eq.skb -- Equation formatting. ;;; -;;; Copyright 2006 Ludovic Courtès +;;; Copyright 2006, 2007 Ludovic Courtès ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -96,6 +96,11 @@ Otherwise, it should be a boolean indicating whether the equation is to appear "in-line", i.e., within a paragraph. If the engine supports it, it may adjust various parameters such as in-equation spacing accordingly.]) + (:number [If true, then a number is automatically +assigned to the equation and displayed. If it is a string, then that +string is used as the equation's number. If ,(code [#f]), then the +equation is left unnumbered. Note that this option is only taken into +account for displayed equations.]) (:renderer [The engine that should be used to render the equation. This allows, for instance, to use the Lout engine to render equations in HTML.]) -- cgit v1.2.3 From 0987800d0caf8371a2b25e285e233bd5e7e66aec Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 24 Jun 2007 19:53:56 +0000 Subject: eq/lout: Fixed spacing around in-line equations. * src/guile/skribilo/package/eq/lout.scm (eq): Don't output a space in front of in-line equations. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-121 --- ChangeLog | 17 +++++++++++++++++ src/guile/skribilo/package/eq/lout.scm | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index eebe94f..8f75a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,23 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-06-24 19:53:56 GMT Ludovic Courtes patch-121 + + Summary: + eq/lout: Fixed spacing around in-line equations. + Revision: + skribilo--devo--1.2--patch-121 + + * src/guile/skribilo/package/eq/lout.scm (eq): Don't output a space + in front of in-line equations. + + modified files: + ChangeLog src/guile/skribilo/package/eq/lout.scm + + new patches: + lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-109 + + 2007-06-24 19:53:32 GMT Ludovic Courtes patch-120 Summary: diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm index dff7c66..577f6da 100644 --- a/src/guile/skribilo/package/eq/lout.scm +++ b/src/guile/skribilo/package/eq/lout.scm @@ -66,9 +66,9 @@ (if (and displayed? (not (*embedded-renderer*))) (display (if (string? number) (string-append "@CAND @BypassNumber { \"" - number "\" }") - "@CAD"))) - (display " { "))) + number "\" } ") + "@CAD "))) + (display "{ "))) :action (lambda (node engine) (display (if (inline-equation? node) "@OneRow @OneCol @E { " -- cgit v1.2.3