The geneva Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The geneva Reference Manual

This is the geneva Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:44:27 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Open Geneva

Geneva is the portable document preparation system. It follows the principle Write once, read anywhere. Geneva enables the creation and archival of truly portable documents by isolating document content and structure from document presentation.

Geneva achieves this by introducing a generic but well defined document structure independent from its stored representation. In addition to classic document features such as paragraphs, listings, sections, tables and text markup, Geneva defines a generic media type for embedding arbitrary content and enable extensibility in a plug-in oriented way.

Open Geneva is the reference implementation of Geneva written in Common Lisp. It implements Geneva and defines a diverse toolchain composed of input interfaces and presentation backends. Its input interfaces, such as the plain text oriented Mk2 markup language and the Geneva API, are user and programmer facing frontends to document authoring. Its presentation backends render documents to several targets including web, print and plain text media.

Documentation

Dependencies


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 geneva

Author

Max Rottenkolber <max@mr.gy>

License

GNU AGPL

Description

Core of the Geneva document preparation system. Provides data structures and syntax sugar.

Dependencies
Source

geneva.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 geneva.asd

Location

geneva.asd

Systems

geneva (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 geneva/geneva.lisp

Parent

geneva (system)

Location

geneva.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 geneva/normalize.lisp

Dependency

geneva.lisp (file)

Parent

geneva (system)

Location

normalize.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 geneva/struct.lisp

Dependency

geneva.lisp (file)

Parent

geneva (system)

Location

struct.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 geneva/macros.lisp

Dependencies
Parent

geneva (system)

Location

macros.lisp

Exported Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.6 geneva/syntax.lisp

Dependencies
Parent

geneva (system)

Location

syntax.lisp

Exported Definitions

syntax (special variable)

Internal Definitions

make-markup-reader (function)


Previous: , Up: Lisp files   [Contents][Index]

3.1.7 geneva/utilities.lisp

Dependencies
Parent

geneva (system)

Location

utilities.lisp

Packages

geneva.utilities

Exported Definitions
Internal Definitions

document-index-2 (function)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 geneva.macros

Macros and reader macros to help with procedural creation of Geneva documents.

Source

geneva.lisp (file)

Use List
Exported Definitions
Internal Definitions

make-markup-reader (function)


Next: , Previous: , Up: Packages   [Contents][Index]

4.2 geneva

Geneva core package. Exports functions to programatically create
and inspect _Geneva documents_.

In Open Geneva a _document_ is represented as a _list_ of _document elements_. A _document element_ can be obtained using the element constructors {make-paragraph}, {make-listing}, {make-table}, {make-media} and {make-section}. In order to ensure integrity, it is recommended to use {make-document} to produce _documents_.

_Rich text_ is represeted as a _list_ of _text tokens_. A _text token_ may be a _string_ or an object obtained using the text token constructors {make-bold}, {make-italic}, {make-fixed-width} and {make-url}.

_Document elements_ and _text tokens_ can be inspected using the readers {content-type} and {content-values}.

_Documents_ and _document elements_ are printable and readable using the Common Lisp printer and reader.

*Exceptional Situations:*

All functions external to this _package_ validate their parameters and will signal an _error_ of _type_ {type-error} on mismatch.

*See Also:*

+ [Geneva Document Specification](geneva-document.html)
+ [Open Geneva User Manual](open-geneva.html)

Source

geneva.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.3 geneva.utilities

Shared utility functions used by various components of Geneva.

Source

utilities.lisp (file)

Use List
Exported Definitions
Internal Definitions

document-index-2 (function)


Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *default-index-caption*

Default caption for indexes.

Package

geneva.utilities

Source

utilities.lisp (file)

Special Variable: *index-headers-p*

Controls wether headers are numbered.

Package

geneva.utilities

Source

utilities.lisp (file)

Special Variable: *index-p*

Controls wether an index is rendered.

Package

geneva.utilities

Source

utilities.lisp (file)

Special Variable: syntax

*Description:*

Readtable containing reader macros for markup literals. Defines {#B}, {#I}, {#F} and {#U} to be expanded to code generating Geneva markup at read-time using _make-bold_, _make-italic_, _make-fixed-width_ and _make-url_ respectively.

*Notes:*

This readtable is registered as _geneva.macros:syntax_. In
order to use it invoke {named-readtable}’s {in-readtable} like so:

#code#
(in-readtable geneva.macros:syntax)
#

*Examples:*

#code#
#b"bold string" ≡ (geneva:make-bold "bold string")
#i"italic string" ≡ (geneva:make-italic "italic string") #f"fixed-width string" ≡ (geneva:make-fixed-width "fixed-width string") #u"url string" ≡ (geneva:make-url "url string")
#

*See Also:*

+ Named-Readtables ({editor-hints.named-readtables})

Package

geneva.macros

Source

syntax.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: document &rest CONTENT

*Arguments and Values:*

_document_—_forms_ which evaluate to Geneva _elements_.

*Description:*

{section} returns a Geneva _docuent_ with _content_ as if by {geneva:make-document}.

*Notes:*

#code#
(document {content}*) ≡ (make-document (list {content}*)) #

Package

geneva.macros

Source

macros.lisp (file)

Macro: listing &rest ITEMS

*Arguments and Values:*

_items_—_forms_ which evaluate to Geneva _rich text_.

*Description:*

{listing} returns a Geneva listing of _items_ as if by {geneva:make-listing}.

*Notes:*

#code#
(listing {items}*) ≡ (make-listing (list {items}*)) #

Package

geneva.macros

Source

macros.lisp (file)

Macro: media (&rest DESCRIPTION) URL

*Arguments and Values:*

_description_—_forms_ which evaluate to Geneva _text tokens_.

_url_—a _form_ which evaluates to a _string_ designating an URL.

*Description:*

{media} returns a Geneva _media element_ for _url_ with _description_ as if by {geneva:make-media}.

*Notes:*

#code#
(media ({description}*) {url})
≡ (make-media (list {description}*) {url})
#

Package

geneva.macros

Source

macros.lisp (file)

Macro: paragraph &rest TEXT

*Arguments and Values:*

_text_—_forms_ which evaluate to Geneva _text tokens_.

*Description:*

{paragraph} returns a Geneva paragraph made up of _text_ as if by {geneva:make-paragraph}.

*Notes:*

#code#
(paragraph {text}*) ≡ (make-paragraph (list {text}*))
#

Package

geneva.macros

Source

macros.lisp (file)

Macro: plaintext (&rest DESCRIPTION) PLAINTEXT

*Arguments and Values:*

_description_—_forms_ which evaluate to Geneva _text tokens_.

_plaintext_—a _form_ which evaluates to a _string_.

*Description:*

{plaintext} returns a Geneva _plaintext element_ for _plaintext_ with _description_ as if by {geneva:make-plaintext}.

*Notes:*

#code#
(plaintext ({description}*) {plaintext})
≡ (make-plaintext (list {description}*) {plaintext})
#

Package

geneva.macros

Source

macros.lisp (file)

Macro: section (&rest HEADER) &rest CONTENT

*Arguments and Values:*

_header_—_forms_ which evaluate to Geneva _text tokens_.

_content_—_forms_ which evaluate to Geneva _elements_.

*Description:*

{section} returns a Geneva _section element_ with _header_ and _content_ as if by {geneva:make-section}.

*Notes:*

#code#
(section ({header}*) {body}*)
≡ (make-section (list {header}*) (list {body}*))
#

Package

geneva.macros

Source

macros.lisp (file)

Macro: table (&rest DESCRIPTION) &rest ROWS

*Arguments and Values:*

_description_—_forms_ which evaluate to Geneva _text tokens_.

_rows_—a list of column lists containing _forms_ which evaluate to Geneva _text tokens_.

*Description:*

{table} returns a Geneva table with _rows_ and _description_ as if by {geneva:make-table}.

*Examples:*

#code#
(table ("10° Celsius in various units.")
(("Fahrenheit") ((prin1-to-string (+ (* 1.8 10) 32)))) (("Kelvin") ((prin1-to-string (+ 10 273.15)))))
≡ (make-table (list "10° Celsius in various units.")
(list (list "Fahrenheit")
(list (prin1-to-string (+ (* 1.8 10) 32)))) (list (list "Kelvin")
(list (prin1-to-string (+ 10 273.15)))))
#

Package

geneva.macros

Source

macros.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: align-string STRING ALIGNMENT &optional COLUMNS

Return aligned copy of STRING with respect to COLUMNS. Possible values for ALIGNMENT are :RIGHT and :CENTER.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: content-type CONTENT

*Arguments and Values:*

_content_—an _element_ or a _text token_.

*Description*:

{content-type} returns a _keyword_ denoting the type of _content_ which may be one of {:paragraph}, {:listing}, {:table}, {:plaintext}, {:media}, {:section}, {:plain}, {:bold}, {:italic}, {:fixed-width} or {:url}.

Package

geneva

Source

struct.lisp (file)

Function: content-values CONTENT

*Arguments and Values:*

_content_—an _element_ or a _text token_.

*Description*:

{content-values} returns the components of _content_. The returned values are the _normalized_ forms of their respective content constructor’s arguments and therefore depend on the type of _content_.

Package

geneva

Source

struct.lisp (file)

Function: descend-level LEVEL

Returns the next deeper LEVEL.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: document-index DOCUMENT

Returns section hierarchy on DOCUMENT.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: incf-level LEVEL

Increment LEVEL by one.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: level-string LEVEL

Return string representation for LEVEL.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: make-bold STRING

*Arguments and Values:*

_string_—a _string_.

*Description*:

{make-bold} returns a _text token_ of type {:bold} for _string_.

Package

geneva

Source

struct.lisp (file)

Function: make-document ELEMENTS

*Arguments and Values:*

_elements_—a _list_ of _document elements_.

*Description*:

{make-document} returns a _document_ consisting of _elements_.

Package

geneva

Source

struct.lisp (file)

Function: make-fixed-width STRING

*Arguments and Values:*

_string_—a _string_.

*Description*:

{make-fixed-width} returns a _text token_ of type {:fixed-width} for _string_.

Package

geneva

Source

struct.lisp (file)

Function: make-italic STRING

*Arguments and Values:*

_string_—a _string_.

*Description*:

{make-italic} returns a _text token_ of type {:bold} for _string_.

Package

geneva

Source

struct.lisp (file)

Function: make-listing ITEMS

*Arguments and Values:*

_items_—a _list_ of _rich text_ sequences.

*Description*:

{make-listing} returns a _document element_ of type {:listing} with _items_.

Package

geneva

Source

struct.lisp (file)

Function: make-media DESCRIPTION URL

*Arguments and Values:*

_description_—a _rich text_ sequence.

_url_—a _string_.

*Description*:

{make-media} returns a _document element_ of type {:media} with _description_ and _url_.

Package

geneva

Source

struct.lisp (file)

Function: make-paragraph TEXT

*Arguments and Values:*

_text_—a _rich text_ sequence.

*Description*:

{make-paragraph} returns _document element_ of type {:paragraph} with _text_.

Package

geneva

Source

struct.lisp (file)

Function: make-plaintext DESCRIPTION PLAINTEXT

*Arguments and Values:*

_description_—a _rich text_ sequence.

_plaintext_—a _string_.

*Description*:

{make-plaintext} returns a _document element_ of type {:plaintext} with _description_ and _plaintext_.

Package

geneva

Source

struct.lisp (file)

Function: make-section HEADER ELEMENTS

*Arguments and Values:*

_header_—a _rich text_ sequence.

_elements_—a _list_ of _document elements_.

*Description*:

{make-section} returns a _document element_ of type {section} with _header_ and _elements_.

Package

geneva

Source

struct.lisp (file)

Function: make-table DESCRIPTION ROWS

*Arguments and Values:*

_description_—a _rich text_ sequence.

_rows_—a two dimensional list of _rich text_ sequences.

*Description*:

{make-table} returns a _document element_ of type {:table} with _description_ and _rows_.

Package

geneva

Source

struct.lisp (file)

Function: make-url STRING &optional URL

*Arguments and Values:*

_string_—a _string_.

_url_—a _string_.

*Description*:

{make-url} returns a _text token_ of type {:url} for _string_. If _url_ is given then _string_ is used as the label, otherwise _string_ is both label and URL.

Package

geneva

Source

struct.lisp (file)

Function: null-level ()

Returns the root level.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: text-string TEXT

Return TEXT string without markup.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: wrap-string STRING &optional COLUMNS

Return copy of STRING with spaces replaced by newlines so that lines do not exceed COLUMNS characters when possible. COLUMNS defaults to 72.

Package

geneva.utilities

Source

utilities.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *whitespace*

Characters considered whitespace.

Package

geneva

Source

normalize.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: assert-content THING

Assert that thing is a valid element or text token. On failure signal a TYPE-ERROR.

Package

geneva

Source

struct.lisp (file)

Function: assert-element THING

Assert that THING is a valid element. On failure signal a TYPE-ERROR.

Package

geneva

Source

struct.lisp (file)

Function: assert-rich-text THING

Assert that THING is a valid rich text sequence. On failure signal a TYPE-ERROR.

Package

geneva

Source

struct.lisp (file)

Function: assert-text-token THING

Assert that THING is a valid text token. On failure signal a TYPE-ERROR.

Package

geneva

Source

struct.lisp (file)

Function: document-index-2 DOCUMENT LEVEL

Base function for DOCUMENT-INDEX.

Package

geneva.utilities

Source

utilities.lisp (file)

Function: join-strings TEXT

Join :PLAIN text tokens in TEXT.

Package

geneva

Source

normalize.lisp (file)

Function: make-markup TYPE &rest STRINGS

Make markup of TYPE for STRINGS. Signal a TYPE-ERROR if STRINGS are not of type string.

Package

geneva

Source

struct.lisp (file)

Function: make-markup-reader CONSTRUCTOR

Returns function that reads string literal and applies CONSTRUCTOR.

Package

geneva.macros

Source

syntax.lisp (file)

Function: make-object TYPE DESCRIPTION &rest CONTENT

Make an object of TYPE for DESCRIPTION text and CONTENT. Assert that DESCRIPTION is a valid rich text sequence.

Package

geneva

Source

struct.lisp (file)

Function: normalize-plaintext STRING

Remove leading and ending whitespace, global indent and whitespace line-suffixes from plaintext STRING .

Package

geneva

Source

normalize.lisp (file)

Function: normalize-text TEXT

Remove empty markup and join adjacent strings in TEXT, then remove superfluous whitespace.

Package

geneva

Source

normalize.lisp (file)

Function: normalize-text-item ITEM &key TRIM

Normalize *WHITESPACE* in text ITEM and optionally TRIM :LEFT or :RIGHT.

Package

geneva

Source

normalize.lisp (file)

Function: normalize-text-whitespace TEXT

Remove obsoltete whitespace from TEXT.

Package

geneva

Source

normalize.lisp (file)

Function: normalize-whitespace STRING &key TRIM

Normalize *WHITESPACE* in STRING and optionally TRIM :LEFT, :RIGHT or :BOTH.

Package

geneva

Source

normalize.lisp (file)

Function: position-non-whitespace-item TEXT &optional FROM-END

Get position of first non-whitespace item in TEXT and maybe start FROM-END.

Package

geneva

Source

normalize.lisp (file)

Function: remove-empty-markup TEXT

Remove empty markup from TEXT.

Package

geneva

Source

normalize.lisp (file)

Function: trim-whitespace-items TEXT

Remove whitespace from start and end of TEXT.

Package

geneva

Source

normalize.lisp (file)

Function: trim-whitespace-suffixes LINES

Trim whitespace suffixes from LINE.

Package

geneva

Source

normalize.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   G   L  
Index Entry  Section

F
File, Lisp, geneva.asd: The geneva<dot>asd file
File, Lisp, geneva/geneva.lisp: The geneva/geneva<dot>lisp file
File, Lisp, geneva/macros.lisp: The geneva/macros<dot>lisp file
File, Lisp, geneva/normalize.lisp: The geneva/normalize<dot>lisp file
File, Lisp, geneva/struct.lisp: The geneva/struct<dot>lisp file
File, Lisp, geneva/syntax.lisp: The geneva/syntax<dot>lisp file
File, Lisp, geneva/utilities.lisp: The geneva/utilities<dot>lisp file

G
geneva.asd: The geneva<dot>asd file
geneva/geneva.lisp: The geneva/geneva<dot>lisp file
geneva/macros.lisp: The geneva/macros<dot>lisp file
geneva/normalize.lisp: The geneva/normalize<dot>lisp file
geneva/struct.lisp: The geneva/struct<dot>lisp file
geneva/syntax.lisp: The geneva/syntax<dot>lisp file
geneva/utilities.lisp: The geneva/utilities<dot>lisp file

L
Lisp File, geneva.asd: The geneva<dot>asd file
Lisp File, geneva/geneva.lisp: The geneva/geneva<dot>lisp file
Lisp File, geneva/macros.lisp: The geneva/macros<dot>lisp file
Lisp File, geneva/normalize.lisp: The geneva/normalize<dot>lisp file
Lisp File, geneva/struct.lisp: The geneva/struct<dot>lisp file
Lisp File, geneva/syntax.lisp: The geneva/syntax<dot>lisp file
Lisp File, geneva/utilities.lisp: The geneva/utilities<dot>lisp file

Jump to:   F   G   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   C   D   F   I   J   L   M   N   P   R   S   T   W  
Index Entry  Section

A
align-string: Exported functions
assert-content: Internal functions
assert-element: Internal functions
assert-rich-text: Internal functions
assert-text-token: Internal functions

C
content-type: Exported functions
content-values: Exported functions

D
descend-level: Exported functions
document: Exported macros
document-index: Exported functions
document-index-2: Internal functions

F
Function, align-string: Exported functions
Function, assert-content: Internal functions
Function, assert-element: Internal functions
Function, assert-rich-text: Internal functions
Function, assert-text-token: Internal functions
Function, content-type: Exported functions
Function, content-values: Exported functions
Function, descend-level: Exported functions
Function, document-index: Exported functions
Function, document-index-2: Internal functions
Function, incf-level: Exported functions
Function, join-strings: Internal functions
Function, level-string: Exported functions
Function, make-bold: Exported functions
Function, make-document: Exported functions
Function, make-fixed-width: Exported functions
Function, make-italic: Exported functions
Function, make-listing: Exported functions
Function, make-markup: Internal functions
Function, make-markup-reader: Internal functions
Function, make-media: Exported functions
Function, make-object: Internal functions
Function, make-paragraph: Exported functions
Function, make-plaintext: Exported functions
Function, make-section: Exported functions
Function, make-table: Exported functions
Function, make-url: Exported functions
Function, normalize-plaintext: Internal functions
Function, normalize-text: Internal functions
Function, normalize-text-item: Internal functions
Function, normalize-text-whitespace: Internal functions
Function, normalize-whitespace: Internal functions
Function, null-level: Exported functions
Function, position-non-whitespace-item: Internal functions
Function, remove-empty-markup: Internal functions
Function, text-string: Exported functions
Function, trim-whitespace-items: Internal functions
Function, trim-whitespace-suffixes: Internal functions
Function, wrap-string: Exported functions

I
incf-level: Exported functions

J
join-strings: Internal functions

L
level-string: Exported functions
listing: Exported macros

M
Macro, document: Exported macros
Macro, listing: Exported macros
Macro, media: Exported macros
Macro, paragraph: Exported macros
Macro, plaintext: Exported macros
Macro, section: Exported macros
Macro, table: Exported macros
make-bold: Exported functions
make-document: Exported functions
make-fixed-width: Exported functions
make-italic: Exported functions
make-listing: Exported functions
make-markup: Internal functions
make-markup-reader: Internal functions
make-media: Exported functions
make-object: Internal functions
make-paragraph: Exported functions
make-plaintext: Exported functions
make-section: Exported functions
make-table: Exported functions
make-url: Exported functions
media: Exported macros

N
normalize-plaintext: Internal functions
normalize-text: Internal functions
normalize-text-item: Internal functions
normalize-text-whitespace: Internal functions
normalize-whitespace: Internal functions
null-level: Exported functions

P
paragraph: Exported macros
plaintext: Exported macros
position-non-whitespace-item: Internal functions

R
remove-empty-markup: Internal functions

S
section: Exported macros

T
table: Exported macros
text-string: Exported functions
trim-whitespace-items: Internal functions
trim-whitespace-suffixes: Internal functions

W
wrap-string: Exported functions

Jump to:   A   C   D   F   I   J   L   M   N   P   R   S   T   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*default-index-caption*: Exported special variables
*index-headers-p*: Exported special variables
*index-p*: Exported special variables
*whitespace*: Internal special variables

S
Special Variable, *default-index-caption*: Exported special variables
Special Variable, *index-headers-p*: Exported special variables
Special Variable, *index-p*: Exported special variables
Special Variable, *whitespace*: Internal special variables
Special Variable, syntax: Exported special variables
syntax: Exported special variables

Jump to:   *  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   G   P   S  
Index Entry  Section

G
geneva: The geneva system
geneva: The geneva package
geneva.macros: The geneva<dot>macros package
geneva.utilities: The geneva<dot>utilities package

P
Package, geneva: The geneva package
Package, geneva.macros: The geneva<dot>macros package
Package, geneva.utilities: The geneva<dot>utilities package

S
System, geneva: The geneva system

Jump to:   G   P   S