サーチ…
前書き
ScribbleはRacketのドキュメントを作成するためのツールで、独自のパッケージをドキュメント化することもできます。公開されると、そのドキュメントはhttps://docs.racket-lang.org/に、主要なRacketのドキュメントとともに表示されます 。
Scribbleは、Racketプラットフォームの言語として実装されています。したがって、書類は通常、 #lang scribble/manual
で#lang scribble/manual
段落とセクション
#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.
パッケージによって提供されるバインディングの文書化
#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)}}]
}
経験則として、モジュール( (require foo/bar)
、つまりfoo/bar
)の右側に表示されるモジュールは、単一の.scribble
ファイルで文書化する必要があります。 .scribble
ファイルは、それぞれが別々の@section
文書化されている限り、いくつかのモジュールを文書化することができます。
Modified text is an extract of the original Stack Overflow Documentation
ライセンスを受けた CC BY-SA 3.0
所属していない Stack Overflow