Flexible text fields
xracoonx at gmx.de
Mon Jun 29 08:48:11 UTC 2020
On 27/6/20 17:34, Richard Kimberly Heck wrote:
> On 6/26/20 3:20 PM, Daniel wrote:
>> On 2020-06-26 17:49, Richard Kimberly Heck wrote:
>>> On 6/26/20 3:35 AM, Jürgen Spitzmüller wrote:
>>>> Am Freitag, den 26.06.2020, 09:25 +0200 schrieb Jürgen Spitzmüller:
>>>>> Am Freitag, den 26.06.2020, 07:40 +0200 schrieb Daniel:
>>>>>> The upcoming flexible text fields sound very interesting to me
>>>>>> (https://wiki.lyx.org/LyX/NewInLyX24#textfields). Is it possible
>>>>>> create an arbitrary custom text with it that can be re-used in
>>>>>> sentences all over the document?
>>>> What you are referring to is a long-standing feature request (and I
>>>> would love to use it myself). I am not sure it fits into the text field
>>>> infrastructure (which is more like context-dependent information such
>>>> as date, file name, author name etc.), but probably more into something
>>>> you could call "text macros" in analogy to "math macros":
>>> I dream about this one every once in a while but am not sure I am up to
>>> the challenge. I keep thinking there must be some way to adapt the math
>>> macro infrastructure to do it, though.
>> I guess a problem with the macro infrastructure is that it relies on
>> defining a LaTeX command. But in contrast to LyX's math mode, its text
>> mode does not understand LaTeX commands.
> Well, the point would be to change that, so you could have 'text insets'
> that work like math insets. Then you could do the kind of thing you
> mention, but also have more complex macros.
So, the idea is to define a command, e.g. \xyz, and then being able to
insert it in text mode via a text inset. I still tend to think it would
be nicer if one could skip the text inset part and just use some UI,
like cross-references, to insert the text.
Being able to show a snippet of LyX text would also be nice in other
context, e.g. for showing the content of an input child document
(instead of generating a preview) or to show the text passage around
some label when hovering over a cross-reference (instead of having to
click "Go To Label").
More information about the lyx-users