On 12/12/2012 11:02 a.m., Jean-Marc Lasgouttes wrote:
Le 11/12/12 23:00, Andrew Parsloe a écrit :
Thanks for the responses to this and my other custom inset queries
Richard. I've put in a bug report about ResetsFont in custom insets. I'm
going to continue to use the pipe symbol for its unintended purpose --
I've yet to see any deleterious side-effects and some deliberate
trying-to-break-it experimenting suggests Qt4 is fairly robust in the
way it handles inappropriate shortcut suggestions.

If you are ready to have your layout broken one day this is OK. Could
you give an example of the usefulness of this "trick"?

JMarc


I've created a system (to be launched on the world 'soon') where python scripts can be launched from within LyX using the converter mechanism, but more conveniently. You insert a custom inset from the Insert > Custom Insets list. The inset name visible to the user might be, say, 'calculate formula'. The part of the name after the pipe symbol and invisible to the user is the name of the python script (perhaps calcul8.py) that does the calculating. In LyX format in a document it produces the line '\begin_inset Flex:calculate formula|calcul8'. A master script scanning the document can thus find which specific script to call to perform the desired action from the name alone, rather than having to keep a separate dictionary associating inset names with script names (which is how I did things before).

Andrew

Reply via email to