Page 1 of 1

Author:  msebban [ 2013-11-23 16:51:59 ]
Post subject:  Dictionary

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...

Author:  phspaelti [ 2013-11-25 00:20:56 ]
Post subject:  Re: Dictionary

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.

Sort by Style.nwm [20.94 KiB]
Downloaded 114 times

Author:  msebban [ 2013-11-25 01:37:01 ]
Post subject:  Re: Dictionary

you're a genius......

Author:  msebban [ 2013-11-25 01:40:30 ]
Post subject:  Re: Dictionary

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

Author:  phspaelti [ 2013-11-25 01:57:37 ]
Post subject:  Re: Dictionary

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 124 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.

Author:  phspaelti [ 2013-11-25 02:08:46 ]
Post subject:  Re: Dictionary

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.

Author:  msebban [ 2013-11-25 15:53:34 ]
Post subject:  Re: Dictionary


Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group