From d4360259d60722eaa175a483f792fce7b8c66d97 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Wed, 11 Oct 2006 07:43:47 +0000 Subject: slide: Propagate the `outline?' parameter in `slide-(sub)?topic'. * src/guile/skribilo/package/slide.scm (slide-topic): Propagate the `outline?' parameter as an option. (slide-subtopic): Likewise. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-1 --- doc/user/src/Makefile.am | 11 +++++++++++ doc/user/src/api14.skb | 2 +- doc/user/src/api16.skb | 10 +++++----- doc/user/src/api2.skb | 2 +- doc/user/src/api20-html.skb | 2 ++ doc/user/src/api20-lout.skb | 2 ++ doc/user/src/api20.skb | 2 -- doc/user/src/bib1.sbib | 2 ++ doc/user/src/eq1.skb | 6 ++++++ doc/user/src/eq2.skb | 3 +++ doc/user/src/links1.skb | 2 +- doc/user/src/pie1.skb | 13 +++++++++++++ doc/user/src/pie2.skb | 14 ++++++++++++++ doc/user/src/slides.skb | 34 ++++++++++++++++++++-------------- doc/user/src/start3.skb | 4 ++-- doc/user/src/start4.skb | 8 ++++---- doc/user/src/start5.skb | 2 +- 17 files changed, 88 insertions(+), 31 deletions(-) create mode 100644 doc/user/src/Makefile.am create mode 100644 doc/user/src/api20-html.skb create mode 100644 doc/user/src/api20-lout.skb delete mode 100644 doc/user/src/api20.skb create mode 100644 doc/user/src/eq1.skb create mode 100644 doc/user/src/eq2.skb create mode 100644 doc/user/src/pie1.skb create mode 100644 doc/user/src/pie2.skb (limited to 'doc/user/src') diff --git a/doc/user/src/Makefile.am b/doc/user/src/Makefile.am new file mode 100644 index 0000000..6c61a1f --- /dev/null +++ b/doc/user/src/Makefile.am @@ -0,0 +1,11 @@ +EXTRA_DIST = api1.skb api10.skb api11.skb api12.skb api13.skb \ + api14.skb api15.skb api16.skb api17.skb api18.skb \ + api19.skb api2.skb api20-html.skb api20-lout.skb api3.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 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/api14.skb b/doc/user/src/api14.skb index a3ede40..e9dd370 100644 --- a/doc/user/src/api14.skb +++ b/doc/user/src/api14.skb @@ -6,4 +6,4 @@ (center (figure :legend "The great Penguin" - (image :file "linux.gif"))) + (image :file "linux.png"))) diff --git a/doc/user/src/api16.skb b/doc/user/src/api16.skb index a9d5705..6be4283 100644 --- a/doc/user/src/api16.skb +++ b/doc/user/src/api16.skb @@ -1,5 +1,5 @@ -(image :file "linux.gif" "A first image") -(image :height 50 :file "linux.gif" "A smaller one") -(image :file "bsd.gif" "A second image") -(image :width 50 :file "bsd.gif") -(image :width 200 :height 40 :file "bsd.gif") +(image :file "linux.png" "A first image") +(image :height 50 :file "linux.png" "A smaller one") +(image :file "bsd.png" "A second image") +(image :width 50 :file "bsd.png") +(image :width 200 :height 40 :file "bsd.png") diff --git a/doc/user/src/api2.skb b/doc/user/src/api2.skb index 2c20965..4a89705 100644 --- a/doc/user/src/api2.skb +++ b/doc/user/src/api2.skb @@ -1,4 +1,4 @@ -(document :title "This is a Scribe document" +(document :title "This is a Skribilo document" :author (list (author :name "Foo" :email (mailto "foo@nowhere.org")) (author :name "Bar" :email (mailto "bar@anywhere.org")) (author :name "Gee" :email (mailto "gee@nowhere.org"))) diff --git a/doc/user/src/api20-html.skb b/doc/user/src/api20-html.skb new file mode 100644 index 0000000..686efcb --- /dev/null +++ b/doc/user/src/api20-html.skb @@ -0,0 +1,2 @@ +[A simple ,(! "string"). A more annoying one ,(! "string"). +A last one with arguments ,(! "$1 $2" (bold 1) (it 2)).] diff --git a/doc/user/src/api20-lout.skb b/doc/user/src/api20-lout.skb new file mode 100644 index 0000000..89fb961 --- /dev/null +++ b/doc/user/src/api20-lout.skb @@ -0,0 +1,2 @@ +[A simple ,(! "string"). A more annoying one ,(! "@B { string }"). +A last one with arguments ,(! "@Underline { $1 $2 }" (bold 1) (it 2)).] diff --git a/doc/user/src/api20.skb b/doc/user/src/api20.skb deleted file mode 100644 index 686efcb..0000000 --- a/doc/user/src/api20.skb +++ /dev/null @@ -1,2 +0,0 @@ -[A simple ,(! "string"). A more annoying one ,(! "string"). -A last one with arguments ,(! "$1 $2" (bold 1) (it 2)).] diff --git a/doc/user/src/bib1.sbib b/doc/user/src/bib1.sbib index 3f1c04f..6afff71 100644 --- a/doc/user/src/bib1.sbib +++ b/doc/user/src/bib1.sbib @@ -12,6 +12,8 @@ (year "1991")) (misc bigloo + (author "Manuel Serrano") + (year "2006") (url "http://www.inria.fr/mimosa/fp/Bigloo")) (misc scheme:r4rs diff --git a/doc/user/src/eq1.skb b/doc/user/src/eq1.skb new file mode 100644 index 0000000..bbd0742 --- /dev/null +++ b/doc/user/src/eq1.skb @@ -0,0 +1,6 @@ +;; The golden ratio, phi. +(eq (eq:= (symbol "phi") + (eq:/ (eq:+ 1 (eq:sqrt 5)) + 2))) + + diff --git a/doc/user/src/eq2.skb b/doc/user/src/eq2.skb new file mode 100644 index 0000000..199fd7d --- /dev/null +++ b/doc/user/src/eq2.skb @@ -0,0 +1,3 @@ +;; The golden ratio, phi. +(eq '(= phi (/ (+ 1 (sqrt 5)) 2))) + diff --git a/doc/user/src/links1.skb b/doc/user/src/links1.skb index e0ce61c..e0b393b 100644 --- a/doc/user/src/links1.skb +++ b/doc/user/src/links1.skb @@ -1,6 +1,6 @@ [This hyperlink points to the ,(ref :figure "The great Penguin" :text "figure") of the chapter ,(ref :chapter "Standard Markups") (or also, the -,(ref :ident "Standard Markups" :text "chapter") about markups). +,(ref :ident "std-markups" :text "chapter") about markups). In the second example of reference, no ,(code ":text") option is specified: ,(ref :figure "The great Penguin"). One may use the ,(param ":ident") field when specified such as: ,(ref :ident "fig1") or ,(ref :figure "fig1"). 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/src/slides.skb b/doc/user/src/slides.skb index ac584d1..e5e6896 100644 --- a/doc/user/src/slides.skb +++ b/doc/user/src/slides.skb @@ -6,22 +6,28 @@ :address (ref :url "http://www.inria.fr/mimosa/Manuel.Serrano")) (if (engine-format? "html") - (slide :title "Table of contents" :number #f :toc #f - (toc :chapter #f :section #f :subsection #f :subsubsection #f - :slide #t))) + (slide :title "Table of Contents" :number #f :toc #f + (toc :chapter #f :section #f :subsection #f :subsubsection #f))) +;;; :slide #t))) + + (slide :title "Introduction" :vspace 0.3 + + (p [This is a simple slide, not grouped in any topic.])) - (slide :title "X11 client" :toc #t :vspace 0.3 + (slide-topic :title "Interactive Features" :outline? #t - (itemize - (item "xlock") - (item "xeyes") - (item "xterm"))) + (slide :title "X11 client" :toc #t :vspace 0.3 - (slide :title "Xclock" :toc #t :vspace 0.3 + (itemize + (item "xlock") + (item "xeyes") + (item "xterm"))) - (center (sf (underline "The Unix xclock client"))) - (slide-vspace 0.3) + (slide :title "Xclock" :toc #t :vspace 0.3 - (slide-pause) - (slide-embed :command "xlock" - :alt (frame "Can't run embedded application")))) + (center (sf (underline "The Unix xclock client"))) + (slide-vspace 0.3) + + (slide-pause) + (slide-embed :command "xlock" + :alt (frame "Can't run embedded application"))))) diff --git a/doc/user/src/start3.skb b/doc/user/src/start3.skb index 0705966..65fa738 100644 --- a/doc/user/src/start3.skb +++ b/doc/user/src/start3.skb @@ -1,9 +1,9 @@ (document :title [Hello World!] -(section :title [A first Section] [ +(chapter :title [A first Section] [ This is a ,(bold [very]) ,(it [simple]) ,(color :fg [red] [text]).]) -(section :title [A second Section] [ +(chapter :title [A second Section] [ That section contains an ,(bold itemize) construction: ,(itemize (item [first item]) (item [second item]) diff --git a/doc/user/src/start4.skb b/doc/user/src/start4.skb index 3311925..31fba0c 100644 --- a/doc/user/src/start4.skb +++ b/doc/user/src/start4.skb @@ -1,13 +1,13 @@ -(document :title [Various links] [ +(document :title [Various links] -(section :title "A Section" [ + (chapter :title "A Section" [ The first link points to an external web page. Here we point to a ,(ref :url [http://slashdot.org/] [Slashdot]) web page. The second one points to the second ,(ref :section [A second Section] [Section]) of that document.]) -(section :title [A second Section] [ + (chapter :title [A second Section] [ The last links points to the first ,(ref :scribe [user.scr] :figure [A simple web page] [Figure]) -of the Scribe User Manual.])]) +of the Scribe User Manual.])) diff --git a/doc/user/src/start5.skb b/doc/user/src/start5.skb index 9e6b877..6977608 100644 --- a/doc/user/src/start5.skb +++ b/doc/user/src/start5.skb @@ -6,4 +6,4 @@ (itemize (map (lambda (x) (item (it (markup-option x :title)))) - sects))))) \ No newline at end of file + sects))))) -- cgit v1.2.3 From 8704dcc76f1419fe915b53d574bf2f8e72a28be8 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Thu, 12 Oct 2006 16:08:38 +0000 Subject: doc: Fixed the Fibonacci example in ``Computer Programs''. * doc/user/prgm.skb: Use title case for the chapter title. * doc/user/src/prgm2.skb: Fixed the line numbers for `fib'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-4 --- doc/user/prgm.skb | 2 +- doc/user/src/prgm2.skb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/user/src') diff --git a/doc/user/prgm.skb b/doc/user/prgm.skb index 6fb44c9..1007268 100644 --- a/doc/user/prgm.skb +++ b/doc/user/prgm.skb @@ -29,7 +29,7 @@ ;*---------------------------------------------------------------------*/ ;* Computer programs */ ;*---------------------------------------------------------------------*/ -(chapter :title "Computer programs" +(chapter :title "Computer Programs" (p [It is common that some parts of a Skribe text represent other texts. For instance, for a document describing a computer programming diff --git a/doc/user/src/prgm2.skb b/doc/user/src/prgm2.skb index 5b5644b..2996cc8 100644 --- a/doc/user/src/prgm2.skb +++ b/doc/user/src/prgm2.skb @@ -5,8 +5,8 @@ ;!start (frame :width 100. - (prog :line 11 :mark #f - (source :language skribe :file "prgm.skb" :start 11 :stop 24))) + (prog :line 21 :mark #f + (source :language skribe :file "prgm.skb" :start 20 :stop 27))) ;!stop (p [Here is the source of the frame above:]) -- cgit v1.2.3 From b0e202992a38753888465fa8fb1331ac31f838ec Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sat, 25 Nov 2006 17:41:44 +0000 Subject: doc: Documented `numref'. * doc/user/links.skb (Reference): Added identifier `refs'. [ref](page): Explain that this option is hardcopy-specific. [numref]: New. * doc/user/src/links1.skb: Show `numref' usage. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-20 --- doc/user/links.skb | 24 +++++++++++++++++++----- doc/user/src/links1.skb | 4 ++++ 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'doc/user/src') diff --git a/doc/user/links.skb b/doc/user/links.skb index ae7301c..c6e37a0 100644 --- a/doc/user/links.skb +++ b/doc/user/links.skb @@ -71,9 +71,9 @@ automatically sets a mark whose value is the legend of the figure.])) ;*---------------------------------------------------------------------*/ ;* ref ... @label ref@ */ ;*---------------------------------------------------------------------*/ -(section :title "Reference" +(section :title "Reference" :ident "refs" -(p [Skribe proposes only one single function for all the references. +(p [Skribilo proposes a single function that can be used for most references. This same ,(code "ref") function is used for introducing references to section, to bibliographic entries, to source code line number, etc.]) @@ -92,7 +92,8 @@ section, to bibliographic entries, to source code line number, etc.]) (: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.]) + (:page [A boolean enabling/disabling page reference (for + hard copies as produced by the Lout and LaTeX engines).]) (:bib ,[A name or a list of names of ,(ref :chapter "Bibliographies" :text "bibliographic") entry.]) (:bib-table ,[The @@ -108,8 +109,21 @@ section, to bibliographic entries, to source code line number, etc.]) a ,(tt "mark") located in the Skribe document described by the ,(var "file") ,(sc "sui").])) :force-args '(:url :bib :line :skribe) - :see-also '(index)) - + :see-also '(index numref)) + +(p [Sometimes, it is useful to produce phrases that refer a section by +its number, as in ``See Section 2.3''. This is especially useful on +printed documents, as produced by the Lout and LaTeX engines. The +,(code "numref") markup is provided to that end:]) + +(doc-markup 'numref + `((:text [Text preceding the reference number.]) + (:ident [The identifier of the node (a chapter, section, + subsection, etc.) being referenced.]) + (:page [A boolean enabling/disabling page reference (for + hard copies as produced by the Lout and LaTeX engines).]) + (:separator [The separator between numbers.])) + :see-also '(ref)) (example-produce (example :legend "Some references" (prgm :file "src/links1.skb")) diff --git a/doc/user/src/links1.skb b/doc/user/src/links1.skb index e0b393b..bfe6f86 100644 --- a/doc/user/src/links1.skb +++ b/doc/user/src/links1.skb @@ -10,6 +10,10 @@ That other one points to a well known ,(ref :url "http://slashdot.org/" :text "url"). The same without ,(code ":text"): ,(ref :url "http://slashdot.org/"). +,(linebreak) +And one can also refer to sections by number, as in ``see ,(numref :text +[Wonderful Section] :ident "refs")''. + ,(linebreak) With more complex tricks that are explained in Section ,(ref :section "Resolve"), it is also possible use, for the text of the -- cgit v1.2.3 From 67142b1e7b350765ce68cb0b89668d5b3abc034b Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sat, 2 Dec 2006 10:45:56 +0000 Subject: doc: Augmented the `eq' doc, documented `eq-display'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-27 --- doc/user/eq.skb | 25 +++++++++++++++++++++++-- doc/user/src/eq3.skb | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 doc/user/src/eq3.skb (limited to 'doc/user/src') diff --git a/doc/user/eq.skb b/doc/user/eq.skb index 455832b..1ef0208 100644 --- a/doc/user/eq.skb +++ b/doc/user/eq.skb @@ -70,7 +70,16 @@ unlike in the previous example, the equation itself if ,(emph [quoted]), that is, preceded by the ,(tt [']) sign. Additionally, when referring to a symbol (such as the Greek letter ,(symbol "phi")), you no longer need to use the ,(tt [symbol]) markup (,(numref :text [see Section] -:ident "symbols")).])) +:ident "symbols")).]) + + (p [It is possible to create ,(emph [equation display blocks]), +where several equations are displayed and aligned according to a +particular operator. ] + + (example-produce + (example :legend "Inlined, displayed, and aligned equations" + (prgm :file "src/eq3.skb")) + (disp (include "src/eq3.skb"))))) ;; FIXME: Write this. (section :title [Rendering]) @@ -91,7 +100,19 @@ render equations in HTML.]) (:div-style [A symbol denoting the default style for divisions. This should be one of ,(code [over]), ,(code [fraction]), ,(code [div]) and ,(code [slash]). Per-,(code [eq:/]) ,(code -[:div-style]) options override this setting.])) +[:div-style]) options override this setting.]) + (:align-with [Within a ,(code [eq-display]) block, +this should be a symbol specifying according to which operator equations +are to be aligned with one another.])) + :source "skribilo/package/eq.scm") + + (p [Equation display blocks can be defined using ,(code +[eq-display]). Display blocks define the scope of the alignment among +equations as specified by the ,(code [:align-with]) options of ,(code +[eq]).]) + + (doc-markup 'eq-display + `() :source "skribilo/package/eq.scm")) ) diff --git a/doc/user/src/eq3.skb b/doc/user/src/eq3.skb new file mode 100644 index 0000000..e229b6c --- /dev/null +++ b/doc/user/src/eq3.skb @@ -0,0 +1,38 @@ +(p [This paragraph contains this equation: ,(eq :inline? #t '(/ alpha +beta)). This is actually an ,(emph [inline]) equation, meaning that it +occurs within a paragraph. Typesetting has to be adjusted +accordingly.]) + +(eq-display + + (p [This is an equation display block, within which equations can be +aligned with one another.]) + + (eq :ident "eq-limit-b-over-l" + :renderer 'lout + :align-with '= + '(= (limit (/ lambda beta) 0 + (apply IPL n k)) + + ;; non-simplified + (/ (expt (+ alpha beta) k) + (* beta + (sum :from (= x 0) + :to (- k 1) + (* (combinations k x) + (expt beta (- k 1 x)) + (expt alpha x))))))) + + [This equation can be simplified as follows:] + + (eq :ident "eq-limit-b-over-l-simplified" + :renderer 'lout + :align-with '= + '(= ;; simplified + (/ (expt (+ alpha beta) k) + (- (expt (+ alpha beta) k) + (expt alpha k))) + + (limit (/ lambda beta) 0 + (apply IPL n k))))) + -- cgit v1.2.3