On 25/09/2012 8:59 a.m., Liviu Andronic wrote:
Andrew
Your script and module are great, and this is a functionality that
deserves getting into base LyX. Maybe worth opening a bug report for
this.

OK.

On Wed, Sep 19, 2012 at 1:01 AM, Andrew Parsloe <apars...@clear.net.nz> wrote:
I've attached a python script, tablesort.py, a module tablesort.module
containing a custom inset (suggested by Liviu Andronic), and an explanatory
document, SortingTablesInLyX.lyx detailing what goes where and how to use

Several comments:
- In the intro, 'TabelSort' should be 'TableSort'

Sigh (so much for the years I spent as a proofreader/indexer).

- Section 2.1: After defining the 'Converter box', it would help to
note that next teh user has to click Add and Apply. (Personally I find
this handling confusing.)

(Ah, you too type "teh" for "the".) I should have noted Add and Apply. I'll adjust the text.

Some suggestions:
- Put '1A 2A 3A 4+' in a Note so that the user could easily dissolve
the inset and try to execute teh sorting procedure.
I'll put the entire unsorted table with its sort spec. in a yellow note. It sorts within the note, and the reader can then compare the result with the sorted table in the text proper.

- My only objection when using the buffer-write; buffer-export
lyxtabsort;buffer-reload; sequence (run manually) is that after saving
the file, the file gets modified by a script and overwrites the
original file. The buffer is not marked as 'dirty', and there is no
Undo to the previous, unsorted tables. That's a bit dangerous. But I'm
not sure how this could be improved.

The .lyx~ back-up file is still there. The initial buffer-write sends the unsorted .lyx file to .lyx~, so it should still be possible to retrieve the situation if the overwrite goes wrong. In fact I've just rescued myself from an unwanted overwrite by exactly this means. (And that suggests another issue which I'll put to the developers: the visibility of .lyx~ files as on option in LyX's Open dialog.)


All in all excellent work! I hope that the async lfuns issue can be
solved so that sorting can be executed in one go (a button or a
shortcut). Again, I think that this functionality would be worth
integrating into LyX, and even providing some GUI for selecting the
sorting criteria.

Regards
Liviu

Thanks for the encouraging remarks.

Andrew

Reply via email to