racket
Griffonner
Recherche…
Introduction
Scribble est l'outil utilisé pour créer la documentation de Racket , et vous pouvez également documenter vos propres packages! Une fois publiées, leur documentation apparaîtra sur https://docs.racket-lang.org/ , à côté de la documentation principale de Racket.
Scribble est implémenté en tant que langage pour la plate-forme Racket. Les documents à gribouiller commencent généralement par #lang scribble/manual
Paragraphes et sections
#lang scribble/manual
@section{Introduction}
First paragraph. Some text, some text, some text,
some text, some text, some text.
@section{More stuff}
@subsection{This is a subsection}
Second paragraph. More text, more text, more text,
more text, more text, more text.
Documenter une liaison fournie par un package
#lang scribble/manual
@; Make sure that code highlighting recognises identifiers from my-package:
꩜require[@for-label[my-package]]
@; Indicate which module is exporting the identifiers documented here.
@defmodule[my-package]
@defproc[(my-procedure [arg1 number?] [arg2 string?]) symbol?]{
The @racket[my-procedure] function repeats the @racket[arg2] string
@racket[arg1] times, and transforms the result into a symbol.
@history[#:added "1.0"
#:changed "1.1" @elem{Improved performance,
from @tt{O(n²)} to @tt{O(n)}}]
}
En règle générale, un module (quelque chose qui pourrait apparaître à la droite de (require foo/bar)
, à savoir foo/bar
) devrait être documenté par un seul fichier .scribble
. Un fichier .scribble
peut documenter plusieurs modules, à condition que chacun soit documenté dans une @section
distincte.
Modified text is an extract of the original Stack Overflow Documentation
Sous licence CC BY-SA 3.0
Non affilié à Stack Overflow