Commit Graph

8 Commits

Author SHA1 Message Date
sorawee
cbeee2d388
Add racketoptionalfont
Scribble used to support a custom style for optional brackets.
In particular, the optional brackets will be given the `'paren-shape`
of value `#\?`[1], and the CSS class `opt-color` will be tagged
to these brackets.

Later, Scribble supports the curry notation. Its implementation
no longer uses `'paren-shape` to indicate optional brackets.
Unfortunately, it accidentally dropped the `opt-color` tagging[2].

This PR restores the original behavior by tagging the class
`opt-color` to optional brackets. It also adds `racketoptionalfont`
so that Scribble users can typeset optional brackets.
Lastly, it cleans up the code that supports the `'paren-shape` of value
`#\?`, since it is effectively a deadcode.

Note that this PR does _not_ change any CSS styling, so there's no
visible change. It would make CSS styling customization easier, however.

[1]: 9b7993ea02 (diff-017add06555fc85fa3ae5f27a3eb52cbR253)
[2]: https://github.com/racket/scribble/commit/95ecb101d1cc61d212c4d520#diff-017add06555fc85fa3ae5f27a3eb52cbR879
2020-08-21 09:01:57 -06:00
Robby Findler
5415cca336 add a contract to places that use the #:kind argument (including defthing)
closes #259
2020-08-13 10:30:19 -05:00
Matthew Flatt
50862d0132 fix typesetting for curried procedures
The indentation for multi-line typesetting is weird, because it still
uses the table-basd layout that lines up all arguments independent of
nesting. But at least the parentheses are not broken.

Relevant to #211
2019-09-21 17:56:55 -06:00
Ben Greenman
457d3f9a3f fix: *defthing 'names'
Change `defthing` so it always passes a `(listof (or/c #f symbol?))`
 as the fourth argument to `*defthing`.
2018-03-31 14:32:16 -04:00
Ben Greenman
e2ea830361 defthing: use #:id expression instead of 'id'
Change implementation of `defthing` so that if the user gives an
`id-expr` via the `#:id` keyword, then `defthing` never uses the default
`id`.
2018-03-31 00:25:34 -04:00
Ben Greenman
d92b1829d5 defstruct: no newline between name & fields if no fields
If a struct has no fields, don't check if a struct's name + first field's name
are too long to print on one line

Bug report: https://groups.google.com/forum/#!topic/racket-users/6fKGky4tud8
2017-03-15 13:05:56 -04:00
Matthew Flatt
a8024d16ed fix alignment of contracts for PDF output 2015-02-10 12:21:27 -07:00
Sam Tobin-Hochstadt
a316fc12c0 Remove extra directories. 2014-12-02 00:54:52 -05:00