summaryrefslogtreecommitdiff
path: root/doc/user/eq.skb
diff options
context:
space:
mode:
authorLudovic Courtes2006-02-28 20:08:45 +0000
committerLudovic Courtes2006-02-28 20:08:45 +0000
commit9c00c232438cb83430397080e1c810aa33da460a (patch)
treeb7898ddffdc4f95de1c058b9c815aeddf7c6503c /doc/user/eq.skb
parenta0d8397787ffcaaec7c885542fb5e7f3de3fdc9a (diff)
parent22ad7aedd2d325150f4e54d7e8cf123fbc4a32b1 (diff)
downloadskribilo-9c00c232438cb83430397080e1c810aa33da460a.tar.gz
skribilo-9c00c232438cb83430397080e1c810aa33da460a.tar.lz
skribilo-9c00c232438cb83430397080e1c810aa33da460a.zip
Merge from lcourtes@laas.fr--2004-libre
Patches applied: * lcourtes@laas.fr--2004-libre/skribilo--devel--1.2 (patch 55-59) - Made `make-string-replace' faster. - `eq': Implemented the text-based markup writers. - `eq': Added the `:renderer' option to `eq'. Support `lout'. - Changed the way `slide' implementations are loaded. Doc is buildable now. - Doc: Added a chapter (stub) about the `eq' package. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-36
Diffstat (limited to 'doc/user/eq.skb')
-rw-r--r--doc/user/eq.skb77
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/user/eq.skb b/doc/user/eq.skb
new file mode 100644
index 0000000..62bd704
--- /dev/null
+++ b/doc/user/eq.skb
@@ -0,0 +1,77 @@
+;;; 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+;;; 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