summaryrefslogtreecommitdiff
path: root/doc/user
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user')
-rw-r--r--doc/user/Makefile.am15
-rw-r--r--doc/user/bib.skb4
-rw-r--r--doc/user/document.skb4
-rw-r--r--doc/user/eq.skb2
-rw-r--r--doc/user/links.skb14
-rw-r--r--doc/user/pie.skb69
-rw-r--r--doc/user/sectioning.skb2
-rw-r--r--doc/user/src/Makefile.am6
-rw-r--r--doc/user/src/pie1.skb13
-rw-r--r--doc/user/src/pie2.skb14
-rw-r--r--doc/user/user.skb29
11 files changed, 147 insertions, 25 deletions
diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am
index d53d46c..3428ad5 100644
--- a/doc/user/Makefile.am
+++ b/doc/user/Makefile.am
@@ -4,11 +4,12 @@ EXTRA_DIST = bib.skb char.skb colframe.skb document.skb emacs.skb \
engine.skb enumeration.skb eq.skb examples.skb figure.skb \
font.skb footnote.skb htmle.skb image.skb index.skb \
justify.skb latexe.skb lib.skb line.skb links.skb \
- markup.skb ornament.skb package.skb prgm.skb sectioning.skb \
+ markup.skb ornament.skb package.skb pie.skb prgm.skb sectioning.skb \
skribe-config.skb skribec.skb skribeinfo.skb slide.skb start.skb \
syntax.skb table.skb toc.skb user.skb xmle.skb
-BUILT_SOURCES = user.html
+BUILT_SOURCES = doc-config.scm
+html_DATA = user.html
skribilo = $(top_srcdir)/src/skribilo
load_path = $(top_srcdir)/src/guile:$(top_srcdir)/src/guile/skribilo/package
@@ -19,7 +20,7 @@ load_path = $(top_srcdir)/src/guile:$(top_srcdir)/src/guile/skribilo/package
if HAVE_LOUT
-BUILT_SOURCES += user.ps
+ps_DATA = user.ps
%.lout: %.skb
GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \
@@ -30,3 +31,11 @@ BUILT_SOURCES += user.ps
endif
+if HAVE_PLOTICUS
+doc-config.scm:
+ -echo "(define %have-ploticus? #t)" > $@
+ -echo "(define %ploticus-path \"$(PLOTICUS)\")" >> $@
+else
+doc-config.scm:
+ -echo "(define %have-ploticus? #f) (define %ploticus-path #f)" > $@
+endif
diff --git a/doc/user/bib.skb b/doc/user/bib.skb
index aa357e8..dd7ceb6 100644
--- a/doc/user/bib.skb
+++ b/doc/user/bib.skb
@@ -207,7 +207,7 @@ pre-existing functions for sorting entries:])
(doc-markup 'bib-sort/authors
'((l [The list of entries.]))
:force-engines *api-engines*
- :source "skribilo/skribe/bib.scm"
+ :source "skribilo/biblio.scm"
:others '(bib-sort/idents bib-sort/dates)
:common-args '())
@@ -217,7 +217,7 @@ entries identifier. The last one sorts according to entries date.])
(example-produce
(example :legend "Sorting bibliography entries"
- (prgm :file "skribilo/skribe/bib.scm"
+ (prgm :file "skribilo/biblio.scm"
:definition 'bib-sort/idents)))))
;*---------------------------------------------------------------------*/
diff --git a/doc/user/document.skb b/doc/user/document.skb
index 5797da8..8521af0 100644
--- a/doc/user/document.skb
+++ b/doc/user/document.skb
@@ -39,6 +39,10 @@
(:html-title "The title of window of the HTML browser.")
(:author "The authors of the document.")
(:ending "An ending text.")
+ (:keywords "A list of keywords which may be plain strings
+or markups. The keywords will not appear in the final document but only
+as meta-information (e.g., using the HTML `meta' tag) if the engine used
+supports it.")
(:env "A counter environment.")
(#!rest node... "The document nodes."))
:see-also '(author chapter toc))
diff --git a/doc/user/eq.skb b/doc/user/eq.skb
index 62bd704..d8f4063 100644
--- a/doc/user/eq.skb
+++ b/doc/user/eq.skb
@@ -13,7 +13,7 @@
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
;;; USA.
;;; FIXME: This is a stub and must be completed!
diff --git a/doc/user/links.skb b/doc/user/links.skb
index b454f28..96c5222 100644
--- a/doc/user/links.skb
+++ b/doc/user/links.skb
@@ -76,13 +76,13 @@ section, to bibliographic entries, to source code line number, etc.])
(:mark [A string that is the name of a mark. That mark has
been introduced by a ,(markup-ref "mark") markup.])
(:handle [A Skribe node ,(markup-ref "handle").])
- (:ident [A reference to a node who has been specified
- an ,(param :ident) value.])
- (:figure [The name of a ,(markup-ref "figure").])
- (:chapter [The name of a ,(markup-ref "chapter").])
- (:section [The name of a ,(markup-ref "section").])
- (:subsection [The name of a ,(markup-ref "subsection").])
- (:subsubsection [The name of a ,(markup-ref "subsubsection").])
+ (:ident [The identifier of a node (which was specified
+ as an ,(param :ident) value).])
+ (:figure [The identifier of a ,(markup-ref "figure").])
+ (:chapter [The title of a ,(markup-ref "chapter").])
+ (:section [The title of a ,(markup-ref "section").])
+ (:subsection [The title of a ,(markup-ref "subsection").])
+ (:subsubsection [The title of a ,(markup-ref "subsubsection").])
(:page [A boolean enabling/disabling page reference.])
(:bib ,[A name or a list of names of
,(ref :chapter "Bibliographies" :text "bibliographic") entry.])
diff --git a/doc/user/pie.skb b/doc/user/pie.skb
new file mode 100644
index 0000000..477c3f7
--- /dev/null
+++ b/doc/user/pie.skb
@@ -0,0 +1,69 @@
+;;; Copyright 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+;;;
+;;;
+;;; This program 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 2 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program 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 this program; if not, write to the Free Software
+;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+;;; USA.
+
+;;; FIXME: This is a stub and must be completed!
+
+(chapter :title [Pie Charts] :ident "pie-charts"
+
+ (p [Skribilo contains a pie-chart formatting package, located in the
+,(tt [(skribilo package pie)]) module. It allows users to produces
+represent numeric data as pie charts as in the following example:]
+
+ (disp (pie :title [Use of Document Formatting Systems]
+ :fingers? #t :labels 'outside
+ :initial-angle 90
+ :ident "pie-skribilo-rulez"
+ (slice :weight 10 :color "red" :detach? #t
+ (bold [Skribilo]))
+ (slice :weight 6 :color "green" "Skribe")
+ (slice :weight 6 :color "blue" "Lout")
+ (slice :weight 4 :color "lightgrey" "LaTeX")
+ (slice :weight 2 :color "yellow" "Docbook")
+ (slice :weight 1 :color "black" "others"))))
+
+ (p [A default implementation, which uses ,(ref :text [Ploticus] :url
+"http://ploticus.sf.net") as an external program, is available for all
+engines. There is also a specific implementation for the Lout engine
+which relies on Lout's own pie-chart package. In the latter case, you
+don't need to have Ploticus installed, but you need it in the former.])
+ (p [Currently it only supports slice-coloring, but support for
+textures (particularly useful for black & white printouts) could be
+added in the future.])
+
+ (section :title [Syntax]
+
+ (p [Let us start with a simple example:]
+
+ (example-produce
+ (example :legend "Example of a pie chart"
+ (prgm :file "src/pie1.skb"))
+ (disp (include "src/pie1.skb"))))
+
+ (p [This illustrates the three markups provided by the ,(tt [pie])
+package, namely ,(tt [pie]), ,(tt [slice]), and ,(tt [sliceweight]).
+This last markup returns the weight of the slice it is used in, be it as
+a percentage or an absolute value. Note that the ,(tt [:total]) option
+of ,(tt [pie]) can be used to create pie charts no entirely filled.])
+ (p [Various options allow the pie layout to be controlled:]
+
+ (example-produce
+ (example :legend "Specifying the layout of a pie chart"
+ (prgm :file "src/pie2.skb"))
+ (disp (include "src/pie2.skb"))))))
+
+;;; arch-tag: 60382016-3a63-4466-83e0-46a259cb39ab
diff --git a/doc/user/sectioning.skb b/doc/user/sectioning.skb
index 5f1dc3f..9d11d08 100644
--- a/doc/user/sectioning.skb
+++ b/doc/user/sectioning.skb
@@ -101,7 +101,7 @@ paragraphs.])
(p [The function ,(code "p") is an alias for ,(code "paragraph").])
(doc-markup 'p
'((#!rest node... "The nodes of the paragraph."))
- :source "skribilo/skribe/api.scm"
+ :source "skribilo/package/base.scm"
:see-also '(document chapter section paragraph)))
;*--- blockquote -----------------------------------------------------*/
diff --git a/doc/user/src/Makefile.am b/doc/user/src/Makefile.am
index 6d7daf4..6c61a1f 100644
--- a/doc/user/src/Makefile.am
+++ b/doc/user/src/Makefile.am
@@ -4,8 +4,8 @@ EXTRA_DIST = api1.skb api10.skb api11.skb api12.skb api13.skb \
api4.skb api5.skb api6.skb api7.skb api8.skb \
api9.skb bib1.sbib bib2.skb bib3.skb bib4.skb \
bib5.skb bib6.skb eq1.skb eq2.skb index1.skb \
- index2.skb index3.skb links1.skb links2.skb prgm1.skb \
- prgm2.skb prgm3.skb slides.skb start1.skb start2.skb \
- start3.skb start4.skb start5.skb
+ index2.skb index3.skb links1.skb links2.skb pie1.skb pie2.skb \
+ prgm1.skb prgm2.skb prgm3.skb slides.skb \
+ start1.skb start2.skb start3.skb start4.skb start5.skb
## arch-tag: 9614a784-cac2-4399-bd61-18c9172f48a8
diff --git a/doc/user/src/pie1.skb b/doc/user/src/pie1.skb
new file mode 100644
index 0000000..0d0fd0b
--- /dev/null
+++ b/doc/user/src/pie1.skb
@@ -0,0 +1,13 @@
+;; A sad pie chart.
+;;
+
+(pie :title [Casualties in the Israel-Lebanon 2006 Conflict (source:
+English Wikipedia page, 2006-07-23)]
+ :total 450 ;; to show the uncertainty on figures
+ :ident "pie-lebanon-2006"
+ :labels 'outside :fingers? #t
+
+ (slice :weight 8 :color "black" [Hezbollah militants])
+ (slice :weight 42 :color "blue" [soldiers])
+ (slice :weight 317 :color "red" :detach? #t
+ [civilians (,(sliceweight :percentage? #t)%)]))
diff --git a/doc/user/src/pie2.skb b/doc/user/src/pie2.skb
new file mode 100644
index 0000000..84b5394
--- /dev/null
+++ b/doc/user/src/pie2.skb
@@ -0,0 +1,14 @@
+;; Another sad pie chart.
+;;
+
+(pie :title [Casualties of the Conflict in Iraq since 2003 (source:
+English Wikipedia page, 2006-07-23)]
+ :ident "pie-iraq-2006"
+ :fingers? #f
+ :labels 'inside
+ :initial-angle 45
+ :radius 2
+
+ (slice :weight 100000 :color "red" :detach? #t
+ [civilians (,(sliceweight :percentage? #t)%)])
+ (slice :weight (+ 2555 229) :color #xeeeeee [soldiers]))
diff --git a/doc/user/user.skb b/doc/user/user.skb
index f6a25ef..d1f9287 100644
--- a/doc/user/user.skb
+++ b/doc/user/user.skb
@@ -20,7 +20,13 @@
;*---------------------------------------------------------------------*/
;* Packages */
;*---------------------------------------------------------------------*/
-(use-modules (skribilo package eq))
+(use-modules (skribilo package eq)
+ (skribilo package pie))
+
+;; Load the compile-time configuration file.
+(load "doc-config.scm")
+
+(if %have-ploticus? (set! %ploticus-program %ploticus-path))
;*---------------------------------------------------------------------*/
;* HTML custom */
@@ -49,6 +55,8 @@
;* The document */
;*---------------------------------------------------------------------*/
(document :title "Skribilo User Manual"
+ :keywords '("Skribilo" "Skribe" "User Manual" "text processing"
+ "HTML" "LaTeX" "Lout" "PostScript" "PDF")
:env '((example-counter 0) (example-env ()))
:author (list (author :name "Erick Gallesio"
:affiliation "Université de Nice - Sophia Antipolis"
@@ -59,14 +67,14 @@
(author :name "Ludovic Courtès"
:email (mailto *courtes-mail*)))
- (linebreak 1)
- (center (frame (bold (font :size 1. [
-This is the documentation for Skribe version
-,(color :fg "red" (skribe-release)).]))))
- (linebreak 1)
+(p :class "welcome"
+ [Welcome to the User Manual for Skribilo version ,(skribe-release).
+If you are new to Skribilo, please read the ,(ref :ident "intro"
+:text [introduction]) first.])
+
;;; Introduction
-(chapter :title "Introduction" :number #f :toc #f :file #f [
+(chapter :title "Introduction" :ident "intro" :number #f :toc #t :file #f [
Skribe is a programming language designed for implementing electronic
documents. It is mainly designed for the writing of technical documents
such as the documentation of computer programs. With Skribe these
@@ -79,7 +87,9 @@ produce a high-quality printed document, and so on.]
Everyone needing to design web pages, info documents, man pages or
Postscript files can use Skribe. In particular, there is ,(bold "no need")
for programming skills in order to use Skribe. Skribe can be used as
-any text description languages such as TeX, LaTeX or HTML.])
+any text description languages such as ,(ref :text [LaTeX] :url
+"http://latex-project.org/"), ,(ref :text [Lout] :url
+"http://lout.sf.net/") or HTML.])
(section :title "Why using Skribe?" :number #f [
There are three main reasons for using Skribe:]
@@ -132,6 +142,9 @@ as HTML, Info pages, man pages, Postscript, etc.]))))
;;; Equations
(include "eq.skb")
+;;; Pie charts
+(if %have-ploticus? (include "pie.skb"))
+
;;; Standard Library
(include "lib.skb")