;;; sectioning.skb -- Sectioning markups ;;; -*- coding: iso-8859-1 -*- ;;; ;;; Copyright 2007, 2008, 2009, 2012 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; ;;; This file is part of Skribilo. ;;; ;;; Skribilo is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation, either version 3 of the License, or ;;; (at your option) any later version. ;;; ;;; Skribilo is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with Skribilo. If not, see <http://www.gnu.org/licenses/>. ;*---------------------------------------------------------------------*/ ;* dummy-section-output ... */ ;*---------------------------------------------------------------------*/ (define dummy-section-output (lambda (n e) (let* ((t (markup-option n :title)) (b (markup-body n))) (evaluate-document (center (bold t)) e) (output b e)))) ;*---------------------------------------------------------------------*/ ;* Sectioning */ ;*---------------------------------------------------------------------*/ (section :title "Sectioning" :file #t ;*--- chapter ---------------------------------------------------------*/ (subsection :title "Chapter" (p [The function ,(code "chapter") creates new chapters.]) (doc-markup 'chapter `((:title [The title of the chapter.]) (:html-title [The title of window of the HTML browser.]) (:info-node ,[The title of the Info node (see ,(ref :text [Section about the Info engine] :ident "info-engine")).]) (:number [This argument controls the chapter number. A value of ,(tt "#t") means that Skribilo computes the chapter number. A value of ,(tt "#f") means that the chapter has no number. A number or string specifies a number to be used in lieu of the automatically computed number.]) (:toc ,[This argument controls if the chapter must be referenced in the ,(ref :mark "toc" :text "table of contents").]) (:file [The argument must be a boolean or a string. A value of ,(tt "#t") tells the compiler to store that chapter in a separate file; a value of ,(tt "#f") tells the compiler to embed the chapter in the main target file. When the argument is a string, it is used as the name of the file for this chapter.]) (#!rest node... [The nodes of the chapter.])) :see-also '(document section toc)) (example-produce (example :legend [The ,(tt [chapter]) markup] (prgm :file "src/api5.skb")) (disp (processor :combinator (lambda (e1 e2) (let ((e (copy-engine 'document-engine e2))) (markup-writer 'chapter e :options '(:title :file :number :toc) :action dummy-section-output) e)) (include "src/api5.skb"))))) ;*--- section ---------------------------------------------------------*/ (subsection :title "Sections" (p [These functions create new sections.]) (doc-markup 'section `((:title [The title of the chapter.]) (:info-node ,[The title of the Info node (see ,(ref :text [Section about the Info engine] :ident "info-engine")).]) (:number [This argument controls the chapter number. A value of ,(tt "#t") means that Skribilo computes the chapter number. A value of ,(tt "#f") means that the chapter has no number. A number or string specifies a number to be used in lieu of the automatically computed number.]) (:toc ,[This argument controls if the chapter must be referenced in the ,(ref :mark "toc" :text "table of contents").]) (:file [The argument must be a boolean or a string. A value of ,(tt "#t") tells the compiler to store that section in a separate file; a value of ,(tt "#f") tells the compiler to embed the section in the main target file. When the argument is a string, it is used as the name of the file for this section.]) (#!rest node... [The nodes of the section.])) :others '(subsection subsubsection) :see-also '(document chapter paragraph toc))) ;*--- paragraph -------------------------------------------------------*/ (subsection :title "Paragraph" (p [The function ,(code "paragraph") (also aliased ,(code "p")) creates paragraphs.]) (doc-markup 'paragraph '((#!rest node... "The nodes of the paragraph.")) :see-also '(document chapter section p)) (p [The function ,(code "p") is an alias for ,(code "paragraph").]) (doc-markup 'p '((#!rest node... "The nodes of the paragraph.")) :source "skribilo/package/base.scm" :see-also '(document chapter section paragraph))) ;*--- blockquote -----------------------------------------------------*/ (subsection :title "Blockquote" (p [The function ,(code "blockquote") can be used for text quotations. A text quotation is generally renderd as an indented block of text.]) (doc-markup 'blockquote '((#!rest node... "The nodes of the quoted text."))))) ;;; Local Variables: ;;; End: