patch: adding alertenv (and other friends) for beamer layout
José Matos
jaomatos at gmail.com
Sun Nov 6 19:33:40 UTC 2022
On Sun, 2022-11-06 at 11:25 -0500, Scott Kostyshak wrote:
> On Sun, Nov 06, 2022 at 03:46:50PM +0000, José Matos wrote:
> > On Sun, 2022-11-06 at 10:20 -0500, Scott Kostyshak wrote:
> > > And also every time I come across something like this, I wonder
> > > if we
> > > can generalize the process of converting a new layout to ERT for
> > > older formats. i.e., I just want to put a one-liner with
> > > "alertenv",
> > > and I want lyx2lyx to talk to LyX and say "hey you're good at
> > > outputting LaTeX, can you convert this inset to ERT for me
> > > please?"
> > > That's trickier than it seems though, and I'm not even sure if
> > > there
> > > would be agreement to have lyx2lyx depend on the LyX binary
> > > anyway.
> >
> > This is an academic discussion at this time of the development, and
> > I
> > still need to complete a work to given to my students tomorrow. :-)
>
> The solution is obvious: assign this problem as homework to your
> students! :)
Then that will certainly involve python and machine learning. :-D
> \begin_layout Off Topic
>
> Having a small kid in the house who loves animals helped me realize I
> need to find an alternative to the expression "to kill 2 birds with 1
> stone". However, I don't like any of these:
> https://english.stackexchange.com/a/312439
> I wonder if other languages have a more friendly (and commonly used)
> expression for this.
I also use those expressions like "there is more than one way to skin a
cat", and so I suggest (jokingly of course) that from now on I will say
"that are more ways to peel an eggplant", but then I will get into
trouble with plant lovers. :-D
> \end_layout
>
>
> > I suspect that the issue is to have lyx2lyx to talk with tex2lyx
> > and not necessarily to the lyx binary.
>
> I'm intrigued. I definitely did not consider that.
The point that I want to raise is that we should ensure that the basic
conversion should be work anywhere. We can at the same time assure that
extra efforts like the one you propose can be done if the right
functionalities are available. More or less like what we do in LyX.
> > To complicate matters further, the issue is to determine what is
> > the right context to pass, just the ERT or more, and if this should
> > at sup-paragraph or at paragraph level.
>
> I see, indeed it's not simple.
Please do not let my assessment to get in the way. What I say applies
in the general case, but I admit that for cases this is doable. In
order for that to work we could use some kind of annotation metadata.
So basically the use case I am thinking is the reversion to a previous
format, if we preserve some metadata for ERT that is associated but
invisible and that is not touched as long as the ERT is not edited (or
else it will be fully reset).
The best analogy that occurs to me at the moment is like the email html
messages that also carry a text counterpart.
In the use case that I am thinking we use a previous version to edit a
document. Usually most of the changes are local, so that even moving
text in the document would not change the metadata.
Is this worth the time required to implement the feature in LyX? I am
not sure, but what I am saying is that a minimal implementation is
doable.
> Scott
--
José Abílio
More information about the lyx-devel
mailing list