[scribus] List of words / references possible?

John Culleton john at wexfordpress.com
Tue Nov 16 16:13:17 CET 2010


On Tuesday 16 November 2010 07:53:11 Alberto wrote:
> Submitted on 11/16/2010
> Submitted by anonymous user: [10.1.5.224]
>
> Submitted values are:
>
>    Name: Alberto
>    Email Address: albertog at arrakis.es
>    Subject: List of words / references possible?
>    Message:
> Hello,
> I would like to create an automated list of "important" words used
> in my book (i.e. pages where the word "server" appears). Is it
> possible to use a process similar to the DOC creation, by assigning
> a new parameter (= not TOC)? I created a "REFs" attribute instead
> of TOC, of type String, but there is no way to create the list
> sorted in alphabetical order - and, by the way, attributes are
> assigned to text frames and not to single words (this is not a big
> deal, though)...
> Maybe I'm doing completely wrong, and there is a way to assign
> attributes to single words?
> regards,
> Albertog
>
>    About your Scribus program:
>      Version: older_stable
>      Prebuilt/Compiled: Prebuilt
>      Build Date: 2. May 2007
>    Your operating system and CPU:
>      Type: Windows
>      Version: WinXP
>      CPU type: 32bit (Intel/AMD - i386)
>
> The results of this submission may be viewed at:
> http://www.scribus.net/node/158/submission/595
>
> _______________________________________________
> scribus mailing list
> scribus at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus
What you are asking for is a concordance. What a real book needs is an 
index. But for a concordance I would:
1. Export a pdf.
2. Save the pdf as a text file named e.g., filename.txt from Acrobat 
Reader.
3.In Gvim I would change all carriage returns to \vfil\eject strings. 
(This is a single mass change).
4. Establish the starting page number with \pageno=1 at the 
appropriate spot.
5. Add \input eplain at top of file.
6. Using mass change again, change all occurrences of the first word of 
interest to \idx{theword}
7. edit that command to contain the next word of interest and run it 
again.. 
8. Add \readindex{i} and \bye at end of file.
9. Run in sequence pdftex filename.txt; makeindex filename.idx; pdftex 
filename.txt
10. Read the index at the end of the filename.pdf file. 

This gets you not a true index but a concordance. A true index has in 
item/subitem/subsubitem structure, has concepts as well as single 
words, inverts proper names and so on Scribus lacks an indexing 
capability. It is not a full featured book creation program, not yet 
anyhow. So you have to work around its limitations using other 
software.

If you prefer a gui approach then my tcl program tyro.tcl is a 
graphics front end to the indexing process. It is easier to understand 
and use for a Windows user but more tedious since you must go through 
the document page by page and extract the items of interest from that 
page, using highlight and paste. Here is that program and its 
documentation:
http://wexfordpress.com/tex/tyro.pdf
http://wexfordpress.com/tex/tyro.tcl
You will also need to install the makeindex.exe program from TeX and 
the Tcl/tk set of programs. Read the tyro.pdf file for more details. 

Again using the tools that I have and know how to use I could write a 
little COBOL program with the key words in one file and the txt file 
from step 2 above in  another. COBOL is a tool I have used off and on 
since 1968. Indeed it would be possible to write a program that would 
use a Scribus source file as input. 

Using Linux tools only I can conceive a script of utility programs 
that could deliver a list of all the words used in a file, in alpha 
order. That could be edited by hand and used as a word list for 
importation into an automated process. 

I use Linux. Gvim installs easily on Windows but there is a learning 
curve. TeX installs easily on Windows but there is a learning curve. 

Writing a Scribus program module to prepare a concordance, or better 
to prepare a proper index, is more than I would care to attempt at 
this point in my life. I am not a Python programmer. But the Scribus 
scripter could be used to perform steps 1 and 2 above.


-- 
John Culleton, Wexford Press
"Create Book Covers with Scribus" $5.95 at
http://www.booklocker.com/books/4055.html

Free eps format barcode: http://www.tux.org/~milgram/bookland/




More information about the scribus mailing list