On 11/24/2010 11:11 AM, Jürgen Spitzmüller wrote:
Alexander Tsyplakov wrote:

Sorry for my vague description of the problem and
somewhat confusing title for the thread. Logically
any special character is very similar to an inset
without text inside. At an abstract level one can
think about text markup entities which are
elementary in their nature and do not contain
anything within them. There are such things in
LyX, but all of them are hard coded (like ellipsis
or hyphenation point). The only exception and a
great progress are macros in math. It would be
great to have something like that for the text.
Besides special characters proper such
functionality can be used for ornaments, logos
(like \LaTeX) other solitary LaTeX commands like
\theendnotes, etc.
I think it can be made this way. We could add an option to specify whether
such a custom command inset appears as a button (such as InsetBibTeX) or
with a transparent background. The latter could be used for the things
Alexander has in mind, if I get his description right.

Certainly part of this would be fairly simple to do. Call it InsetSimpleCommand, and the only thing it does is issue whatever command it is supposed to issue. The command in question can be given in a module:

InsetCommand InsertEndnotes
    guiname "Insert Endnotes Here"
    label Endnotes
    command \theendnotes
End

The insets so defined would appear somewhere on the Insert menu; the label would be the only thing
displayed, and I suppose button color can be customized, too, if one wishes.

This would be a start of sorts toward the more general solution. What I've been imagining is using this for other simple cases, where the command has some arguments. Then one would have tags that declared those arguments, and we could construct the dialog on the fly with appropriate fields.

Richard

Reply via email to