On Wed, Jul 09, 2025 at 03:26:06PM -0400, Richard Kimberly Heck wrote:
> On 7/9/25 4:12 AM, Scott Kostyshak wrote:
> > On Wed, Jul 09, 2025 at 12:12:39AM -0400, Richard Kimberly Heck wrote:
> > > But what do you want to happen in the case of an itemized list?
> > My ideal behavior would be that the itemize environment continues as if
> > the branch inset is not even there.
> >
> > Similar with an enumerate (this would be helpful with exam documents).
> > e.g., suppose I have:
> >
> > 1. an item
> > 2. zanother item
> > 3. another one.
> >
> > If I select all of the second item (i.e., put cursor just to the left of
> > z and go to the end of "m"), and insert a branch, if that branch is
> > turned on I want it to be the same as above; and if the branch is turned
> > off I want it to be:
> >
> > 1. an item
> > 2. another one.
> >
> > From what I understand, part of the hard part is not starting a *new*
> > enumerate environment after the branch inset.
>
> OK, that's what I thought. The attached file shows the various options, none
> of which work quite right.
>
> You're right about what makes it tricky. At the moment, any list item in a
> branch starts a new list. That itself is probably a bug. If that were fixed,
> then the last option might work.
>
> Branches are treated, in the output routines, like footnotes: as if they
> have nothing to do with the surrounding text. That is really not right. (I
> ran into something along these when working on the HTML output.) Maybe it
> would be possible to use list depth for this purpose? If we see a list item,
> and it's at the same depth as the previous one, do not output
> \begin{itemize} or whatever. OutputParams::depth already exists, though it
> is only used by plaintext at the moment. That would have to be set in the
> other output routines and then checked at appropriate places.
>
> The other possibility would be not to output \item if there's no content. In
> that case, the first option would work, but that feels a bit hackish, and
> I'll guess there are people who put a note as a list item to get an empty
> bullet or whatever. But we already don't output items if the content of the
> item has all been deleted. So it would make sense to extend that check to
> the case where no output is produced. An 'empty' item can always just
> include a (protected) space.Thanks a lot for digging into this, Riki. I can't say I've heard a lot of people request (or complain about the lack of) the behavior I described as idea. But I would certainly be happy if there's some way to figure it out ;). Scott
signature.asc
Description: PGP signature
-- lyx-users mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-users
