From 394794351dcde758245277c12ea064e0badcf106 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Thu, 18 Jan 2007 14:30:58 +0000 Subject: `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 --- src/guile/skribilo/package/lncs.scm | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'src/guile') 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")))) -- cgit v1.2.3