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/eq.skb | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'doc/user/eq.skb') 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