summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2007-08-24 08:31:38 +0000
committerLudovic Court`es2007-08-24 08:31:38 +0000
commit93cbb0fc60b1243596923554305c20fceefa1a12 (patch)
tree173fc65e5aac09f761af7d2e93ac0cf8f059bbe5
parentfcb03872ea196c88990e1ce18894bfad20fa7b11 (diff)
parentcda698a046f56a969998852dedaefa3f94d62e05 (diff)
downloadskribilo-93cbb0fc60b1243596923554305c20fceefa1a12.tar.gz
skribilo-93cbb0fc60b1243596923554305c20fceefa1a12.tar.lz
skribilo-93cbb0fc60b1243596923554305c20fceefa1a12.zip
eq/lout: Use "strut @Font" within parenthesized expressions.
* src/guile/skribilo/package/eq/lout.scm (%left-paren): Use "strut @Font" for the expression that follows. (%right-paren): Updated accordingly. (combinations): Use "nostrut @Font". git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-148
-rw-r--r--ChangeLog19
-rw-r--r--src/guile/skribilo/package/eq/lout.scm23
2 files changed, 37 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 42013ba..b5ca51e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,25 @@
# arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2
#
+2007-08-24 08:31:38 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-148
+
+ Summary:
+ eq/lout: Use "strut @Font" within parenthesized expressions.
+ Revision:
+ skribilo--devo--1.2--patch-148
+
+ * src/guile/skribilo/package/eq/lout.scm (%left-paren): Use "strut
+ @Font" for the expression that follows.
+ (%right-paren): Updated accordingly.
+ (combinations): Use "nostrut @Font".
+
+ modified files:
+ ChangeLog src/guile/skribilo/package/eq/lout.scm
+
+ new patches:
+ lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-90
+
+
2007-08-24 08:31:04 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-147
Summary:
diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm
index ce478f7..4742c31 100644
--- a/src/guile/skribilo/package/eq/lout.scm
+++ b/src/guile/skribilo/package/eq/lout.scm
@@ -83,10 +83,19 @@
:after " } }")
-;; Scaled parenthesis. We could use `pmatrix' here but it precludes
-;; line-breaking within equations.
-(define %left-paren "{ Base @Font @VScale \"(\" }")
-(define %right-paren "{ Base @Font @VScale \")\" }")
+;; Scaled parenthesis.
+;;
+;; * We could use `pmatrix' here but it precludes line-breaking within
+;; equations, so we use our own variant.
+;;
+;; * The use of `strut @Font' aims to produce balanced parentheses,
+;; regardless of the ascender/descender of the numerator/denominator, so
+;; that, e.g., "(a/b)" has parentheses similar to "(b/a)".
+;;
+(define %left-paren
+ "{ { Base \"nostrut\" } @Font @VScale \"(\" } \"strut\" @Font { ")
+(define %right-paren
+ " }{ { Base \"nostrut\" } @Font @VScale \")\" }")
(define (div-style->lout style)
(case style
@@ -258,7 +267,11 @@
:action (lambda (node engine)
(let ((of (markup-option node :of))
(among (markup-option node :among)))
- (display " ` { matrix atleft { lpar } atright { rpar } { ")
+ ;; Note: The `matrix' is enclosed in `nostrut' so that its
+ ;; brackets are not affected. It also looks better to enclose
+ ;; the matrix contents in `nostrut'.
+ (display " ` { \"nostrut\" @Font ")
+ (display "matrix atleft { lpar } atright { rpar } { ")
(display "row col { ")
(output of engine)
(display " } row col { ")