On this page:
2.2.1 Title and Sections
title
section
subsection
subsubsection
subsubsub_  section
include_  section
2.2.2 Flow Blocks
para
nested
centered
margin_  note
margin_  note_  block
Margin  Side
Margin  Side.left
Margin  Side.right
itemlist
item
verbatim
tabular
2.2.3 Elements
elem
italic
bold
emph
tt
subscript
superscript
smaller
larger
literal
2.2.4 Images
image
2.2.5 Spacing
linebreak
nonbreaking
hspace
#{~}
#{~-~}
#{?-}
#{._  }
#{._  _  }
2.2.6 Hyperlinks
hyperlink
url
secref
Secref
seclink
docref
elemtag
elemref
2.2.7 Indexing
index
as_  index
section_  index
index_  section
2.2.8 Table of Contents
table_  of_  contents
local_  table_  of_  contents
8.15.0.2

2.2 Document Constructors🔗ℹ

2.2.1 Title and Sections🔗ℹ

function

fun title(~tag: tag :: maybe(TagSuffix) = #false,

          ~tag_prefix: tag_prefix :: maybe(TagPrefix) = #false,

          ~style: style :: maybe(StyleLike) = #false,

          ~version: vers :: maybe(String) = #false,

          ~date: date :: maybe(String) = #false,

          ~index_extras: index_extras :: ExtrasMap = {},

          pre_content :: PreContent)

Declares a title for the document. In the main module of a document, this title is the overall title of the document. In a section included via include_section, it is the name of the section.

function

fun section(~tag: tag :: maybe(TagSuffix) = #false,

             ~tag_prefix: tag_prefix :: maybe(TagPrefix) = #false,

             ~style: style :: maybe(StyleLike) = #false,

             ~index_extras: index_extras :: ExtrasMap = {},

             pre_content :: PreContent)

  :: PartDecl

Declares a section at a level nested below title.

function

fun subsection(~tag: tag :: maybe(TagSuffix) = #false,

             ~tag_prefix: tag_prefix :: maybe(TagPrefix) = #false,

             ~style: style :: maybe(StyleLike) = #false,

             ~index_extras: index_extras :: ExtrasMap = {},

             pre_content :: PreContent)

  :: PartDecl

 

function

fun subsubsection(~tag: tag :: maybe(TagSuffix) = #false,

             ~tag_prefix: tag_prefix :: maybe(TagPrefix) = #false,

             ~style: style :: maybe(StyleLike) = #false,

             ~index_extras: index_extras :: ExtrasMap = {},

             pre_content :: PreContent)

  :: PartDecl

 

function

fun subsubsub_section(~tag: tag :: maybe(TagSuffix) = #false,

             ~tag_prefix: tag_prefix :: maybe(TagPrefix) = #false,

             ~style: style :: maybe(StyleLike) = #false,

             ~index_extras: index_extras :: ExtrasMap = {},

             pre_content :: PreContent)

  :: PartDecl

Declares sections as further nesting levels. By the subsubsub_section level, the result is simply a paragraph that renders as an unnumbered section header.

definition

include_section(module_path)

Makes the document at module_path a section of the enclosing document, where the module_path section hierarchy is effectively shifted to more nested my one layer. That is, title within module_path corresponds to a section written in the document where include_section is used, section corresponds to subsection, and so on.

2.2.2 Flow Blocks🔗ℹ

function

fun para(~style: style :: maybe(StyleLike) = #false,

         pre_content :: PreContent) :: FlowBlock

function

fun nested(~style: style :: maybe(StyleLike) = #false,

           pre_flow :: PreFlow) :: FlowBlock

function

fun centered(pre_flow :: PreFlow) :: FlowBlock

function

fun margin_note(~at: at :: MarginSide = #'right,

                pre_content :: PreContent)

  :: Element

 

function

fun margin_note_block(~at: at :: MarginSide = #'right,

                      pre_flow :: PreFlow)

  :: FlowBlock

 

enumeration

enum MarginSide:left

  right

function

fun itemlist(~style: style :: maybe(StyleLike) = #false,

             item :: Item,

             ...)

  :: FlowBlock

 

function

fun item(pre_flow :: PreFlow) :: Item

function

fun verbatim(~indent: indent :: NonnegInt = 0,

             [content :: Content, ...])

  :: FlowBlock

function

