Поиск…
Вступление
Scribble - это инструмент, используемый для создания документации Racket , и вы можете документировать свои собственные пакеты вместе с ним! Когда они будут опубликованы, их документация появится на https://docs.racket-lang.org/ вместе с основной документацией Racket.
Scribble реализуется как язык платформы Racket. Поэтому документы Scribble обычно начинаются с #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