Skribilo supports traditional cross-references (that is, references to some part of documents) and hyperlinks (that is, visual marks enriching texts that enable interactive browsing). Hyperlinks and references may point to:
The
mark
function sets a mark in the produced document
that can be referenced to with the
ref
function. Unless a
:text
option is specified, no visible text
in associated with the mark in the generated document.
(
mark [
:text
] [
:class
"mark"
] [
:ident
]
mark
)
mark
A string that will be used in a
ref function call to point to that mark.
The Skribe functions
chapter
,
section
,
subsection
,
subsubsection
Skribe automatically set a mark whose value is the title of the section.
The Skribe function
figure
automatically sets a mark whose value is the legend of the figure.
Skribilo proposes a single function that can be used for most references.
This same
ref
function is used for introducing references to
section, to bibliographic entries, to source code line number, etc.
(
ref [
:sort-bib-refs
bib-sort-refs/number
] [
:page
] [
:skribe
] [
:line
] [
:handle
] [
:mark
] [
:figure
] [
:url
] [
:bib-table
(*bib-table*)
] [
:bib
] [
:subsubsection
] [
:subsection
] [
:section
] [
:chapter
] [
:text
] [
:ident
] [
:class
]
)
(ref :bib
'("smith81:disintegration" "corgan07:zeitgeist"))
,
this should be a two-argument procedure suitable
for sorting. The default procedure sorts references
by number, when
the-bibliography
uses
the
number
labeling style. If it is
#f
, then references will not be sorted.
Sometimes, it is useful to produce phrases that refer a section by
its number, as in ``See Section 2.3''. This is especially useful on
printed documents, as produced by the Lout and LaTeX engines. The
numref
markup is provided to that end:
(
numref [
:class
] [
:separator
"."
] [
:page
] [
:text
""
] [
:ident
]
)
ref
.[ This hyperlink points to the ,( ref :figure "The great Penguin" :text "figure" ) of the chapter ,( ref :chapter "Standard Markups" ) (or also, the ,( ref :ident "std-markups" :text "chapter" ) about markups). In the second example of reference, no ,( code ":text" ) option is specified: ,( ref :figure "The great Penguin" ). One may use the ,(param ":ident" ) field when specified such as: ,( ref :ident "fig1" ) or ,( ref :figure "fig1" ). ,( linebreak ) That other one points to a well known ,( ref :url "http://slashdot.org/" :text "url" ). The same without ,( code ":text" ) : ,( ref :url "http://slashdot.org/" ). ,( linebreak ) And one can also refer to sections by number, as in ``see ,(numref :text [ Wonderful Section ] :ident "refs" )''. ,( linebreak ) With more complex tricks that are explained in Section ,( ref :section "Resolve" ), it is also possible use, for the text of the reference, a container number such as chapter: ,( resolve ( lambda (n e env) ( let ((s (find1-down ( lambda (x) (and (is-markup? x 'chapter) (string=? (markup-option x :title ) "Standard Markups" ))) (ast-document n)))) ( ref :handle ( handle s) :text (markup-option s :number ))))). ]
... produces:
:text
option is specified:
1. One may use the :ident
field when specified such as:
fig1 or
.
:text
:
http://slashdot.org/.
The
mailto
function is mainly useful for electronic
output formats that are able to run a mailing agent. The function
mailto
introduces mail annotation in a Skribe document.
(
mailto
:text
[
:class
"mailto"
] [
:ident
]
email
)
email
The electronic address.... produces:
:text
options:
foo@nowhere.com
.
A
Skribe URL Index (henceforth SUI) describes the marks
that are available in a Skribe or Skribilo document. It is to be used
to make marks available to other Skribe/Skribilo documents through the
:skribe
option of the
ref
markup. The syntax
of a SUI file is:
<sui> --> (skribe-url-index <title> :file <file-name> (marks <sui-ref>*) (chapters <sui-ref>*) (section <sui-ref>*) (subsection <sui-ref>*) (subsubsection <sui-ref>*)) <sui-ref> --> (<string> :file <file-name> :mark <string>)
SUI files can be automatically produced by the Skribilo compiler. For instance, in order to produce the SUI file of this user manual, one should set the emit-sui HTML custom to #t; a user.sui file will then be produced when the manual is compiled to HTML:
skribilo -t html -o user.html user.skb