Reply to topic  [ 7 posts ] 
Dictionary 
Author Message

Joined: 2012-08-12 17:00:17
Posts: 28
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


2013-11-23 16:51:59
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.

Attachment:
Sort by Style.nwm [20.94 KiB]
Downloaded 115 times

_________________
philip


2013-11-25 00:20:56
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
Philip,
you're a genius......


2013-11-25 01:37:01
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
the macro is perfect
how can i apply alphabetic rangement to my main paragraph key order


2013-11-25 01:40:30
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.
Attachment:
Sort by keyword test.rtf [23.2 KiB]
Downloaded 125 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


2013-11-25 01:57:37
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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


2013-11-25 02:08:46
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
Great....really


2013-11-25 15:53:34
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software