On 06/15/2016 10:32 AM, racoon wrote:
Hi,
There are, for example, a number of refstyle commands that are (not
yet) supported by LyX. Here are some examples:
http://www.lyx.org/trac/ticket/10201.
I tried to build some of these with modules that use the already
implemented commands but failed. Basically I tried to catch the
command, like \ref{<label>}, and read out it's internal label
reference to recycle it with other commands. LaTeX seems not really to
be build to do such things. It is also rather cumbersome.
So here is a suggestion to enhance the capabilities of LyX to be more
easily extendable:
Add an (all purpose) reference format to the cross reference dialog
that just adds the plain <label> to the code.
This way one could use the dialog and database of references with many
other commands which could also be more easily turned into modules.
Maybe there have to be two of those plain options: one with and one
without prefixes ("enu:", "eq:", "sec:", etc)?
I guess the citation dialog could profit from a similar option as
well. But I have not thought about details. This will make it possible
to use more BibLaTeX commands with the citation dialog and database
even though the commands lack direct support (at the moment).
Also this will enable support for commands that LyX will probably
never directly support, for example because LyX is using another
package by default.
In a way my suggestion seems obvious (to me now) so maybe this has
been suggested before and probably I am overlooking something. Or is
this functionality even already implemented somehow? My wild guess is
that it is rather easy to implement.
Yes, it would be very easy indeed, though it would be a file format
change, so can't be issued before 2.3.0. And it's a good idea, too, both
for references and for citations.
An even better idea, in a way, would be to allow the reference types and
the associated code to be defined dynamically, i.e., in a module.
Richard