aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2007-01-18 14:30:58 +0000
committerLudovic Court`es2007-01-18 14:30:58 +0000
commit394794351dcde758245277c12ea064e0badcf106 (patch)
tree08de8c891cd6e6e6cc4605743563210760d367a0
parent5dfd4c5c3026ba0f9e56ce6706322b76e1d8fb2c (diff)
downloadskribilo-394794351dcde758245277c12ea064e0badcf106.tar.gz
skribilo-394794351dcde758245277c12ea064e0badcf106.tar.lz
skribilo-394794351dcde758245277c12ea064e0badcf106.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: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-4
-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"))))