summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Court`es2007-01-19 17:12:04 +0000
committerLudovic Court`es2007-01-19 17:12:04 +0000
commitee778ef61f6dcf1b4625ece7af2c8780cb3859bf (patch)
tree08de8c891cd6e6e6cc4605743563210760d367a0 /src/guile
parent2e87af7845cf7f83f3ed1b451e67054dd1d4ee93 (diff)
parent394794351dcde758245277c12ea064e0badcf106 (diff)
downloadskribilo-ee778ef61f6dcf1b4625ece7af2c8780cb3859bf.tar.gz
skribilo-ee778ef61f6dcf1b4625ece7af2c8780cb3859bf.tar.lz
skribilo-ee778ef61f6dcf1b4625ece7af2c8780cb3859bf.zip
`lncs' package: Fixed `abstract' for LaTeX.
* src/guile/skribilo/package/lncs.scm (abstract): Look for an `lncs-abstract' writer with the current engine; if found, simply issue an `lncs-abstract' markup, otherwise keep the previous behavior. Added a markup write for `lncs-abstract' for LaTeX. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-41
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/package/lncs.scm40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/guile/skribilo/package/lncs.scm b/src/guile/skribilo/package/lncs.scm
index 0c7ef3b..a5d06d3 100644
--- a/src/guile/skribilo/package/lncs.scm
+++ b/src/guile/skribilo/package/lncs.scm
@@ -154,17 +154,21 @@
;* abstract ... */
;*---------------------------------------------------------------------*/
(define-markup (abstract :rest opt :key postscript)
- (if (engine-format? "latex")
- (section :number #f :title "ABSTRACT" (p (the-body opt)))
- (let ((a (new markup
- (markup '&html-lncs-abstract)
- (body (the-body opt)))))
- (list (if postscript
- (section :number #f :toc #f :title "Postscript download"
- postscript))
- (section :number #f :toc #f :title "Abstract" a)
- (section :number #f :toc #f :title "Table of contents"
- (toc :subsection #t))))))
+ (let ((w (markup-writer-get 'lncs-abstract (*current-engine*))))
+ (if (writer? w)
+ (new markup
+ (markup 'lncs-abstract)
+ (options (the-options opt))
+ (body (the-body opt)))
+ (let ((a (new markup
+ (markup '&html-lncs-abstract)
+ (body (the-body opt)))))
+ (list (if postscript
+ (section :number #f :toc #f :title "Postscript Download"
+ postscript))
+ (section :number #f :toc #f :title "Abstract" a)
+ (section :number #f :toc #f :title "Table of Contents"
+ (toc :subsection #t)))))))
;*---------------------------------------------------------------------*/
;* references ... */
@@ -175,3 +179,17 @@
(font :size -1 (flush :side 'left (the-bibliography)))
(section :title "References"
(font :size -1 (the-bibliography))))))
+
+
+;;;
+;;; Writers for LaTeX's `llncs' document class.
+;;;
+
+(when-engine-is-loaded 'latex
+ (lambda ()
+ (let ((latex (find-engine 'latex)))
+
+ ;; Use the `abstract' command provided by the `llncs' class.
+ (markup-writer 'lncs-abstract latex
+ :before "\n\\begin{abstract}\n"
+ :after "\n\\end{abstract}\n"))))