Generated: May 31, 2005, 12:43:27 | Copyright © 2005 , Kurt Nørmark |
Besides the general library, this library requires the html4.01 transitional basis and surface libraries. See also the basis and the surface libraries of the html4.01-transitional mirror.
As a change in this version of convenience for the AST based validating mirror, we do not convert contents to strings, from for instance numbers or symbols. It can affect backward compatibility.
We strongly recommend that you use one of the XHTML mirrors in LAML instead of HTML4.01.
a-name | (a-name name) | Name the current place by means of an a tag with name attribute |
a-tag | (a-tag url . optional-parameter-list) | Return an a tag constructructed from the URL and the anchor. |
a-tag-target | (a-tag-target url anchor target) | A variant of a tag which supports a target attribute of the a-tag (where in browser to show the result). |
alphabetic-link-array | (alphabetic-link-array) | Return an 'array' of letter links to #letter |
alphabetic-link-array-1 | (alphabetic-link-array-1 target-file-prefix alphabet . emphasis-letter) | Return an 'array' of letter links to (string-append target-file-prefix "-" letter ".html") for all letters in alphabet. |
bl | (bl lst) | A large, red bulleted list. |
blockquote-1 | (blockquote-1 x) | Present the string converted x in a blockquote tag. |
box | (box text [width]) | Embed text in an invisible (border-less) table with one cell. |
br-list | (br-list lst) | Return a flat list, separate by breaks. |
brl | (brl lst) | A convenient alias for br-list |
bullet-list | (bullet-list lst bullet-size bullet-color) | Render lst as a bulleted list. |
center-frame | (center-frame indentation text) | Embed text into a centered frame |
character-entity | (character-entity x) | if x is a number return a numbered character entity. |
checkbox | (checkbox name . checked) | Return an input tag of type checkbox. |
cite-1 | (cite-1 x) | Present x in a blockquote tag. |
color-frame | (color-frame text color) | Embed text into a color frame. |
color-frame-width | (color-frame-width text color width) | As color-frame, but this function supports and extra width parameter. |
colorize-substrings | (colorize-substrings str region-color-list) | This is an advanced function which make font changes to substrings of str. |
con | (con . elements) | Concatenete a number of strings. |
con-par | (con-par . string-list) | Like con from the general library, but insert a p tag between all strings in string-list |
con-space | (con-space . string-list) | Like con, but ensure that there are white space in between the concatenated strings. |
copyright | copyright | The copyright character entity |
copyright-owner | (copyright-owner x) | Embed x into a copyright indication |
definition-list | (definition-list lst) | Make a definition list. |
dl-1 | (dl-1 list) | A convenient alias for definition-list. |
file-upload | (file-upload name) | Return an input tag of type file. |
font-1 | (font-1 size color x) | Returns a font tag with size and color attributes. |
font-color | (font-color color x) | Like font, but only supports color. |
font-rise | (font-rise str base-size) | Return a html fonted version of str. |
font-size | (font-size size x) | Like font, but only supports size. |
form-1 | (form-1 cgi-url x) | Embed x in to form of kind POST, which activates url upon form completion. |
frame-1 | (frame-1 text) | Shown text in a simple frame. |
frame-width | (frame-width text width) | Like frame, but with an extra width parameter. |
general-page-message | general-page-message | A message (string) which is presented at the top of every page generated. |
h | (h i x) | Returns h tags, h1 if i=1, h2 if i=2, etc. |
hidden-line | (hidden-line name value) | Return an input tag of type hidden. |
horizontal-space | horizontal-space | Return n space special characters |
hr-1 | (hr-1 . optional-parameter-list) | Return a horizontal rule, a hr tag. |
html-appender | (html-appender element) | Generate a function which appends element. |
html-protect | (html-protect str) | Protect HTML tags such that an HTML document can be shown verbatim in a browser. |
image-file | (image-file file-name) | Return the full path/address of the image file named file-name. |
image-file-path | (image-file-path) | Determination of the actual file path to images in html files. |
img-0 | (img-0 file-name . width) | Return an img tag, in which a file on file-name is presented. |
img-with-border | (img-with-border file-name . width) | A variant of img which presents an image with a border |
in-danish | (in-danish str) | Translate the Danish letters in str to a string with appropriate use of HTML character entities. |
indent-pixels | (indent-pixels p text) | Indent text with p pixels |
js-call | (js-call function-name parameters) | Return a Javascript calling form, given function function-name and parameters. |
js-string-array | (js-string-array elements) | Return a manifest javascript array given its elements |
kn-internet-image-path | kn-internet-image-path | The URL where the author of this library keeps a number of images (icons). |
laml-home-button | (laml-home-button extra-level text-or-image . start-dir) | Return an HTML a tag (anchor) which links to the LAML software home page via an small gif icon. |
laml-top-banner | (laml-top-banner) | Return the standard LAML top banner with time of generation, copyright, and home icon |
left-middle-right-banner | (left-middle-right-banner left middle right) | Return a banner with left, middle, and right justified contributions. |
left-right-banner | (left-right-banner left right) | Return a banner with left and right justified contributions. |
mail-link | (mail-link email-adr [anchor-name]) | Return a mail link by means of the mailto facility in an a tag. |
mini-menu | (mini-menu mini-menu-list dark-color) | Makes a horizontal menu in terms of a table with links. |
multi-column-list | (multi-column-list columns elements total-width) | Return a multi-column list, row major, with columns columns. |
multipart-form | (multipart-form cgi-url target-directory target-directory-url x) | Embed x into a multipart form. |
n-column-list | (n-column-list n elements total-width) | Return an n column list, column-major, of the element list (second parameter). |
narrow | (narrow separator-fn width . contents-list) | Present the contents-list, which is a list of elements, in a narrow column of width, separated with activations of separator-fn. |
narrow-with-pixels | (narrow-with-pixels p text) | Show text in a column, narrowed from both left and right with p pixels |
ol-1 | (ol-1 list) | A convenient alias for ordered-list. |
ordered-list | (ordered-list lst) | Return an ol (ordered list) tag. |
p-1 | (p-1 . x) | Present a p tag (paragraph). |
page | (page ttl bdy . color-list) | Return a simple HTML page with html, head and title tags. |
page-1 | (page-1 ttl meta-contributions bdy bg-color text-color link-color vlink-color . optional-parameter-list) | Return an HTML page with html, head, meta and title tags. |
page-with-keypress-script | (page-with-keypress-script ttl meta-contributions bdy script-loading script keypress-action bg-color text-color link-color vlink-color . optional-parameter-list) | A version of the page and page-1 functions with Javascript scripts as a new fourth to sixth parameter. |
password-line | (password-line name size value) | Return an input tag of type password. |
post-page | (post-page) | Return the part of an HTML page after the body. |
post-page-with-comments | (post-page-with-comments) | Return the part of an HTML page after the body together with trailing laml standard comment and tracing comment. |
pre-page | (pre-page ttl . color-list) | Return the part of an HTML page before the body. |
pre-page-with-keypress-script | (pre-page-with-keypress-script ttl meta-contributions script-loading script keypress-action bg-color text-color link-color vlink-color . optional-par) | Return a pre-page, without body and trailing html stuff. |
radio-button | (radio-button value group-name . checked) | Return an input tag of type radio. |
reset | (reset value) | Return an input tag of type reset. |
select-1 | (select-1 name value-list contents-list . selected-value) | Return a select tag, defining multiple choice menu. |
set-image-file-path! | (set-image-file-path! mode) | Set the image-file-access variable. |
space | (space n) | Return n space special characters (horizontal space) |
submit | (submit value [name]) | Return an input tag of type submit. |
table-0 | (table-0 list-of-list . optional-parameter-list) | Return a table with elements from list-of-list. |
table-1 | (table-1 border cell-width-list cell-color-list-1 list-of-list . optional-parameter-list) | A more versatile variant of table-0. |
table-2 | (table-2 border cell-width-list cell-color-list-1 header-list list-of-list) | A variant of table and table-1 which supports a header row. |
table-3 | (table-3 border cell-width-list list-of-list . optional-parameter-list) | A transparant variant of table-1 - without specification of a column color list. |
table-4 | (table-4 border cell-width-list row-color-list list-of-list . optional-parameter-list) | A variant of table-1 with a row color list instead of a column color list. |
table-5 | (table-5 border cell-width-list list-of-color-list list-of-list . optional-parameter-list) | A variant of table-4 that allows individual background coloring of table cells. |
text-line | (text-line name size value) | Return an input tag of type text. |
textarea-1 | (textarea-1 name rows cols contents) | Return a textarea form. |
timed-page | (timed-page ttl show-time continuation-url meta-contributions bdy bg-color text-color link-color vlink-color . optional-parameter-list) | A variant of page-1 and page-with-keypress-script which includes show-time (in seconds) and continuation-url. |
timed-page-with-keypress-script | (timed-page-with-keypress-script ttl show-time continuation-url meta-contributions bdy script-loading script keypress-action bg-color text-color link-color vlink-color . optional-parameter-list) | A combination of time-page and page-with-keypress-script (with timed-page as starting point). |
tracing-comment | (tracing-comment) | The result of this function is inserted as an HTML comment on each html page generated. |
two-column-list | (two-column-list elements total-width) | Return a two column list, column major. |
ul-1 | (ul-1 list) | A convenient alias for unordered-list. |
ul-tree | (ul-tree tree) | Show tree as an indented, bulleted list. |
unordered-list | (unordered-list lst) | Return an ul (uordered list) tag. |
vertical-space | (vertical-space n) | Return n vertical spaces, i.e., n instances of the p tag. |
write-html-page | (write-html-page file header body) | Write a HTML page consisting of header and body to file. |
1 Renamings compared to the original, very old html library: lib/html.scm. | |||
As mentioned in the introduction, a number of functions in this library have been
renamed, as compared with the similar functions in the original html library. It is
important to be aware of these renamings if you convert old LAML-based software to
the HTML4.01-transitional mirror. The renamings are as follows
form -> form-1 select -> select-1 textarea -> textarea-1 ol -> ol-1 ul -> ul-1 table -> table-0 img -> img-0 hr -> hr-1 font -> font-1 blockquote -> blockquote-1 cite -> cite-1 p -> p-1 frame -> frame-1A few functions of the old html-v1 mirror are also affected: html:page -> page-1 html:post-page -> post-page-with-comments html:pre-page-with-keypress-script -> pre-page-with-keypress-script html:page-with-keypress-script -> page-with-keypress-scriptIn addition all calls of functions named html:f must be changed to html4:f. | |||
2 Basic HTML extension stuff. | |||
In this section we implement mirrors of HTML stuff such as comment and character entities. Also there are a number of convenient white space functions (horizontal and vertical). As a special, but very useful function, we include an html-protect function which provides for presentation of verbatim HTML documents in a browser. There is also some basic javascript support in this section. | |||
character-entity | |||
Form | (character-entity x) | ||
Description | If x is a number return a numbered character entity. if x is a symbol og string, return a named character entity. | ||
See also | Scheme source file | character-entity | |
copyright | |||
Form | copyright | ||
Description | The copyright character entity | ||
See also | Scheme source file | copyright | |
space | |||
Form | (space n) | ||
Description | Return n space special characters (horizontal space) | ||
See also | Scheme source file | space | |
horizontal-space | |||
Form | horizontal-space | ||
Description | Return n space special characters | ||
See also | Scheme source file | horizontal-space | |
vertical-space | |||
Form | (vertical-space n) | ||
Description | Return n vertical spaces, i.e., n instances of the p tag. | ||
See also | Scheme source file | vertical-space | |
html-protect | |||
Form | (html-protect str) | ||
Description | Protect HTML tags such that an HTML document can be shown verbatim in a browser. Transliterate angle brackets in str to the particular html character entities. With this useful function it is possible to show the html tags in a browser | ||
See also | Scheme source file | html-protect | |
in-danish | |||
Form | (in-danish str) | ||
Description | Translate the Danish letters in str to a string with appropriate use of HTML character entities. | ||
See also | Scheme source file | in-danish | |
js-call | |||
Form | (js-call function-name parameters) | ||
Description | Return a Javascript calling form, given function function-name and parameters. Returns a string of the form: function-name(parameters). This function adds commas between the actual Javascript parameters. | ||
See also | Scheme source file | js-call | |
js-string-array | |||
Form | (js-string-array elements) | ||
Description | Return a manifest javascript array given its elements | ||
See also | Scheme source file | js-string-array | |
con | |||
Form | (con . elements) | ||
Description | Concatenete a number of strings. Con is an alias of list in this version of the mirror. It is the intension to use it when concatenating HTML constituents. Returns a list. | ||
See also | Scheme source file | con | |
con-space | |||
Form | (con-space . string-list) | ||
Description | Like con, but ensure that there are white space in between the concatenated strings. Implemented by a string-merge. Returns a list. | ||
See also | Scheme source file | con-space | |
con-par | |||
Form | (con-par . string-list) | ||
Description | Like con from the general library, but insert a p tag between all strings in string-list | ||
See also | Scheme source file | con-par | |
3 Convenience variants of the HTML mirror functions. | |||
The functions in this section are either quite close to the HTML mirror functions or very simple. | |||
a-tag | |||
Form | (a-tag url . optional-parameter-list) | ||
Description | Return an a tag constructructed from the URL and the anchor. If no anchor is provided uses the url as anchor text. | ||
See also | Scheme source file | a-tag | |
a-tag-target | |||
Form | (a-tag-target url anchor target) | ||
Description | A variant of a tag which supports a target attribute of the a-tag (where in browser to show the result). | ||
See also | Scheme source file | a-tag-target | |
a-name | |||
Form | (a-name name) | ||
Description | Name the current place by means of an a tag with name attribute | ||
See also | Scheme source file | a-name | |
mail-link | |||
Form | (mail-link email-adr [anchor-name]) | ||
Description | Return a mail link by means of the mailto facility in an a tag. | ||
See also | Scheme source file | mail-link | |
hr-1 | |||
Form | (hr-1 . optional-parameter-list) | ||
Description | Return a horizontal rule, a hr tag. | ||
See also | Scheme source file | hr-1 | |
h | |||
Form | (h i x) | ||
Description | Returns h tags, h1 if i=1, h2 if i=2, etc. If i is higher than 6, use size 6. | ||
See also | Scheme source file | h | |
font-1 | |||
Form | (font-1 size color x) | ||
Description | Returns a font tag with size and color attributes. size is a number or the symbol normal. color is a rgb list of three, decimal integers or a color symbol from the color library. Corresponds to the old function font in the ad hoc html library. | ||
See also | Scheme source file | font-1 | |
font-size | |||
Form | (font-size size x) | ||
Description | Like font, but only supports size. size is a number and color is a rgb list of three, decimal integers or a color symbol. | ||
See also | Scheme source file | font-size | |
font-color | |||
Form | (font-color color x) | ||
Description | Like font, but only supports color. color is a rgb list of three, decimal integers | ||
See also | Scheme source file | font-color | |
cite-1 | |||
Form | (cite-1 x) | ||
Description | Present x in a blockquote tag. This has nothing to do with the html cite tag. Corresponds to the old function cite in the ad hoc html library. | ||
See also | Scheme source file | cite-1 | |
blockquote-1 | |||
Form | (blockquote-1 x) | ||
Description | Present the string converted x in a blockquote tag. Corresponds to the old function blockquote in the ad hoc html library. Don't use it - this function is only included to serve old LAML tools. | ||
See also | Scheme source file | blockquote-1 | |
p-1 | |||
Form | (p-1 . x) | ||
Description | Present a p tag (paragraph). If no parameter is given, just return a p tag without contens. If a parameter is given, return x embedded in a p tag. Corresponds to the old function p in the ad hoc html library. Don't use it - this function is only included to serve old LAML tools. Use p from the surface library instead. | ||
See also | Scheme source file | p-1 | |
html-appender | |||
Form | (html-appender element) | ||
Description | Generate a function which appends element. As an example use, (html-appender (p)) is a function of one parameter, which appends a p tag to the argument of the function. | ||
See also | Scheme source file | html-appender | |
font-rise | |||
Form | (font-rise str base-size) | ||
Description | Return a html fonted version of str. Initial letter is sized base-size+1. The rest is size base-size. Returns a list, not an ast. If rendered directly, use render-1. | ||
See also | Scheme source file | font-rise | |
4 Lists and trees. | |||
In this section there are various convenient functions which renders lists and trees. | |||
ordered-list | |||
Form | (ordered-list lst) | ||
Description | Return an ol (ordered list) tag. The elements in list becomes the elements. li tags are inserted automatically by this function. A natural Scheme variant of the ol HTML mirror function, in which the items are represented as a Lisp list. | ||
See also | Scheme source file | ordered-list | |
ol-1 | |||
Form | (ol-1 list) | ||
Description | A convenient alias for ordered-list. A natural Scheme variant of the ol HTML mirror function, in which the items are represented as a Lisp list. Corresponds to the old function ol in the ad hoc html library. | ||
See also | Scheme source file | ol-1 | |
see also | ordered-list | ||
unordered-list | |||
Form | (unordered-list lst) | ||
Description | Return an ul (uordered list) tag. The elements in list becomes the elements. Li tags are inserted automatically by this function. A natural Scheme variant of the ul HTML mirror function, in which the items are represented as a Lisp list. AST-fixed. | ||
See also | Scheme source file | unordered-list | |
br-list | |||
Form | (br-list lst) | ||
Description | Return a flat list, separate by breaks. The parameter lst is a list of items. In this version, returns a list, which cannot be rendered directly. However, render-1 works on the result. | ||
See also | Scheme source file | br-list | |
brl | |||
Form | (brl lst) | ||
Description | A convenient alias for br-list | ||
See also | Scheme source file | brl | |
see also | br-list | ||
ul-1 | |||
Form | (ul-1 list) | ||
Description | A convenient alias for unordered-list. A natural Scheme variant of the ul HTML mirror function, in which the items are represented as a Lisp list. Corresponds to the old function ul in the ad hoc html library. | ||
See also | Scheme source file | ul-1 | |
see also | unordered-list | ||
definition-list | |||
Form | (definition-list lst) | ||
Description | Make a definition list. lst is a list of lists. Each inner list must be of length two, dt and dd respectively. I.e. definition terms and the defintion proper, resp. As a special case supported, the inner list can be of lenght one, in which case the dd is considered empty. | ||
See also | Scheme source file | definition-list | |
dl-1 | |||
Form | (dl-1 list) | ||
Description | A convenient alias for definition-list. A natural Scheme variant of the dl HTML mirror function | ||
See also | Scheme source file | dl-1 | |
bullet-list | |||
Form | (bullet-list lst bullet-size bullet-color) | ||
Description | Render lst as a bulleted list. Both parameters must be symbols. Bullet-size is either 'small or 'large. Bullet-color is a string (not a color constant) either 'red, 'green, 'yellow, 'blue, or 'cyan. Depends on the presence of appropriate gif files in images directory. In order to use this function you must specify where to find the bullet images; This is done by setting image-file-access via the function set-image-file-path! OBSOLETE. | ||
See also | Scheme source file | bullet-list | |
bl | |||
Form | (bl lst) | ||
Description | A large, red bulleted list. A convenient special version of bullet-list. | ||
See also | Scheme source file | bl | |
ul-tree | |||
Form | (ul-tree tree) | ||
Description | Show tree as an indented, bulleted list.
A tree is a list.
The first element of the list is the root.
The tail of the list is the list of subtrees.
A subtree, which is a leaf, can be given as a string (cdata) or a contents element.
Example (a (b c d) (e (f g) h)) a / \ b e / \ / \ c d f h | g | ||
See also | Scheme source file | ul-tree | |
5 Table functions. | |||
In this section there is a number of table functions which maps a list of rows (list of lists) to an HTML table. | |||
table-0 | |||
Form | (table-0 list-of-list . optional-parameter-list) | ||
Description | Return a table with elements from list-of-list. The sublists of list represent the rows in the table. The border is an optional parameter. Corresponds to the old function table in the ad hoc html library. | ||
Parameters | list-of-list | the list of table row lists. | |
See also | Scheme source file | table-0 | |
table-1 | |||
Form | (table-1 border cell-width-list cell-color-list-1 list-of-list . optional-parameter-list) | ||
Description | A more versatile variant of table-0. A variant of table-0 which requires border (an integer, 0 if no border), a list of cell widths, a list of column colors, the table contents (list-of-list - list of rows), and an optional valign parameter. The valign parameter corresponds to the HTML valign attribute, the possible value of which are "top", "middle", "bottom", and "baseline" (a string). | ||
See also | Scheme source file | table-1 | |
table-2 | |||
Form | (table-2 border cell-width-list cell-color-list-1 header-list list-of-list) | ||
Description | A variant of table and table-1 which supports a header row. | ||
See also | Scheme source file | table-2 | |
table-3 | |||
Form | (table-3 border cell-width-list list-of-list . optional-parameter-list) | ||
Description | A transparant variant of table-1 - without specification of a column color list. The cell color becomes identical with the background. | ||
See also | Scheme source file | table-3 | |
table-4 | |||
Form | (table-4 border cell-width-list row-color-list list-of-list . optional-parameter-list) | ||
Description | A variant of table-1 with a row color list instead of a column color list. The length of row-color-list must be the number of rows in the table. | ||
See also | Scheme source file | table-4 | |
table-5 | |||
Form | (table-5 border cell-width-list list-of-color-list list-of-list . optional-parameter-list) | ||
Description | A variant of table-4 that allows individual background coloring of table cells. The parameter list-of-color-list is a list of row colors, whereas row-color-list in table-4 is a fixed list of colors that apply to a row. Thus, the structure of list-of-color-list is identical to the structure of list-of-list. | ||
See also | Scheme source file | table-5 | |
similar function | table-4 | ||
left-middle-right-banner | |||
Form | (left-middle-right-banner left middle right) | ||
Description | Return a banner with left, middle, and right justified contributions. | ||
See also | Scheme source file | left-middle-right-banner | |
left-right-banner | |||
Form | (left-right-banner left right) | ||
Description | Return a banner with left and right justified contributions. | ||
See also | Scheme source file | left-right-banner | |
laml-top-banner | |||
Form | (laml-top-banner) | ||
Description | Return the standard LAML top banner with time of generation, copyright, and home icon | ||
See also | Scheme source file | laml-top-banner | |
mini-menu | |||
Form | (mini-menu mini-menu-list dark-color) | ||
Description | Makes a horizontal menu in terms of a table with links. The table is made on the basis of parameter mini-menu-list, which is a list of menu entries. A menu entry is a list of anchor-text and URL pairs (lists of two strings). Dark-color must be some dark color. | ||
See also | Scheme source file | mini-menu | |
6 HTML input form functions. | |||
A number of convenient functions which supports the work with HTML input forms. | |||
form-1 | |||
Form | (form-1 cgi-url x) | ||
Description | Embed x in to form of kind POST, which activates url upon form completion. Corresponds to the old function form in the ad hoc html library. | ||
See also | Scheme source file | form-1 | |
multipart-form | |||
Form | (multipart-form cgi-url target-directory target-directory-url x) | ||
Description | Embed x into a multipart form. Activate cgi-url when the form is submitted. A multipart form is used for file uploading. Files are written into target-directory when uploaded. The parameter target-directory-url gives the URL of the directory, in which the file is uploaded. This is used for subsequent WWW retrival of the file. | ||
See also | Scheme source file | multipart-form | |
accompanying function | multipart-decode | ||
checkbox | |||
Form | (checkbox name . checked) | ||
Description | Return an input tag of type checkbox. The name is a string or symbol which identifies the checkbox. Checked is an optional boolean parameter. If checked is #t, the checkbox will be checked initially. Returns the string true to the form processing application if checked. | ||
See also | Scheme source file | checkbox | |
radio-button | |||
Form | (radio-button value group-name . checked) | ||
Description | Return an input tag of type radio. checked is a boolean parameter, i.e. true or false (in Scheme sense). | ||
See also | Scheme source file | radio-button | |
text-line | |||
Form | (text-line name size value) | ||
Description | Return an input tag of type text. The name is a string of symbol which identifies the text line. Size is the text line width in character positions. Value is the initial value on the text line. | ||
See also | Scheme source file | text-line | |
hidden-line | |||
Form | (hidden-line name value) | ||
Description | Return an input tag of type hidden. The name is a string or symbol which identifies the hidden line. Value is the string contents of the hidden line. | ||
See also | Scheme source file | hidden-line | |
file-upload | |||
Form | (file-upload name) | ||
Description | Return an input tag of type file. Such an input tag is used for file uploading. The name of the uploading is name. | ||
See also | Scheme source file | file-upload | |
password-line | |||
Form | (password-line name size value) | ||
Description | Return an input tag of type password. The name is a string of symbol which identifies the password. Size is the line width in character positions. Value is the initial contents of the password field (not very useful...). | ||
See also | Scheme source file | password-line | |
submit | |||
Form | (submit value [name]) | ||
Description | Return an input tag of type submit. Renders a button. Value is the string label of the button. If the optional parameter name is given it identifies a particular submit button with a name, value pair in the submitted data. | ||
See also | Scheme source file | submit | |
reset | |||
Form | (reset value) | ||
Description | Return an input tag of type reset. Value is the string label of the button. | ||
See also | Scheme source file | reset | |
select-1 | |||
Form | (select-1 name value-list contents-list . selected-value) | ||
Description | Return a select tag, defining multiple choice menu. Name is a string or symbol which identifies the selection. Value-list is a list of the values to be returned upon selection. Contents-list is the list of contents to be shown in the menu. Selected-value is an optional value, which is to be selected initially. This value should be a member of value-list. Corresponds to the old function select in the ad hoc html library. | ||
See also | Scheme source file | select-1 | |
textarea-1 | |||
Form | (textarea-1 name rows cols contents) | ||
Description | Return a textarea form. Rows is the number of rows of the text area. Cols is the number of columns measured in characters. Contents is the initial contents of the text area. Corresponds to the old function textarea in the ad hoc html library. | ||
See also | Scheme source file | textarea-1 | |
7 Page functions. | |||
A number of convenient functions which make the overall elements of an HTML page. | |||
page | |||
Form | (page ttl bdy . color-list) | ||
Description | Return a simple HTML page with html, head and title tags. Also include the value of the parameter-less function (laml-standard-comment) as an initial html-comment. The optional color-list must consist of a background color, text color, link color and visited link color. | ||
See also | Scheme source file | page | |
page-1 | |||
Form | (page-1 ttl meta-contributions bdy bg-color text-color link-color vlink-color . optional-parameter-list) | ||
Description | Return an HTML page with html, head, meta and title tags. This function is a more elaborate version of the page function from above. This function assumes that the functions tracing-comment and meta-tag-clauses are defined. The function meta-tag-clauses must return a property list of meta-descriptors, which represents the standard meta clauses of this page. The parameter meta-contributions is a property list of meta descriptors: (key val key val ...). Meta-tag-clauses and meta-contributions go into a HTML meta-tag in the beginning of the generated document. Tracing-comment must return a string. Tracing-comment is meant to let us trace the LAML source files etc. Tracing-comment is defaulted to return the empty string. The first part of the string output is the standard DOCTYPE. The keys must be symbols, the values must be strings. The last four parameters must consist of a background color, text color, link color and visited link color (all color RGB lists). Corresponds to the old function html:page in the html-v1 library. The first optional parameter addresses a css-style-file-list (defaulted to #f). The second optional parameter gives the kind of body (css class) of the body of the page. | ||
See also | Scheme source file | page-1 | |
page-with-keypress-script | |||
Form | (page-with-keypress-script ttl meta-contributions bdy script-loading script keypress-action bg-color text-color link-color vlink-color . optional-parameter-list) | ||
Description | A version of the page and page-1 functions with Javascript scripts as a new fourth to sixth parameter. The parameter script-loading can either be static or dynamic (symbols). If static, include the script in the html document. If dynamic, refer to the script in the a javascript subdirectory. The parameter script is a list of two file path components (prefix-static-part js-filename), both strings. If script-loading is static (string-append prefix-static-part js-filename) is the name of the script file, the contents of which must be included inline. If script-loading is dynamic js-filename is the name of a file in the html/javascript directory, including extension. The parameter keypress-action is supposed to be an activation of a Javascript function defined in script. The optional parameter is either single-press or double-press (a symbol). Determines whether advancement to next page is via single or double mouse click. Default optional parameter is double-pres. This works in concert with the the loaded script. Uses the function read-text-file from the file-read library. In addition to key press events, single or double click mouse press is also supported (advancement to a designated next page).' The second optional parameter addresses a css-style-file-list (defaulted to #f). The third optional parameter gives the kind of body (css class) of the body of the page. | ||
See also | Scheme source file | page-with-keypress-script | |
timed-page | |||
Form | (timed-page ttl show-time continuation-url meta-contributions bdy bg-color text-color link-color vlink-color . optional-parameter-list) | ||
Description | A variant of page-1 and page-with-keypress-script which includes show-time (in seconds) and continuation-url. An empty string in continuation-url serves as 'no continuation'. The first optional parameter addresses a css-style-file-list (defaulted to #f). The second optional parameter gives the kind of body (css class) of the body of the page. | ||
See also | Scheme source file | timed-page | |
timed-page-with-keypress-script | |||
Form | (timed-page-with-keypress-script ttl show-time continuation-url meta-contributions bdy script-loading script keypress-action bg-color text-color link-color vlink-color . optional-parameter-list) | ||
Description | A combination of time-page and page-with-keypress-script (with timed-page as starting point). There are three extra parameters compared to timed-page: script-loading script keypress-action. | ||
See also | Scheme source file | timed-page-with-keypress-script | |
write-html-page | |||
Form | (write-html-page file header body) | ||
Description | Write a HTML page consisting of header and body to file. File is without extension. This function adds the html extension | ||
See also | Scheme source file | write-html-page | |
tracing-comment | |||
Form | (tracing-comment) | ||
Description | The result of this function is inserted as an HTML comment on each html page generated. Redefine this function for your own tracing. As of here, it returns the empty string. | ||
See also | Scheme source file | tracing-comment | |
functions using this variable | page page-1 page-with-keypress-script | ||
general-page-message | |||
Form | general-page-message | ||
Description | A message (string) which is presented at the top of every page generated. The default value is the empty string. Must be redefined or re-assigned after the loading of this file. The message is supposed to end with a proper line terminator, such as (br) or (p). | ||
See also | Scheme source file | general-page-message | |
functions using this variable | page page-1 page-with-keypress-script | ||
8 Multi column lists. | |||
The functions in this section return multi-column lists. Given a list of elements the functions return a table in which the elements have been arranged in a number of columns. The first function, multi-column-list, arranges the elements in row major order. The two last functions arrange the the elements in column major order. These are the most advanced functions due to the way tables are organized in HTML. | |||
multi-column-list | |||
Form | (multi-column-list columns elements total-width) | ||
Description | Return a multi-column list, row major, with columns columns. Columns (the first parameter) must be at least 2. The total width (sum of column widths) is given as the last parameter. Internally, a HTML table with zero border is formed and returned. | ||
See also | Scheme source file | multi-column-list | |
two-column-list | |||
Form | (two-column-list elements total-width) | ||
Description | Return a two column list, column major. total-width (sum of column widths) is the width you want the resulting table to have. Internally, a HTML table with zero border is formed and returned. | ||
See also | Scheme source file | two-column-list | |
n-column-list | |||
Form | (n-column-list n elements total-width) | ||
Description | Return an n column list, column-major, of the element list (second parameter). This is a generalized version of two-column-list. total-width (sum of column widths) is the width you want the resulting table to have. n is the number of columns. Internally, a HTML table with zero border is formed and returned. | ||
See also | Scheme source file | n-column-list | |
9 Images and image file access. | |||
The functions in this section determine how images are accessed from this and other libraries. | |||
kn-internet-image-path | |||
Form | kn-internet-image-path | ||
Description | The URL where the author of this library keeps a number of images (icons). This variable is used if image-file-access is the symbol net. | ||
See also | Scheme source file | kn-internet-image-path | |
image-file-path | |||
Form | (image-file-path) | ||
Description | Determination of the actual file path to images in html files. This function depends on the variable image-file-access, which MUST be defined external to this library. The value of image-file-access can be changed via the procedure set-image-file-access! One of the following symbols apply: local, parent, net, sub-directory, or fixed. Default is local. local means that images are taken from the current directory. parent means that images are tagen from ../images. sub-directory means that images are taken from ./images. fixed means that images are taken from fixed-image-directory (a variable which must be defined external to this library). Finally, net means that images are taken from kn-internet-image-path (a variable). | ||
See also | Scheme source file | image-file-path | |
set-image-file-path! | |||
Form | (set-image-file-path! mode) | ||
Description | Set the image-file-access variable. mode is symbol, either local, parent, sub-directory, net, or fixed. Relative to the hmtl directory, where the target files are written. | ||
See also | Scheme source file | set-image-file-path! | |
image-file | |||
Form | (image-file file-name) | ||
Description | Return the full path/address of the image file named file-name. Relies of the setting of the variable image-file-access via the procedure set-image-file-path! File name must include file extension | ||
See also | Scheme source file | image-file | |
img-0 | |||
Form | (img-0 file-name . width) | ||
Description | Return an img tag, in which a file on file-name is presented. An optional width parameter is supported. Corresponds to the old function img in the ad hoc html library. | ||
See also | Scheme source file | img-0 | |
img-with-border | |||
Form | (img-with-border file-name . width) | ||
Description | A variant of img which presents an image with a border | ||
See also | Scheme source file | img-with-border | |
laml-home-button | |||
Form | (laml-home-button extra-level text-or-image . start-dir) | ||
Description | Return an HTML a tag (anchor) which links to the LAML software home page via an small gif icon. If possible, a relative URL is used as the href attribute. The parameter extra-level is an extra level to add. Normally, extra-level is 0 (zero). As an example, extra-level should be 1 in case HTML files are organized in a sub-directory relative to the laml source file. Text-or-image is either the symbol 'text or 'image, or a string. If 'text, a textual anchor is used. if 'image, a small 'laml house' is used as image. If text-or-image is a string it is a name of an image file in the laml image directory (including file name extension, excluding any file path). The optional start-dir gives the directory, in which the home button is to be placed; It defaults to (startup-directory). | ||
See also | Scheme source file | laml-home-button | |
10 Indenting, boxing, and framing. | |||
Here is a number of functions of indentation and frame making. | |||
indent-pixels | |||
Form | (indent-pixels p text) | ||
Description | Indent text with p pixels | ||
See also | Scheme source file | indent-pixels | |
narrow-with-pixels | |||
Form | (narrow-with-pixels p text) | ||
Description | Show text in a column, narrowed from both left and right with p pixels | ||
See also | Scheme source file | narrow-with-pixels | |
frame-1 | |||
Form | (frame-1 text) | ||
Description | Shown text in a simple frame. Has nothing to do with HTML frames. Corresponds to the old function frame in the ad hoc html library. | ||
See also | Scheme source file | frame-1 | |
box | |||
Form | (box text [width]) | ||
Description | Embed text in an invisible (border-less) table with one cell. The optional parameter, width, can be used to control the width of the table cell (defaults to "*"). | ||
See also | Scheme source file | box | |
narrow | |||
Form | (narrow separator-fn width . contents-list) | ||
Description | Present the contents-list, which is a list of elements, in a narrow column of width, separated with activations of separator-fn. | ||
See also | Scheme source file | narrow | |
color-frame | |||
Form | (color-frame text color) | ||
Description | Embed text into a color frame. It is the background which is colored. | ||
See also | Scheme source file | color-frame | |
color-frame-width | |||
Form | (color-frame-width text color width) | ||
Description | As color-frame, but this function supports and extra width parameter. This is an integer: the width of the frame in pixels. | ||
See also | Scheme source file | color-frame-width | |
frame-width | |||
Form | (frame-width text width) | ||
Description | Like frame, but with an extra width parameter. This is an integer: the width of the frame in pixels. | ||
See also | Scheme source file | frame-width | |
center-frame | |||
Form | (center-frame indentation text) | ||
Description | Embed text into a centered frame | ||
See also | Scheme source file | center-frame | |
11 Alphabetical index arrays. | |||
The alphabetic index arrays are useful for presentation of alphabets linking to separate pages in a large index. | |||
alphabetic-link-array | |||
Form | (alphabetic-link-array) | ||
Description | Return an 'array' of letter links to #letter | ||
See also | Scheme source file | alphabetic-link-array | |
alphabetic-link-array-1 | |||
Form | (alphabetic-link-array-1 target-file-prefix alphabet . emphasis-letter) | ||
Description | Return an 'array' of letter links to (string-append target-file-prefix "-" letter ".html") for all letters in alphabet. This is a generalized version of alphabetic-link-array. target-file-prefix is a prefix of the file names, in which the index files are located. alphabet is a list of letters, for which to generate index links from the alphabet arrays. Some letters may be missing from the alphabet compared with a complete alphabet. emphasis-letter is an optional letter which we emphasize in the link array | ||
See also | Scheme source file | alphabetic-link-array-1 | |
12 Substring Coloring. | |||
The function colorize-substring in this section is able to colorize specified substrings of a given string. | |||
colorize-substrings | |||
Form | (colorize-substrings str region-color-list) | ||
Description | This is an advanced function which make font changes to substrings of str.
Surround substrings of str, as specified by the third parameter, in font tags.
Region-color-list is a list of coloring descriptors. Each color descriptor is of the form: (from-string to-string color face multiplicity). Face and multiplicity are optional. From-string and to-strings delimits and identifies a substring of str to colorize etc. color is a list of three integers: a rgb list. We support the following face symbols: italic, bold, typewriter, underlined, plain (default bold). Multiplicity is an integer telling how many times to to attempt the colorization on str (default 1). NB: In strange situations, the fontification of an early region-color-element may affect the searching for latter region-color-elements. This is not an error, but a consequence of the way font tags are puted into str. | ||
See also | Scheme source file | colorize-substrings | |
13 Support of imperative printing of tags. | |||
In some special situations it may be desirable to generate or print fragments of an HTML element in terms of indidual start and end tags. Here we provide for functions which allow us to generate the initial and the final portions of an HTML document in separation from each other. These aspects are purely textual, and has nothing to do with ASTs. There is no HTML validation in play. | |||
pre-page | |||
Form | (pre-page ttl . color-list) | ||
Description | Return the part of an HTML page before the body. | ||
See also | Scheme source file | pre-page | |
pre-page-with-keypress-script | |||
Form | (pre-page-with-keypress-script ttl meta-contributions script-loading script keypress-action bg-color text-color link-color vlink-color . optional-par) | ||
Description | Return a pre-page, without body and trailing html stuff. Used for imperative output of an HTML page. Usage: First call this function, then output the body, and then call post-page or post-page-with-comments. Corresponds to the old function html:pre-page-with-keypress-script in the html-v1 library. With respect to the parameters see the function page-with-keypress-script. | ||
See also | Scheme source file | pre-page-with-keypress-script | |
post-page | |||
Form | (post-page) | ||
Description | Return the part of an HTML page after the body. This includes the end body and the end html tags. | ||
See also | Scheme source file | post-page | |
post-page-with-comments | |||
Form | (post-page-with-comments) | ||
Description | Return the part of an HTML page after the body together with trailing laml standard comment and tracing comment. This includes the end body and the end html tags. Furthermore the laml standard comment and the tracing comment is printed as HTML comments. Corresponds to the old function html:post-page in the html-v1 library. | ||
See also | Scheme source file | post-page-with-comments | |
14 Miscelaneous | |||
copyright-owner | |||
Form | (copyright-owner x) | ||
Description | Embed x into a copyright indication | ||
See also | Scheme source file | copyright-owner | |