aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2006-02-20 17:04:14 +0000
committerLudovic Court`es2006-02-20 17:04:14 +0000
commit86ab326c628da803cf983a39768333f58a586bee (patch)
tree18853c887e99190050b5c0f7afc4a457bd18fe5f
parent02d1bf3d462a8356ec62a1c3aa07cb72cd58ea2b (diff)
downloadskribilo-86ab326c628da803cf983a39768333f58a586bee.tar.gz
skribilo-86ab326c628da803cf983a39768333f58a586bee.tar.lz
skribilo-86ab326c628da803cf983a39768333f58a586bee.zip
Lout engine: fixed use of `@Sym' so that it works fine within `@Eq'.
* src/guile/skribilo/engine/lout.scm (lout-symbol-table): Take an additional SYM parameter. Use it instead of blindly using `@Sym'. (lout-engine): Use `{ Symbol Base } @Font @Char' instead of `@Sym'. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-52
-rw-r--r--src/guile/skribilo/engine/lout.scm215
1 files changed, 111 insertions, 104 deletions
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 17eb237..c49211f 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -113,7 +113,7 @@
;*---------------------------------------------------------------------*/
;* lout-symbol-table ... */
;*---------------------------------------------------------------------*/
-(define (lout-symbol-table math)
+(define (lout-symbol-table sym math)
`(("iexcl" "{ @Char exclamdown }")
("cent" "{ @Char cent }")
("pound" "{ @Char sterling }")
@@ -157,7 +157,7 @@
("Ocircumflex" "{ @Char Ocircumflex }")
("Otilde" "{ @Char Otilde }")
("Ouml" "{ @Char Odieresis }")
- ("times" "{ @Sym multiply }")
+ ("times" ,(sym "multiply"))
("Oslash" "{ @Char oslash }")
("Ugrave" "{ @Char Ugrave }")
("Uacute" "{ @Char Uacute }")
@@ -197,100 +197,100 @@
("yacute" "{ @Char yacute }")
("ymul" "{ @Char ydieresis }") ;; FIXME: `yUMl'
;; Greek
- ("Alpha" "{ @Sym Alpha }")
- ("Beta" "{ @Sym Beta }")
- ("Gamma" "{ @Sym Gamma }")
- ("Delta" "{ @Sym Delta }")
- ("Epsilon" "{ @Sym Epsilon }")
- ("Zeta" "{ @Sym Zeta }")
- ("Eta" "{ @Sym Eta }")
- ("Theta" "{ @Sym Theta }")
- ("Iota" "{ @Sym Iota }")
- ("Kappa" "{ @Sym Kappa }")
- ("Lambda" "{ @Sym Lambda }")
- ("Mu" "{ @Sym Mu }")
- ("Nu" "{ @Sym Nu }")
- ("Xi" "{ @Sym Xi }")
- ("Omicron" "{ @Sym Omicron }")
- ("Pi" "{ @Sym Pi }")
- ("Rho" "{ @Sym Rho }")
- ("Sigma" "{ @Sym Sigma }")
- ("Tau" "{ @Sym Tau }")
- ("Upsilon" "{ @Sym Upsilon }")
- ("Phi" "{ @Sym Phi }")
- ("Chi" "{ @Sym Chi }")
- ("Psi" "{ @Sym Psi }")
- ("Omega" "{ @Sym Omega }")
- ("alpha" "{ @Sym alpha }")
- ("beta" "{ @Sym beta }")
- ("gamma" "{ @Sym gamma }")
- ("delta" "{ @Sym delta }")
- ("epsilon" "{ @Sym epsilon }")
- ("zeta" "{ @Sym zeta }")
- ("eta" "{ @Sym eta }")
- ("theta" "{ @Sym theta }")
- ("iota" "{ @Sym iota }")
- ("kappa" "{ @Sym kappa }")
- ("lambda" "{ @Sym lambda }")
- ("mu" "{ @Sym mu }")
- ("nu" "{ @Sym nu }")
- ("xi" "{ @Sym xi }")
- ("omicron" "{ @Sym omicron }")
- ("pi" "{ @Sym pi }")
- ("rho" "{ @Sym rho }")
- ("sigmaf" "{ @Sym sigmaf }") ;; FIXME!
- ("sigma" "{ @Sym sigma }")
- ("tau" "{ @Sym tau }")
- ("upsilon" "{ @Sym upsilon }")
- ("phi" "{ @Sym phi }")
- ("chi" "{ @Sym chi }")
- ("psi" "{ @Sym psi }")
- ("omega" "{ @Sym omega }")
- ("thetasym" "{ @Sym thetasym }")
- ("piv" "{ @Sym piv }") ;; FIXME!
+ ("Alpha" ,(sym "Alpha"))
+ ("Beta" ,(sym "Beta"))
+ ("Gamma" ,(sym "Gamma"))
+ ("Delta" ,(sym "Delta"))
+ ("Epsilon" ,(sym "Epsilon"))
+ ("Zeta" ,(sym "Zeta"))
+ ("Eta" ,(sym "Eta"))
+ ("Theta" ,(sym "Theta"))
+ ("Iota" ,(sym "Iota"))
+ ("Kappa" ,(sym "Kappa"))
+ ("Lambda" ,(sym "Lambda"))
+ ("Mu" ,(sym "Mu"))
+ ("Nu" ,(sym "Nu"))
+ ("Xi" ,(sym "Xi"))
+ ("Omicron" ,(sym "Omicron"))
+ ("Pi" ,(sym "Pi"))
+ ("Rho" ,(sym "Rho"))
+ ("Sigma" ,(sym "Sigma"))
+ ("Tau" ,(sym "Tau"))
+ ("Upsilon" ,(sym "Upsilon"))
+ ("Phi" ,(sym "Phi"))
+ ("Chi" ,(sym "Chi"))
+ ("Psi" ,(sym "Psi"))
+ ("Omega" ,(sym "Omega"))
+ ("alpha" ,(sym "alpha"))
+ ("beta" ,(sym "beta"))
+ ("gamma" ,(sym "gamma"))
+ ("delta" ,(sym "delta"))
+ ("epsilon" ,(sym "epsilon"))
+ ("zeta" ,(sym "zeta"))
+ ("eta" ,(sym "eta"))
+ ("theta" ,(sym "theta"))
+ ("iota" ,(sym "iota"))
+ ("kappa" ,(sym "kappa"))
+ ("lambda" ,(sym "lambda"))
+ ("mu" ,(sym "mu"))
+ ("nu" ,(sym "nu"))
+ ("xi" ,(sym "xi"))
+ ("omicron" ,(sym "omicron"))
+ ("pi" ,(sym "pi"))
+ ("rho" ,(sym "rho"))
+ ("sigmaf" ,(sym "sigmaf")) ;; FIXME!
+ ("sigma" ,(sym "sigma"))
+ ("tau" ,(sym "tau"))
+ ("upsilon" ,(sym "upsilon"))
+ ("phi" ,(sym "phi"))
+ ("chi" ,(sym "chi"))
+ ("psi" ,(sym "psi"))
+ ("omega" ,(sym "omega"))
+ ("thetasym" ,(sym "thetasym"))
+ ("piv" ,(sym "piv")) ;; FIXME!
;; punctuation
- ("bullet" "{ @Sym bullet }")
- ("ellipsis" "{ @Sym ellipsis }")
+ ("bullet" ,(sym "bullet"))
+ ("ellipsis" ,(sym "ellipsis"))
("weierp" "{ @Sym weierstrass }")
- ("image" "{ @Sym Ifraktur }")
- ("real" "{ @Sym Rfraktur }")
- ("tm" "{ @Sym trademarksans }") ;; alt: @Sym trademarkserif
- ("alef" "{ @Sym aleph }")
- ("<-" "{ @Sym arrowleft }")
+ ("image" ,(sym "Ifraktur"))
+ ("real" ,(sym "Rfraktur"))
+ ("tm" ,(sym "trademarksans")) ;; alt: @Sym trademarkserif
+ ("alef" ,(sym "aleph"))
+ ("<-" ,(sym "arrowleft"))
("<--" "{ { 1.6 1 } @Scale { @Sym arrowleft } }") ;; copied from `eqf'
- ("uparrow" "{ @Sym arrowup }")
- ("->" "{ @Sym arrowright }")
+ ("uparrow" ,(sym "arrowup"))
+ ("->" ,(sym "arrowright"))
("-->" "{ { 1.6 1 } @Scale { @Sym arrowright } }")
- ("downarrow" "{ @Sym arrowdown }")
- ("<->" "{ @Sym arrowboth }")
+ ("downarrow" ,(sym "arrowdown"))
+ ("<->" ,(sym "arrowboth"))
("<-->" "{ { 1.6 1 } @Scale { @Sym arrowboth } }")
- ("<+" "{ @Sym carriagereturn }")
- ("<=" "{ @Sym arrowdblleft }")
+ ("<+" ,(sym "carriagereturn"))
+ ("<=" ,(sym "arrowdblleft"))
("<==" "{ { 1.6 1 } @Scale { @Sym arrowdblleft } }")
- ("Uparrow" "{ @Sym arrowdblup }")
- ("=>" "{ @Sym arrowdblright }")
+ ("Uparrow" ,(sym "arrowdblup"))
+ ("=>" ,(sym "arrowdblright"))
("==>" "{ { 1.6 1 } @Scale { @Sym arrowdblright } }")
- ("Downarrow" "{ @Sym arrowdbldown }")
- ("<=>" "{ @Sym arrowdblboth }")
+ ("Downarrow" ,(sym "arrowdbldown"))
+ ("<=>" ,(sym "arrowdblboth"))
("<==>" "{ { 1.6 1 } @Scale { @Sym arrowdblboth } }")
;; Mathematical operators (we try to avoid `@Eq' since it
;; requires to `@SysInclude { eq }' -- one solution consists in copying
;; the symbol definition from `eqf')
("forall" "{ { Symbol Base } @Font \"\\042\" }")
- ("partial" "{ @Sym partialdiff }")
+ ("partial" ,(sym "partialdiff"))
("exists" "{ { Symbol Base } @Font \"\\044\" }")
("emptyset" "{ { Symbol Base } @Font \"\\306\" }")
- ("infinity" "{ @Sym infinity }")
+ ("infinity" ,(sym "infinity"))
("nabla" "{ { Symbol Base } @Font \"\\321\" }")
- ("in" "{ @Sym element }")
- ("notin" "{ @Sym notelement }")
+ ("in" ,(sym "element"))
+ ("notin" ,(sym "notelement"))
("ni" "{ 180d @Rotate @Sym element }")
- ("prod" "{ @Sym product }")
- ("sum" "{ @Sym summation }")
- ("asterisk" "{ @Sym asteriskmath }")
- ("sqrt" "{ @Sym radical }")
+ ("prod" ,(sym "product"))
+ ("sum" ,(sym "summation"))
+ ("asterisk" ,(sym "asteriskmath"))
+ ("sqrt" ,(sym "radical"))
("propto" ,(math "propto"))
- ("angle" "{ @Sym angle }")
+ ("angle" ,(sym "angle"))
("and" ,(math "bwedge"))
("or" ,(math "bvee"))
("cap" ,(math "bcap"))
@@ -299,33 +299,33 @@
("models" ,(math "models"))
("vdash" ,(math "vdash"))
("dashv" ,(math "dashv"))
- ("sim" "{ @Sym similar }")
- ("cong" "{ @Sym congruent }")
- ("approx" "{ @Sym approxequal }")
- ("neq" "{ @Sym notequal }")
- ("equiv" "{ @Sym equivalence }")
- ("le" "{ @Sym lessequal }")
- ("ge" "{ @Sym greaterequal }")
- ("subset" "{ @Sym propersubset }")
- ("supset" "{ @Sym propersuperset }")
- ("subseteq" "{ @Sym reflexsubset }")
- ("supseteq" "{ @Sym reflexsuperset }")
- ("oplus" "{ @Sym circleplus }")
- ("otimes" "{ @Sym circlemultiply }")
- ("perp" "{ @Sym perpendicular }")
- ("mid" "{ @Sym bar }")
- ("lceil" "{ @Sym bracketlefttp }")
- ("rceil" "{ @Sym bracketrighttp }")
- ("lfloor" "{ @Sym bracketleftbt }")
- ("rfloor" "{ @Sym bracketrightbt }")
- ("langle" "{ @Sym angleleft }")
- ("rangle" "{ @Sym angleright }")
+ ("sim" ,(sym "similar"))
+ ("cong" ,(sym "congruent"))
+ ("approx" ,(sym "approxequal"))
+ ("neq" ,(sym "notequal"))
+ ("equiv" ,(sym "equivalence"))
+ ("le" ,(sym "lessequal"))
+ ("ge" ,(sym "greaterequal"))
+ ("subset" ,(sym "propersubset"))
+ ("supset" ,(sym "propersuperset"))
+ ("subseteq" ,(sym "reflexsubset"))
+ ("supseteq" ,(sym "reflexsuperset"))
+ ("oplus" ,(sym "circleplus"))
+ ("otimes" ,(sym "circlemultiply"))
+ ("perp" ,(sym "perpendicular"))
+ ("mid" ,(sym "bar"))
+ ("lceil" ,(sym "bracketlefttp"))
+ ("rceil" ,(sym "bracketrighttp"))
+ ("lfloor" ,(sym "bracketleftbt"))
+ ("rfloor" ,(sym "bracketrightbt"))
+ ("langle" ,(sym "angleleft"))
+ ("rangle" ,(sym "angleright"))
;; Misc
("loz" "{ @Lozenge }")
- ("spades" "{ @Sym spade }")
- ("clubs" "{ @Sym club }")
- ("hearts" "{ @Sym heart }")
- ("diams" "{ @Sym diamond }")
+ ("spades" ,(sym "spade"))
+ ("clubs" ,(sym "club"))
+ ("hearts" ,(sym "heart"))
+ ("diams" ,(sym "diamond"))
("euro" "{ @Euro }")
;; Lout
("dag" "{ @Dagger }")
@@ -693,6 +693,11 @@
:symbol-table (lout-symbol-table
(lambda (m)
+ ;; We don't use `@Sym' because it doesn't
+ ;; work within `@Eq'.
+ (string-append "{ { Symbol Base } @Font "
+ "@Char \"" m "\" }"))
+ (lambda (m)
(format #f "@Eq { ~a }\n" m)))))
@@ -2315,6 +2320,8 @@
;; option trick. FIXME: This would be much more efficient if
;; `ast-parent' would work as expected.
+;; FIXME: See whether `@II' can be useful. Use SRFI-39 parameters.
+
(markup-writer 'it
:before (lambda (node engine)
(let ((bold-children (search-down (lambda (n)