Groups | Search | Server Info | Login | Register


Groups > comp.text.interleaf > #7

Creating TOC/Index using a lisp script

From RalfN <ralfnausi@aol.com>
Newsgroups comp.text.interleaf
Subject Creating TOC/Index using a lisp script
Date 2012-07-16 07:57 -0700
Organization http://groups.google.com
Message-ID <4fdf683c-0d15-4d06-bb14-e9a1ee6fcaa7@googlegroups.com> (permalink)

Show all headers | View raw


Hello, I'm new to Lisp and programming. 
Currently I'm using a few macro-api functions from QS 2.0 for some smaller tasks.
Some of these tasks have to do with editing index documents.

Now I would like to combine creating the index document and doing the editing tasks.

That means moving away from "Book -> Index..." and instead create an index document using a lisp script. 

I found some code for creating a toc, but for Ileaf 5.
Because I had read somewhere that TOC and Index have similar syntax, I tested the following lines (ILeaf 6 and QS 2.0; the script into "System -> Custom -> Selection"):

(defun create-toc-for-all (container)
;creates a TOC for all docs in the conainer
   (let (children child)
     ;get all the unselected children
     (setq children (dt-children container :not-selected))
     ;select them
     (while (setq child (pop children))
       (tell child mid:set-props :selected t))
     ;create table of contents for all chidren
     (toc-create-selected container)
))

Unfortunately it does not work. It seems that there happens nothing.
Are there any ideas to make it work?

Any help will be greatly appreciated!

Back to comp.text.interleaf | Previous | NextNext in thread | Find similar


Thread

Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-16 07:57 -0700
  Re: Creating TOC/Index using a lisp script Dick Margulis <margulisd@comcast.net> - 2012-07-16 12:28 -0400
    Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-16 10:21 -0700
      Re: Creating TOC/Index using a lisp script Dick Margulis <margulisd@comcast.net> - 2012-07-18 08:38 -0400
        Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-07-18 11:44 -0700
  Re: Creating TOC/Index using a lisp script RalfN <ralfnausi@aol.com> - 2012-08-02 11:04 -0700

csiph-web