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.


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

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

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


> it. In this third incarnation of the script, by using the custom inset,
> adding three buttons to the table toolbar, and changing the Overwrite on
> export setting, it is possible to sort the rows of tables in LyX in a manner
> that avoids all nag/query/prompt messages and feels "built-in". Sorts may be
> alphabetical or numerical, ascending or descending. The default horizontal &
> vertical rules delineating table cells are not disturbed by the sort. ERT in
> table cells has no effect. Yellow (or other) notes by default also do not
> affect the sort, but this can be changed with the -y option when invoking
> the script, allowing fine-tuning of sort order. Finally, multiple tables in
> the same document can be sorted at one go.
>
> Andrew
>



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail

Reply via email to