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/eq.skb | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 doc/user/eq.skb (limited to 'doc/user/eq.skb') diff --git a/doc/user/eq.skb b/doc/user/eq.skb new file mode 100644 index 0000000..a611f88 --- /dev/null +++ b/doc/user/eq.skb @@ -0,0 +1,79 @@ +;;; eq.skb -- Equation formatting. +;;; +;;; Copyright 2006 Ludovic Courtès +;;; +;;; +;;; 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 [Equation Formatting] + + (p [Skribilo comes with an equation formatting package. This package +may be loaded by adding the following form at the top of your document:] + + (disp (prog (source :language scheme + [(use-modules (skribilo package eq))]))) + + [It allows the inclusion of (complex) equations in your documents, +such as, for example, the following:] + + (disp (eq :renderer (if (engine-format? "html") 'lout #f) + :ident "eq-disponibilite" + `(= (apply A D) + (sum :from (= i b) :to (* S b) + (* (script :sup (* S b) :sub i C) + (* (expt mu i) + (expt (- 1 mu) + (- (* S b) i)))))))) + + [This chapter will describe the syntactic facilities available to +describe equations, as well as the rendering options.]) + + (section :title [Syntax] + + (p [To start with, let's have a look at a concrete example. ] + + (example-produce + (example :legend "Example of a simple equation using the verbose syntax" + (prgm :file "src/eq1.skb")) + (disp (include "src/eq1.skb"))) + + [In this example, the ,(tt [eq:]) sub-markups are used pretty +much like any other kind of markup. However, the resulting syntax +is very verbose and hard to read.]) + + (p [Fortunately, the ,(tt [eq]) package allows for the use of a +much simple syntax. ] + + (example-produce + (example :legend "Example of a simple equation" + (prgm :file "src/eq2.skb")) + (disp (include "src/eq2.skb"))) + + [Readers familiar with the Lisp family of programming languages +may have already recognized its ,(emph [prefix notation]). Note that, +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 (,(ref :text [see subsection] +:subsection "Symbols")).])) + + (section :title [Rendering]) + + ) + +;;; arch-tag: e9c83c13-205f-4f68-9100-b445c21b959c -- cgit v1.2.3 From 9d5dfa5b32e1dcf98cb4878322d00150477a8225 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sat, 2 Dec 2006 10:41:59 +0000 Subject: doc: Documented `eq' and the `:div-style' option. * doc/user/char.skb (Symbols): Added an ident. * doc/user/eq.skb (Equation Formatting)[Summary]: New section. Use `doc-markup' as should have already been the case and document `:div-style'. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-23 --- doc/user/char.skb | 1 + doc/user/eq.skb | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'doc/user/eq.skb') diff --git a/doc/user/char.skb b/doc/user/char.skb index 16c4625..b2f94e2 100644 --- a/doc/user/char.skb +++ b/doc/user/char.skb @@ -67,6 +67,7 @@ are replaced with the actual values of the arguments ,(param 'node).]) ;*--- Symbols ---------------------------------------------------------*/ (subsection :title "Symbols" + :ident "symbols" (p [The function ,(code "symbol") introduces special symbols in the produced file. Note that the rendering of symbols is unportable. It depends diff --git a/doc/user/eq.skb b/doc/user/eq.skb index a611f88..455832b 100644 --- a/doc/user/eq.skb +++ b/doc/user/eq.skb @@ -57,7 +57,7 @@ much like any other kind of markup. However, the resulting syntax is very verbose and hard to read.]) (p [Fortunately, the ,(tt [eq]) package allows for the use of a -much simple syntax. ] +much simpler syntax. ] (example-produce (example :legend "Example of a simple equation" @@ -69,10 +69,30 @@ may have already recognized its ,(emph [prefix notation]). Note that, 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 (,(ref :text [see subsection] -:subsection "Symbols")).])) +need to use the ,(tt [symbol]) markup (,(numref :text [see Section] +:ident "symbols")).])) + ;; FIXME: Write this. (section :title [Rendering]) + + (section :title [Summary] + + (p [The options available for the top-level ,(code [eq]) markup +are summarized here:]) + + (doc-markup 'eq + `((:inline? [A boolean indicating whether the equation +is to appear "inline", i.e., within a paragraph. If the engine supports +it, it may adjust various parameters such as in-equation spacing +accordingly.]) + (:renderer [The engine that should be used to render +the equation. This allows, for instance, to use the Lout engine to +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.])) + :source "skribilo/package/eq.scm")) ) -- 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/eq.skb') 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 From fedce06edf8768b927ca91fb22ade620ac77ec2a Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 3 Dec 2006 21:54:14 +0000 Subject: doc: Updated the `eq' markup documentation. * doc/user/eq.skb: Updated documentation of `eq': the `inline?' parameter and the `:mul-style' parameter. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-33 --- ChangeLog | 14 ++++++++++++++ doc/user/eq.skb | 11 ++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'doc/user/eq.skb') diff --git a/ChangeLog b/ChangeLog index 4a740d7..52f6d53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2 # +2006-12-03 20:02:17 GMT Ludovic Courtes patch-91 + + Summary: + doc: Updated the `eq' markup documentation. + Revision: + skribilo--devel--1.2--patch-91 + + * doc/user/eq.skb: Updated documentation of `eq': the `inline?' + parameter and the `:mul-style' parameter. + + modified files: + ChangeLog doc/user/eq.skb + + 2006-12-03 19:59:46 GMT Ludovic Courtes patch-90 Summary: diff --git a/doc/user/eq.skb b/doc/user/eq.skb index 1ef0208..fb8c3ef 100644 --- a/doc/user/eq.skb +++ b/doc/user/eq.skb @@ -90,13 +90,18 @@ particular operator. ] are summarized here:]) (doc-markup 'eq - `((:inline? [A boolean indicating whether the equation -is to appear "inline", i.e., within a paragraph. If the engine supports -it, it may adjust various parameters such as in-equation spacing + `((:inline? [If ,(code [auto]), Skribilo will +automatically determine whether the equation is to be "in-line". +Otherwise, it should be a boolean indicating whether the equation is to +appear "in-line", i.e., within a paragraph. If the engine supports it, +it may adjust various parameters such as in-equation spacing accordingly.]) (:renderer [The engine that should be used to render the equation. This allows, for instance, to use the Lout engine to render equations in HTML.]) + (:mul-style [A symbol denoting the default style for +multiplications. This should be one of ,(code [space]), ,(code +[cross]), ,(code [asterisk]) or ,(code [dot]).]) (: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 -- cgit v1.2.3