diff options
author | Ludovic Court`es | 2007-08-24 08:29:35 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-08-24 08:29:35 +0000 |
commit | cda698a046f56a969998852dedaefa3f94d62e05 (patch) | |
tree | a3b88042ab9cd61a0a467a10d679701e9c252696 | |
parent | c8a16aabaf8725f1358f60b9bf1c734b1012d9e0 (diff) | |
download | skribilo-cda698a046f56a969998852dedaefa3f94d62e05.tar.gz skribilo-cda698a046f56a969998852dedaefa3f94d62e05.tar.lz skribilo-cda698a046f56a969998852dedaefa3f94d62e05.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: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-90
-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 { ") |