added 'left-right/beside-side-conditions

svn: r15350
This commit is contained in:
Robby Findler 2009-07-01 04:45:02 +00:00
parent ae01dea336
commit ba5aea8cdd
4 changed files with 18 additions and 7 deletions

View File

@ -74,6 +74,7 @@
(parameter/c (symbols 'left-right
'left-right/vertical-side-conditions
'left-right/compact-side-conditions
'left-right/beside-side-conditions
'up-down
'up-down/vertical-side-conditions
'up-down/compact-side-conditions))])

View File

@ -784,14 +784,16 @@
+inf.0)))))
eqns)])
(case style
[(left-right left-right/vertical-side-conditions left-right/compact-side-conditions)
[(left-right left-right/vertical-side-conditions left-right/compact-side-conditions left-right/beside-side-conditions)
(table 3
(apply append
(map (lambda (lhs sc rhs linebreak?)
(append
(if linebreak?
(list lhs (blank) (blank))
(list lhs =-pict rhs))
(if (and sc (eq? style 'left-right/beside-side-conditions))
(list lhs =-pict (hbl-append 10 rhs sc))
(list lhs =-pict rhs)))
(if linebreak?
(let ([p rhs])
(list (hbl-append sep
@ -802,7 +804,9 @@
(blank (max 0 (- (pict-width p) max-lhs-w sep))
0)))
null)
(if (not sc)
(if (or (not sc)
(and (not linebreak?)
(eq? style 'left-right/beside-side-conditions)))
null
(list (inset sc 0 0 (- 5 (pict-width sc)) 0)
(blank)

View File

@ -1766,7 +1766,8 @@ label on each rule, but only in horizontal mode. Defaults to
'left-right/vertical-side-conditions
'up-down/vertical-side-conditions
'left-right/compact-side-conditions
'up-down/compact-side-conditions)]{
'up-down/compact-side-conditions
'left-right/beside-side-conditions)]{
This parameter controls the style used for typesetting
metafunctions. The @scheme['left-right] style means that the
@ -1781,7 +1782,11 @@ conditions each on a separate line, instead of all on the same line.
The @scheme['left-right/compact-side-conditions] and
@scheme['up-down/compact-side-conditions] variants move side
conditions to separate lines to avoid making the rendered form wider
than it would be otherwise.}
than it would be otherwise.
The @scheme['left-right/beside-side-conditions] variant is like
@scheme['left-right], except it puts the side-conditions on the
same line, instead of on a new line below the case.}
@defparam[metafunction-cases

View File

@ -9,8 +9,9 @@ v4.2.1
pattern matches are allowed, as long as the right-hand side
has the same value for each different pattern binding
* added metafunction styles 'up-down/compact-side-conditions and
'left-right/compact-side-conditions
* added metafunction styles 'up-down/compact-side-conditions,
'left-right/compact-side-conditions, and
'left-right/beside-side-conditions.
v4.2