diff options
author | Ludovic Courtès | 2012-05-29 23:30:10 +0200 |
---|---|---|
committer | Ludovic Courtès | 2012-05-29 23:30:10 +0200 |
commit | 401d6f8f681e758c7cf391475d758db32135b1bd (patch) | |
tree | fd1bad9daaf710965989e9e003071c4db143a214 | |
parent | 979fc843a85ef8445c11cadc7d093184090f30c7 (diff) | |
download | skribilo-401d6f8f681e758c7cf391475d758db32135b1bd.tar.gz skribilo-401d6f8f681e758c7cf391475d758db32135b1bd.tar.lz skribilo-401d6f8f681e758c7cf391475d758db32135b1bd.zip |
doc: Add a `lout-illustration' example.
* doc/modules/skribilo/documentation/api.scm (le)[inline-definitions-proc]:
Add @TeX and @LaTeX definitions.
* doc/user/src/lout-illustration.skb: New file.
* doc/user/Makefile.am (EXTRA_DIST): Add it.
* doc/user/loute.skb (Additional Markup): Add
`src/lout-illustration.skb' as an example.
-rw-r--r-- | doc/modules/skribilo/documentation/api.scm | 4 | ||||
-rw-r--r-- | doc/user/Makefile.am | 1 | ||||
-rw-r--r-- | doc/user/loute.skb | 12 | ||||
-rw-r--r-- | doc/user/src/lout-illustration.skb | 60 |
4 files changed, 76 insertions, 1 deletions
diff --git a/doc/modules/skribilo/documentation/api.scm b/doc/modules/skribilo/documentation/api.scm index d4f0781..36ba0e7 100644 --- a/doc/modules/skribilo/documentation/api.scm +++ b/doc/modules/skribilo/documentation/api.scm @@ -100,6 +100,10 @@ "{ Helvetica Base } @Font x\n}\n" " +# TeX and LaTeX, from Lout's `init' file. +def @TeX { @OneCol { T &0.4fo {-0.2f @VShift E} &0.45fo X } } +def @LaTeX { @OneCol { L &0.3fo { +0.1f @VShift 0.8f @Font A } &0.4fo @TeX } } + # The `example' markup. def @SkribiloExample named @Title {} right x { @B { @Title } diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am index 4d1f04c..a9e9448 100644 --- a/doc/user/Makefile.am +++ b/doc/user/Makefile.am @@ -23,6 +23,7 @@ EXTRA_DIST += src/api1.skb \ src/prgm3.skb src/prgm4.skb src/slides.skb \ src/start1.skb src/start2.skb \ src/start3.skb src/start4.skb src/start5.skb \ + src/lout-illustration.skb \ src/outline.txt src/scheme.scm EXTRA_DIST += FONTS diff --git a/doc/user/loute.skb b/doc/user/loute.skb index d26b0ed..ecfef34 100644 --- a/doc/user/loute.skb +++ b/doc/user/loute.skb @@ -220,7 +220,17 @@ is ,(tt [#f]).])) :common-args '() :source #f :def '(define-markup (lout-illustration :rest - illustration :key (file #f) ident alt) ...)))) + illustration :key (file #f) ident alt) ...)) + + (p [The following example shows a simple diagram. When using the +,(tt [lout]) engine, the diagram is integrated in-line in the document. +When using other engines, it is integrated using ,(markup-ref +"image").]) + + (example-produce + (example :legend "A Lout illustration" + (prgm :file "src/lout-illustration.skb")) + (disp (include "src/lout-illustration.skb"))))) ;;; Local Variables: ;;; ispell-local-dictionary: "american" diff --git a/doc/user/src/lout-illustration.skb b/doc/user/src/lout-illustration.skb new file mode 100644 index 0000000..e060068 --- /dev/null +++ b/doc/user/src/lout-illustration.skb @@ -0,0 +1,60 @@ +(use-modules (skribilo engine lout)) + +(lout-illustration :ident "document-toolchain" + :alt "a document toolchain" " + +# This is Lout code to produce a diagram. +@Diag + aoutline { circle } + afont { Courier Base 1f } + boutline { circle } + bfont { Palatino Slope 2f } + bpaint { black } + bformat { white @Color @Body } + coutline { curvebox } + coutlinestyle { dotted } + doutline { curvebox } +{ + @Tbl + strut { yes } + indent { ctr } + aformat { @Cell A | @Cell marginhorizontal { 2.0fe } B | + @Cell C | @Cell D } + amargin { 1.0fe } + { + @Rowa D { W:: @DNode HTML } + @Rowa A { A:: @ANode txt } C { P:: @CNode Lout } + D { X:: @DNode PostScript } + @Rowa A { B:: @ANode skr } B { S:: @BNode Skribilo } + C { Q:: @CNode @LaTeX } + @Rowa A { C:: @ANode rss } C { R:: @CNode ConTeXt } + D { Y:: @DNode PDF } + @Rowa D { Z:: @DNode Info } + } + + // + + # input arrows + @Arrow from { A } to { S } + @Arrow from { B } to { S } + @Arrow from { C } to { S } + + # arrows to intermediate files + @Arrow from { S } to { P } + @Arrow from { S } to { Q } + @Arrow from { S } to { R } + + # PS/PDF incoming arrows + @Arrow from { P } to { X } + @Arrow from { P } to { Y } + @Arrow from { Q } to { X } + @Arrow from { Q } to { Y } + @Arrow from { R } to { X } + @Arrow from { R } to { Y } + + # HTML and Info + @Link from { S } to { W } arrow { yes } path { vhcurve } + @Link from { S } to { Z } arrow { yes } path { vhcurve } + +} +") |