use @verbatim{...}
svn: r8699 original commit: 9c7790971010d45b78b3322831da216f65256080
This commit is contained in:
parent
b2336626fa
commit
039d827424
|
@ -35,11 +35,9 @@ called from Scheme as
|
||||||
|
|
||||||
or with an @elem["@"] expression as
|
or with an @elem["@"] expression as
|
||||||
|
|
||||||
@verbatim[
|
@verbatim|{
|
||||||
#<<EOS
|
|
||||||
@title[#:tag "how-to"]{How to Design @italic{Great} Programs}
|
@title[#:tag "how-to"]{How to Design @italic{Great} Programs}
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
Although the procedures are mostly design to be used from @elem["@"]
|
Although the procedures are mostly design to be used from @elem["@"]
|
||||||
mode, they are easier to document in Scheme mode (partly because we
|
mode, they are easier to document in Scheme mode (partly because we
|
||||||
|
|
|
@ -36,7 +36,7 @@ Some functions @deftech{decode} a sequence of @scheme[_pre-flow] or
|
||||||
function accepts any number of @scheme[_pre-content] arguments, so
|
function accepts any number of @scheme[_pre-content] arguments, so
|
||||||
that in
|
that in
|
||||||
|
|
||||||
@verbatim[" @bold{``apple''}"]
|
@verbatim|{ @bold{``apple''}}|
|
||||||
|
|
||||||
the @litchar{``apple''} argument is decoded to use fancy quotes, and
|
the @litchar{``apple''} argument is decoded to use fancy quotes, and
|
||||||
then it is bolded.
|
then it is bolded.
|
||||||
|
|
|
@ -25,15 +25,14 @@ To document a collection or @|PLaneT| package:
|
||||||
@filepath{manual.scrbl}.}
|
@filepath{manual.scrbl}.}
|
||||||
|
|
||||||
@item{Start @filepath{manual.scrbl} like this:
|
@item{Start @filepath{manual.scrbl} like this:
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
@title{My Library}
|
@title{My Library}
|
||||||
|
|
||||||
Welcome to my documentation: @scheme[(list 'testing 1 2 3)].
|
Welcome to my documentation: @scheme[(list 'testing 1 2 3)].
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
The first line starts the file in ``text'' mode, and
|
The first line starts the file in ``text'' mode, and
|
||||||
introduces the @litchar["@"] syntax to use Scheme bindings.
|
introduces the @litchar["@"] syntax to use Scheme bindings.
|
||||||
|
@ -136,12 +135,11 @@ that precede text to typeset.
|
||||||
|
|
||||||
Thus,
|
Thus,
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
@title{My Library}
|
@title{My Library}
|
||||||
@scheme[(list 'testing 1 2 3)]
|
@scheme[(list 'testing 1 2 3)]
|
||||||
@section[#:tag "here"]{You Are Here}
|
@section[#:tag "here"]{You Are Here}
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
means
|
means
|
||||||
|
|
||||||
|
@ -191,7 +189,7 @@ preferred mechanism for linking to information outside of a single
|
||||||
document. Such links require no information about where and how a
|
document. Such links require no information about where and how a
|
||||||
binding is documented elsewhere:
|
binding is documented elsewhere:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme))
|
(for-label scheme))
|
||||||
|
@ -199,15 +197,14 @@ binding is documented elsewhere:
|
||||||
@title{My Library}
|
@title{My Library}
|
||||||
|
|
||||||
See also @scheme[list].
|
See also @scheme[list].
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
The @scheme[scheme] form typesets a Scheme expression for inline text,
|
The @scheme[scheme] form typesets a Scheme expression for inline text,
|
||||||
so it ignores the source formatting of the expression. The
|
so it ignores the source formatting of the expression. The
|
||||||
@scheme[schemeblock] form, in contrast, typesets inset Scheme code,
|
@scheme[schemeblock] form, in contrast, typesets inset Scheme code,
|
||||||
and it preserves the expression's formatting from the document source.
|
and it preserves the expression's formatting from the document source.
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme))
|
(for-label scheme))
|
||||||
|
@ -223,8 +220,7 @@ and it preserves the expression's formatting from the document source.
|
||||||
"I've tried so hard to explain!"))
|
"I've tried so hard to explain!"))
|
||||||
(nobody-understands-me "glorble snop")
|
(nobody-understands-me "glorble snop")
|
||||||
]
|
]
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
|
@ -238,7 +234,7 @@ hyperlink with text other than the section title.
|
||||||
|
|
||||||
The following example illustrates section hyperlinks:
|
The following example illustrates section hyperlinks:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme))
|
(for-label scheme))
|
||||||
|
@ -259,8 +255,7 @@ The following example illustrates section hyperlinks:
|
||||||
@section{Reprise}
|
@section{Reprise}
|
||||||
|
|
||||||
See @secref{chickens}.
|
See @secref{chickens}.
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
Since the page is so short, it the hyperlinks in the above example are
|
Since the page is so short, it the hyperlinks in the above example are
|
||||||
more effective if you change the @filepath{info.ss} file to add the
|
more effective if you change the @filepath{info.ss} file to add the
|
||||||
|
@ -278,7 +273,7 @@ prefix, which is based on the target document's main source file. The
|
||||||
following example links to a section in the PLT Scheme reference
|
following example links to a section in the PLT Scheme reference
|
||||||
manual:
|
manual:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme))
|
(for-label scheme))
|
||||||
|
@ -288,8 +283,7 @@ manual:
|
||||||
@title{My Library}
|
@title{My Library}
|
||||||
|
|
||||||
See also @italic{@secref[#:doc ref-src]{pairs}}.
|
See also @italic{@secref[#:doc ref-src]{pairs}}.
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
As mentioned in @secref{scheme-hyperlinks}, however, cross-document
|
As mentioned in @secref{scheme-hyperlinks}, however, cross-document
|
||||||
references based on @scheme[(require (for-label ....))] and
|
references based on @scheme[(require (for-label ....))] and
|
||||||
|
@ -313,7 +307,7 @@ to import the binding information of @filepath{helper.ss}. Then add a
|
||||||
binding with the module path as seen by a reader. Finally, use
|
binding with the module path as seen by a reader. Finally, use
|
||||||
@scheme[defproc] to document the procedure:
|
@scheme[defproc] to document the procedure:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme
|
(for-label scheme
|
||||||
|
@ -329,8 +323,7 @@ binding with the module path as seen by a reader. Finally, use
|
||||||
|
|
||||||
Replaces each @scheme['cow] in @scheme[lst] with
|
Replaces each @scheme['cow] in @scheme[lst] with
|
||||||
@scheme['aardvark].}
|
@scheme['aardvark].}
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
In @scheme[defproc], a contract is specified with each argument to the
|
In @scheme[defproc], a contract is specified with each argument to the
|
||||||
procedure. In this example, the contract for the @scheme[_lst]
|
procedure. In this example, the contract for the @scheme[_lst]
|
||||||
|
@ -386,13 +379,13 @@ bindings introduced into the document source by
|
||||||
from the previous section, then @filepath{helper.ss} must be imported both
|
from the previous section, then @filepath{helper.ss} must be imported both
|
||||||
via @scheme[require-for-label] and @scheme[require]:
|
via @scheme[require-for-label] and @scheme[require]:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
scribble/eval ; <--- added
|
scribble/eval ; <--- added
|
||||||
"helper.ss" ; <--- added
|
"helper.ss" ; <--- added
|
||||||
(for-label scheme
|
(for-label scheme
|
||||||
"helper.ss"))]
|
"helper.ss"))
|
||||||
|
|
||||||
@title{My Library}
|
@title{My Library}
|
||||||
|
|
||||||
|
@ -409,8 +402,7 @@ via @scheme[require-for-label] and @scheme[require]:
|
||||||
(my-helper '())
|
(my-helper '())
|
||||||
(my-helper '(cows such remarkable cows))
|
(my-helper '(cows such remarkable cows))
|
||||||
]}
|
]}
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
@;----------------------------------------
|
@;----------------------------------------
|
||||||
@section{Splitting the Document Source}
|
@section{Splitting the Document Source}
|
||||||
|
@ -423,7 +415,7 @@ as a sub-part of the enclosing part.
|
||||||
|
|
||||||
In @filepath{manual.scrbl}:
|
In @filepath{manual.scrbl}:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
|
@ -434,24 +426,22 @@ In @filepath{manual.scrbl}:
|
||||||
|
|
||||||
@include-section["cows.scrbl"]
|
@include-section["cows.scrbl"]
|
||||||
@include-section["aardvarks.scrbl"]
|
@include-section["aardvarks.scrbl"]
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
In @filepath{cows.scrbl}:
|
In @filepath{cows.scrbl}:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
@title{Cows}
|
@title{Cows}
|
||||||
|
|
||||||
Wherever they go, it's a quite a show.
|
Wherever they go, it's a quite a show.
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
In @filepath{aardvarks.scrbl}:
|
In @filepath{aardvarks.scrbl}:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual
|
@(require scribble/manual
|
||||||
(for-label scheme
|
(for-label scheme
|
||||||
|
@ -464,8 +454,7 @@ In @filepath{aardvarks.scrbl}:
|
||||||
|
|
||||||
Replaces each @scheme['cow] in @scheme[lst] with
|
Replaces each @scheme['cow] in @scheme[lst] with
|
||||||
@scheme['aardvark].}
|
@scheme['aardvark].}
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
@;----------------------------------------
|
@;----------------------------------------
|
||||||
@section{Multi-Page Sections}
|
@section{Multi-Page Sections}
|
||||||
|
@ -482,7 +471,7 @@ sub-sections.
|
||||||
|
|
||||||
Revising @filepath{cows.scrbl} from the previous section:
|
Revising @filepath{cows.scrbl} from the previous section:
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
|
@ -495,8 +484,7 @@ Revising @filepath{cows.scrbl} from the previous section:
|
||||||
|
|
||||||
@section{Dancing}
|
@section{Dancing}
|
||||||
See @secref["singing"].
|
See @secref["singing"].
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
To run this example, remember to change @filepath{info.ss} to add the
|
To run this example, remember to change @filepath{info.ss} to add the
|
||||||
@scheme['multi-page] style. You may also want to add a call to
|
@scheme['multi-page] style. You may also want to add a call to
|
||||||
|
|
|
@ -27,7 +27,7 @@ alone, but @litchar["@"] forms can escape to S-expression mode.
|
||||||
|
|
||||||
A module written as
|
A module written as
|
||||||
|
|
||||||
@verbatim[#<<EOS
|
@verbatim|{
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require scribble/manual)
|
@(require scribble/manual)
|
||||||
|
|
||||||
|
@ -37,8 +37,7 @@ A module written as
|
||||||
|
|
||||||
@bold{That} is the question.
|
@bold{That} is the question.
|
||||||
Whether 'tis nobler...
|
Whether 'tis nobler...
|
||||||
EOS
|
}|
|
||||||
]
|
|
||||||
|
|
||||||
reads as
|
reads as
|
||||||
|
|
||||||
|
|
|
@ -201,11 +201,11 @@ following spaces (or tabs) are part of the comment (similar to
|
||||||
Tip: if you're editing in a Scheme-aware editor (like DrScheme or
|
Tip: if you're editing in a Scheme-aware editor (like DrScheme or
|
||||||
Emacs), it is useful to comment out blocks like this:
|
Emacs), it is useful to comment out blocks like this:
|
||||||
|
|
||||||
@verbatim["
|
@verbatim|{
|
||||||
@;{
|
@;{
|
||||||
...
|
...
|
||||||
;}
|
;}
|
||||||
"]
|
}|
|
||||||
|
|
||||||
so the editor does not treat the file as having unbalanced
|
so the editor does not treat the file as having unbalanced
|
||||||
parenthesis.
|
parenthesis.
|
||||||
|
|
|
@ -57,14 +57,14 @@ when using @scheme[scheme], especially outside of @scheme[defproc] or
|
||||||
@scheme[defform]. Prefix a meta-variable with @litchar{_}; for
|
@scheme[defform]. Prefix a meta-variable with @litchar{_}; for
|
||||||
example,
|
example,
|
||||||
|
|
||||||
@verbatim[" @scheme[(rator-expr rand-expr ...)]"]
|
@verbatim|{ @scheme[(rator-expr rand-expr ...)]}|
|
||||||
|
|
||||||
would be the wrong way to refer to the grammar of a function call,
|
would be the wrong way to refer to the grammar of a function call,
|
||||||
because it produces @scheme[(rator-expr rand-expr ...)], where
|
because it produces @scheme[(rator-expr rand-expr ...)], where
|
||||||
@schemeidfont{rator-expr} and @schemeidfont{rand-expr} are
|
@schemeidfont{rator-expr} and @schemeidfont{rand-expr} are
|
||||||
typeset as variables. The correct description is
|
typeset as variables. The correct description is
|
||||||
|
|
||||||
@verbatim[" @scheme[(_rator-expr _rand-expr ...)]"]
|
@verbatim|{ @scheme[(_rator-expr _rand-expr ...)]}|
|
||||||
|
|
||||||
which produces @scheme[(_rator-expr _rand-expr ...)], where
|
which produces @scheme[(_rator-expr _rand-expr ...)], where
|
||||||
@schemeidfont{rator-expr} @schemeidfont{rand-expr} are typeset as
|
@schemeidfont{rator-expr} @schemeidfont{rand-expr} are typeset as
|
||||||
|
|
Loading…
Reference in New Issue
Block a user