But a block of text does not always turn into a single argument, so I'm not sure how to do what you ask.
Robby On Sun, Jun 9, 2013 at 7:05 PM, Matthew Butterick <mb.list.a...@gmail.com>wrote: > Semantically, "an operation [in Scribble] doesn’t care whether it’s used > with [...] or {...}." Therefore, it would be useful if Scribble expressions > were not syntactically limited to the form @ ‹cmd› [ ‹datum›* ] { > ‹text-body› }, and instead allowed text-mode and racket-mode arguments to > be freely & indefinitely sequenced. > > What I've found using Scribble is that many of the functions one writes > are, of course, intended to operate on a text argument. So the text-mode > argument naturally wants to come first in the function: > > @cross-ref{This text} > > Now, suppose I want to add an optional second argument. The natural place > for this optional argument would be after the first: > > @cross-ref{This text}["where.html"] > > or > > @cross-ref{This text){where.html} > > But AFAIK, Scribble forbids these patterns. So I might try this: > > @cross-ref["where.html"]{This text} > > But that doesn't work either, because the cross-ref function expects the > target text to be in the first position. So either I must forego idiomatic > Scribble expressions altogether: > > @(cross-ref "This text" "where.html") > > Or use a keyword argument: > > @cross-ref[#:destination "where.html"]{This text} > > As a workaround, that's OK. But at this point, Scribble is reaching up > into my code and starting to impose design restrictions (namely, keyword > arguments) that have ripple effects elsewhere. > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users