1

I want to make some documentation about a project I'm making and I want to make it using #lang scribble/manual.

Since I have some user-defined procedures I would like to make my manual look like this, what I mean is the blue procedure/syntax square in the manual.

How can I do something like that?

Thank you!

David Merinos
  • 1,195
  • 1
  • 14
  • 36

1 Answers1

1

You can use Scribble forms like defproc, defform, etc. to define these "blue box" blocks in the documentation.

The relevant doc pages for those forms have examples which show their use, so I'll just copy one of the examples from the docs which might help you get started:

@defproc[(make-sandwich [ingredients (listof ingredient?)])
         sandwich?]{
  Returns a sandwich given the right ingredients.
}

The docs for defproc are here. There are examples for the other forms further down the page.

You may also want to read the following guide to documenting Racket libraries: http://docs.racket-lang.org/scribble/how-to-doc.html

Asumu Takikawa
  • 8,447
  • 1
  • 28
  • 43
  • This works, however i'm getting a red line under listof where I should've a link to the racket docs. I think I'm missing something again but I don't know what. This documentation documentation of racket is very confusing ! ! – David Merinos Dec 11 '14 at 02:14
  • You are probably missing a `(require (for-label ))` somewhere. Either that or you need to supply cross-reference arguments to `scribble`. See [this page](http://docs.racket-lang.org/scribble/running.html#%28part._xref-flags%29) (try the `+m` flag). You don't have to specify cross-reference info if you set up the documentation to be built automatically for your package (the guide I linked describes how to do this). – Asumu Takikawa Dec 11 '14 at 03:33
  • Thank you, I runned `scribble --htmls ++main-xref-in ` and it worked. – David Merinos Dec 11 '14 at 21:23