Dictionary

Everything related to our flagship word processor.
Post Reply
msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Dictionary

Post by msebban » 2013-11-23 16:51:59

I'm working on a dictionary project and I'm looking fort he best way to build my file, here ae my specific needs
-alphabetic classement
- large definitions and commentaries, for exemple i can have for one word of my dictionary several pages
I tried of course to build a simple table with 2 columns (which allow me the alphabetic order) but it's not easy to manage long text in the second column.
If someone have a better idea...
Thank's

User avatar
phspaelti
Posts: 889
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Dictionary

Post by phspaelti » 2013-11-25 00:20:56

An alternative is to not use a table. Instead have the dictionary entries in a specific paragraph style ("Head word" or "Key word"). Then the paragraphs can be sorted using a macro.

I am attaching a macro here that I wrote for this purpose. The macro asks the user to choose a style from among those in the document, and it uses the paragraphs in that style as the keys for sorting. Other paragraphs will stay "attached" to a preceding key paragraph. The macro can be run on a (simple) selection, or on the whole document. Preceding text (before the first key) will stay at the beginning.

[The extension nwm has been deactivated and can no longer be displayed.]

philip

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Dictionary

Post by msebban » 2013-11-25 01:37:01

Philip,
you're a genius......

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Dictionary

Post by msebban » 2013-11-25 01:40:30

the macro is perfect
how can i apply alphabetic rangement to my main paragraph key order

User avatar
phspaelti
Posts: 889
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Dictionary

Post by phspaelti » 2013-11-25 01:57:37

Hi. I'm not sure what you mean. Did it work, or not?

Here is a stupid example file. In this example If you run the macro on the selection it should give you a choice of styles. Choose 'keyword' and the file will be sorted.
Sort by keyword test.rtf
(23.2 KiB) Downloaded 130 times
Note: I tried downloading the file and for some reason the selection was not preserved correctly. (It excluded some parts.) So you will need to reselect before running the macro. But hopefully the intention is still clear.

For your own file you just have to make sure that there is a paragraph style applied to all and only the keywords of your dictionary. If you don't already have such a style, you would have to create one before being able to use the macro. Note that the style can be named anything you want, and have any desired attributes (or even none). The only requirement is that it is a paragraph style.
philip

User avatar
phspaelti
Posts: 889
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Dictionary

Post by phspaelti » 2013-11-25 02:08:46

One more point is the question of sort order. The macro should currently use the system language for the sort order. If some other order is necessary/desired this can be adjusted, though I have not tested this at all. In the macro at the beginning there are some lines specifying a language object, which should allow this to be adjusted.
philip

msebban
Posts: 28
Joined: 2012-08-12 17:00:17

Re: Dictionary

Post by msebban » 2013-11-25 15:53:34

Great....really

Post Reply