[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wishing high-level definitions facility in Lout

From: basile . starynkevitch
Subject: Wishing high-level definitions facility in Lout
Date: Wed, 21 Jun 1995 10:37:32 +0200

Hello All,

As I understand it, there can't be higher level definitions in Lout,
because def is a special keyword (and it is not possible to define a
symbol which, when invoked, would define others symbols).

I believe that some classes of users need stuff which is 

   * somehow numbered thru the document

   * has an associated list, appearing just after table of contents

   * has sometimes an alphanumerical (specific) index

   * is specifically formatted

Obviously, this is not needed by all users, but some need tables and
figures (with a list of tables and list of figures) others
-mathematicians- need theorem like stuff (eg theorem, corollary, etc)
with a list of theorems, and optionnally an index of theorems, others
-lawyers?- need definitions and rules (or laws). Others -eg software
reference manual writers- need routine interface (with a list of
routines, etc).

First, I wish that tables and figures could be listed just after the
table of contents, in a List of Tables and List of Figures. (this is
something LaTeX provides but not -yet- Lout).

Second, I really don't think that the dl layout should be enhanced to
support theorems (with a List of Theorems listed after the List of
Figures), rules (with a List of Rules), routines -in a software
package manual- with a List of Routines, and so on... Some people
could even need several of these (eg a numerical programmer might
have Theorems and Routines).

 (I tried to port to Lout the tango-weevil literate programming
 software -originally goaled to LaTeX2e-, and failed, because I
 couldn't implement codechunks, numbered thru the document, and with a
 list of codechunks, etc).

I believe that some Lout users could need such specific items, but
shouldn't understand the full intricacy of Lout. In particular, they
shouldn't need to understand what Lout galleys are (even if galleys
are a very powerful concept), or how exactly cross-referencing works.
It might not have a lout-like syntax, but it should be very abstract.

So I would like a facility which from a high level input produces a
Lout package having such a stuff. I don't know what the syntax should
be... (but I know I don't want to have && or @Galley in it!). Perhaps
it could be just a well designed preprocessable stuff (using cpp or

For instance, suppose I am a mathematician (or teacher in math). I
need theorems. Each of them has a name (or caption?), a statement and
a proof. I also need definitions. They have a name (or caption?) and a
body. I need lemmas and corollaries (unnamed, with a body and a
proof). All of these (theorems, definitions, lemmas, corollaries) are
numbered -with seperate numbering including the chapter (so chapter 2
could have, in that order, theorem 2.1, definition 2.1, lemma 2.1,
lemma 2.2, theorem 2.2, theorem 2.3, etc). Theorems and definitions
are listed (with their name and/or caption) in a separate List of
Theorems and List of Definitions.

I would like to input in a math textbook

    ## the theorem statement
        Let @Eq{ABC} be a triangle rectangle in @Eq{A}. Then the squared
        hypothenus @EQ{BC} is the sum of squared other lengths @Eq{AB}
        and @Eq{AC}:
        @NumberedDisplay @Eq{{BC} sup 2 = {AB} sup 2 + {AC} sup 2}
   ## the theorem proof is its body for Lout
      By Thales' theorem @NumberOf{the-thales}....
   @End @Theorem

I would like my math package to be generated from a high-level
description containing something like -in a Lisp like syntax, where ;
starts comments and :foo are named arguments-

      ;; name of the definition
      :name @Theorem
      ;; supplementary non-standard argument[s]
      :arg  @Statement
      ;; theorems are numbered in chapters
      :numbered in-chapters
      ;; theorems are listed in the full document
      :listed document
      ;; theorem are layout as follow: 
      :layout (
         ;;; a vertical gap of @TheoremGap, parameter defaulted to 1.5v
         (parameter :vertical-gap @TheoremGap 1.5v)
         ;;; a font of @TheoremNameFont, parameter defaulted to
         ;;;;;; Helvetica Bold +3p
         (parameter :font @TheoremNameFont {Helvetica Bold +3p})
         ;;; the language dependent word Theorem
            :english "Theorem"
            :french "Theorème"
         ;; the computed number -eg 2.3
         ;; the title
         ;; the string ":"
         ;; a vertical parameter gap
         (parameter :vertical-gap @TheoremStatmentGap 1.0v)
         ;; a lout code to box the statement in italics
         (loutcode @address@hidden @Statement})
         ;; the same vertical gap -already defaulted
         (parameter :vertical-gap @TheoremStatmentGap)
         ;; lout code to put the body (theorem proof) between club and
         ;; diamond
         (loutcode address@hidden club} @Body address@hidden diamond})
         ;; ending gap
         (parameter :vertical-gap @TheoremGap)
      );; end of layout
   ) ;; end of listed-def

Any comments?


Basile STARYNKEVITCH   ----  Commissariat a l Energie Atomique
DRN/DMT/SERMA * C.E. Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 1-; phone: (33) 1-; homephone: (33) 1-
email: address@hidden (redirected to address@hidden);  

N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

Please cite a **small pertinent part** of my mail in all answers
Veuillez citer une **petite partie pertinente** de mon courrier dans vos 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]