fun tabular(cells :: List.of(List.of(Cell)),

            ~style: style :: maybe(StyleLike) = #false,

            ~sep: sep :: maybe(FlowBlock || Content) = #false,

            ~column_properties: col_props :: List = [],

            ~row_properties: row_props :: List = [],

            ~cell_properties: cell_props :: List.of(List) = [],

            ~sep_properties: sep_props :: maybe(List) = #false)

  :: FlowBlock

2.2.3 Elements🔗ℹ

function

fun elem(~style: style :: maybe(StyleLike) = #false,

         pre_content :: PreContent) :: Element

Constructs an Element with a specific style.

function

fun italic(pre_content :: PreContent) :: Element

 

function

fun bold(pre_content :: PreContent) :: Element

 

function

fun emph(pre_content :: PreContent) :: Element

 

function

fun tt(pre_content :: PreContent) :: Element

 

function

fun subscript(pre_content :: PreContent) :: Element

 

function

fun superscript(pre_content :: PreContent) :: Element

 

function

fun smaller(pre_content :: PreContent) :: Element

 

function

fun larger(pre_content :: PreContent) :: Element

Element constructors that adjust the given pre-content to change its rendered style.

function

fun literal(str :: String || List.of(String)) :: Element

Constructs an element with a string to be used literally, as opposed to decoding as usual for PreContent.

2.2.4 Images🔗ℹ

function

fun image(path :: Path,

          ~scale: scale :: Real = 1.0,

          ~suffixes: suffixes :: List.of(String) = [],

          ~style: style :: maybe(StyleLike) = #false,

          pre_content :: PreContent = [])

  :: Element

Converts an image from a file into a Scribble element.

An image constructed with the pict library can also be used in a Scribble document, so use functions from that library to construct an image on the fly.

2.2.5 Spacing🔗ℹ

function

fun linebreak() :: Element

function

fun nonbreaking(pre_content :: PreContent) :: Element

function

fun hspace(n :: NonnegInt) :: Element

value

def #{~} :: Element

 

value

def #{~-~} :: Element

 

value

def #{?-} :: Element

 

value

def #{._} :: Element

 

value

def #{.__} :: Element

Constants for find-grained control of spacing and word breaks:

2.2.6 Hyperlinks🔗ℹ

function

fun hyperlink(url :: String,

              pre_content :: PreContent,

              ~underline: underline = #true,

              ~style: style :: maybe(Style || String || Symbol) = (if underline

                                                                   | #false

                                                                   | "plainlink"))

  :: Element

 

function

fun url(dest :: String) :: Element

function

fun secref(tag :: String,

           ~doc: module_path :: maybe(ModulePath) = #false,

           ~tag_prefixes: prefixes :: maybe(List.of(String)) = #false,

           ~underline: underline = #true,

           ~ref_style: ref_style :: maybe(LinkRenderStyle) = #false)

  :: Element

 

function

fun Secref(tag :: String,

           ~doc: module_path :: maybe(ModulePath) = #false,

           ~tag_prefixes: prefixes :: maybe(List.of(String)) = #false,

           ~underline: underline = #true,

           ~ref_style: ref_style :: maybe(LinkRenderStyle) = #false)

  :: Element

 

function

fun seclink(tag :: String,

            ~doc: module_path :: maybe(ModulePath) = #false,

            ~tag_prefixes: prefixes :: maybe(List.of(String)) = #false,

            ~underline: underline = #true,

            ~indirect: indirect = #false,

            pre_content :: Content = [])

  :: Element

 

function

fun docref(module_path :: ModulePath,

           ~underline: underline = #true,

           ~indirect: indirect :: (False || Content) = #false)

  :: Element

function

fun elemtag(t :: (Taglet || GeneratedTag),

            pre_content :: Content)

  :: Element

 

function

fun elemref(t :: (Taglet || GeneratedTag),

            pre_content :: Content,

            ~underline: underline = #true)

  :: Element

2.2.7 Indexing🔗ℹ

function

fun index(words :: (String ||  List.of(String)),

          ~content: content :: (String ||  List.of(String)) = words,

          ~extras: extras :: ExtrasMap = {},

          pre_content :: PreContent)

  :: Element

 

function

fun as_index(pre_content :: PreContent,

             ~extras: extras :: ExtrasMap = {}) :: Element

function

fun section_index(~extras: extras :: ExtrasMap = {},

                  word :: String, ...)

function

fun index_section(~tag : tag :: (False || String) = "doc-index")

  :: Part

2.2.8 Table of Contents🔗ℹ

function

fun table_of_contents() :: FlowBlock

 

function

fun local_table_of_contents(~style: style :: maybe(StyleLike) = #false)

  :: FlowBlock