summaryrefslogtreecommitdiff
path: root/src/guile/skribilo/package/eq/lout.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile/skribilo/package/eq/lout.scm')
-rw-r--r--src/guile/skribilo/package/eq/lout.scm28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/guile/skribilo/package/eq/lout.scm b/src/guile/skribilo/package/eq/lout.scm
index 563fdbf..9cd594b 100644
--- a/src/guile/skribilo/package/eq/lout.scm
+++ b/src/guile/skribilo/package/eq/lout.scm
@@ -85,8 +85,12 @@
;; Note: We could use `pmatrix' here but it precludes line-breaking
;; within equations.
- (open-par `(if need-paren? "{ @VScale ( }" ""))
- (close-par `(if need-paren? "{ @VScale ) }" "")))
+ (open-par (if parentheses?
+ `(if need-paren? "{ @VScale ( }" "")
+ ""))
+ (close-par (if parentheses?
+ `(if need-paren? "{ @VScale ) }" "")
+ "")))
`(markup-writer ',(symbol-append 'eq: sym)
(find-engine 'lout)
@@ -102,25 +106,21 @@
(eq-op? (equation-markup? op))
(need-paren?
(and eq-op?
- (< (operator-precedence
- (equation-markup-name->operator
- (markup-markup op)))
- ,precedence)))
+ (>= (operator-precedence
+ (equation-markup-name->operator
+ (markup-markup op)))
+ ,precedence)))
(column (port-column
(current-output-port))))
;; Work around Lout's limitations...
(if (> column 1000) (display "\n"))
- (display (string-append " { "
- ,(if parentheses?
- open-par
- "")))
+ (display
+ (string-append " { " ,open-par))
(output op engine)
- (display (string-append ,(if parentheses?
- close-par
- "")
- " }"))
+ (display
+ (string-append ,close-par " }"))
(if (pair? (cdr operands))
(display (string-append " "
lout-name