
I’m writing a Scribble document (scribble/manual
) and would like to highlight @racket[curry]
as a link. If I use @racket[append]
(for example), it’s formatted as a link to the reference manual. On the other hand, @racket[curry]
is formatted in a non-proportional font, but not as a link to the reference manual.
I guess the difference comes from append
being in racket/base
, but curry
only in racket/function
. However, I had hoped that putting racket/function
in the require
at the top of the Scribble document, like @(require
racket/function
racket/list
racket/match
scribble/example
(for-label racket/base))
would be enough, but seemingly it isn’t.

You need to require racket/function
for-label
(like you did racket/base
).

Thank you!
@(require
racket/function
racket/list
racket/match
scribble/example
(for-label racket/base)
(for-label racket/function))
actually works. (I still need the racket/function
without for-label
for other purposes.)

You’re welcome. for-label
takes one or more require specs, so you could also have written (for-label racket/base racket/function)
.

I just saw that when I checked the documention of for-label
after your first reply. :slightly_smiling_face:

Is there a more robust way to link to a function’s documentation instead of something like @hyperlink["<https://docs.racket-lang.org/reference/procedures.html#%28def._%28%28lib._racket%2Ffunction..rkt%29._curry%29%29>"]{curry}
? We have sec-ref
for linking to sections; is there something like that for functions (and forms)?

Here’s a little example that seems to work right. Can you tell what might be different in your case?
#lang scribble/manual
@(require scribble/example)
@examples[
(struct posn (x y)
#:transparent
#:methods gen:custom-write
[(define (write-proc p out mode)
(fprintf out "POINT[~a, ~a]" (posn-x p) (posn-y p)))])
(posn 1 2)
]

Just to make sure, this was covered by the answer about @racket[curry]
, right? That is, @racket[curry]
(with a suitable for-label
) is the intended way to link to the documentation.

Oops, you’re right. I can use that in the context where I need it. :blush:

That did not fix the problem for me.

oh no… :disappointed:

I think I found the problem. It’s sometimes running the script with the interactions window focused, so the text goes there.

Ohhh, that should be an easy fix, thank you!

Can you try adding (send (send drr get-definitions-canvas) focus)
right after the new (poll-until ...)
line please?

I wonder if one is enough, or if I need to add a few more ones a few lines below.

how much many requests per second does the racket sever handle? the one built by Dr. McCarthy

It definitely depends on what you’re doing but I would expect that you could do many requests per second. Recent benchmarks had sub-millisecond response times on average