9. Scribe Programming Manual -- The LaTeX back end

9. Scribe Programming Manual -- The LaTeX back end

Browsing

Home: Scribe Programming Manual

Previous chapter: The HTML back end
Next chapter: The MAN back end

The LaTeX back end

9.1 LaTeX Markups
9.2 Customizations
9.3 Example

Chapters

1. Defining new functions
2. Fontification
3. Common Classes
4. Scribe Library
5. Container numbering
6. Target format
7. Programming Back-ends
8. The HTML back end
9. The LaTeX back end
10. The MAN back end
11. Bibliography
12. Embedding Scribe into Bigloo
13. Scribe Apache module
14. Classes, Functions and Variables
15. Bibliography

Scribe

Home page:Scribe

Documentation:user
expert
styles

This chapter presents the specific variables that are provided by the LaTeX back end. Setting this variables enables customization of the produced LaTeX file. For instance, it enables to change the LaTeX markups used to render the sections titles or to emphasize a portion of the text.

9.1 LaTeX Markups

Each of the variables presented in this section is a string of characters.

*scribe-tex-title*Scribe variable
*scribe-tex-maketitle*Scribe variable
*scribe-tex-authors*Scribe variable
*scribe-tex-author-start*Scribe variable
*scribe-tex-stop*Scribe variable
*scribe-tex-title-hook*Scribe variable
*scribe-tex-author-hook*Scribe variable

Bold environment.


9.2 Customizations

*scribe-tex-packages*Scribe variable

A list of strings or lists of two strings which are the names of the LaTeX style to be used by the produced document.

(set! *scribe-tex-packages* '(("fontenc" "T1") ("babel" "french") "a4"))


*scribe-tex-document-class*Scribe variable

The name of the LaTeX class to be used in the produced document.


*scribe-tex-color*Scribe variable

A boolean that controls whenever Scribe generates color annotation in the produced LaTeX file. When this variable is #t, Scribe automatically adds the LaTex color the list of packages.


*scribe-tex-~*Scribe variable

A string which denotes the LaTeX command for inserting unbreakable separators (such as those inserted before a bibliographic reference).


*scribe-title-hook*Scribe variable

A function of one argument (the title) that is invoked when the document title is emitted.


*scribe-author-hook*Scribe variable

A function of one argument (the list of authors) that is invoked when the document authors are emitted.


9.3 Example

For the sake of the example, here is the source code of the acmproc.scr style file:

;*=====================================================================*/
;*    serrano/prgm/project/scribe/styles/acmproc.scr                   */
;*    -------------------------------------------------------------    */
;*    Author      :  Manuel Serrano                                    */
;*    Creation    :  Fri Jan 11 10:09:20 2002                          */
;*    Last change :  Wed Aug 28 16:14:08 2002 (serrano)                */
;*    Copyright   :  2002 Manuel Serrano                               */
;*    -------------------------------------------------------------    */
;*    The ACMPROC scribe style.                                        */
;*=====================================================================*/

;*---------------------------------------------------------------------*/
;*    LaTeX format                                                     */
;*---------------------------------------------------------------------*/
(if (scribe-format? 'tex)
    (begin
       (set! *scribe-tex-~* " ")
       (set! *scribe-tex-document-class* '("acmproc" "letterpaper"))
       (set! *scribe-tex-author-hook*
             (lambda (l) (print "\\numberofauthors{" (length l) "}")))
       (set! *scribe-tex-author-start* "\\alignauthor ")
       (set! *scribe-tex-author-stop* #f)))

;*---------------------------------------------------------------------*/
;*    abstract ...                                                     */
;*---------------------------------------------------------------------*/
(define-markup (abstract (:postscript #f) . body)
   (if (scribe-format? 'tex)
       (section :number #f :title "ABSTRACT" (apply paragraph body))
       (let ((body (paragraph (center (apply color :bg "#cccccc" :width 0.9 body)))))
          (list (if postscript
                    (section :number #f :toc #f :title "Postscript download" postscript))
                (section :number #f :toc #f :title "Abstract" body)
                
                (section :number #f :toc #f :title "Table of contents" (table-of-contents :subsection #t))))))

;*---------------------------------------------------------------------*/
;*    references ...                                                   */
;*---------------------------------------------------------------------*/
(define (references)
   (list "\n\n"
         (if (scribe-format? 'tex)
             (font :size -1 (print-bibliography :all))
             (section :title "References"
                      (font :size -1 (print-bibliography :all))))))


This page has been generated by Scribe.
Last update Wed Dec 18 09:23:03 2002