diff options
author | Ludovic Court`es | 2007-08-24 08:31:38 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-08-24 08:31:38 +0000 |
commit | 93cbb0fc60b1243596923554305c20fceefa1a12 (patch) | |
tree | 173fc65e5aac09f761af7d2e93ac0cf8f059bbe5 /src | |
parent | fcb03872ea196c88990e1ce18894bfad20fa7b11 (diff) | |
parent | cda698a046f56a969998852dedaefa3f94d62e05 (diff) | |
download | skribilo-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
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/package/eq/lout.scm | 23 |
1 files changed, 18 insertions, 5 deletions
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 { ") |