Page 1 of 1
Posted: 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
- 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...
Posted: 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.
Posted: 2013-11-25 01:37:01
you're a genius......
Posted: 2013-11-25 01:40:30
the macro is perfect
how can i apply alphabetic rangement to my main paragraph key order
Posted: 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.
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.
Posted: 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.
Posted: 2013-11-25 15:53:34