Cannot put new counter inset in list preamble
Scott Kostyshak
skostysh at lyx.org
Sat May 8 16:07:36 UTC 2021
On Sat, May 08, 2021 at 09:01:04AM +0200, Jürgen Spitzmüller wrote:
> Am Samstag, dem 08.05.2021 um 00:25 -0400 schrieb Scott Kostyshak:
> > The only alternative I can think of would be for the counter manager
> > to be a bit smarter. For example, suppose we set the Numbered List
> > (Level 1) counter outside of an enum. Can LyX realize that the intent
> > is for the counter to be modified at the beginning of the next list?
>
> No, as this doesn't step the counter in LaTeX either. We need to do
> that retrospectively if a counter inset is in a list preamble.
I'm fine with whatever you prefer. But just to make sure, I expand on the suggested alternative workflow. Consider the following pseudo LyX code:
[set counter of enumi to 2]
[begin enumerate]
[item] User intends for this item to be 3.
Currently, the above does not work as desired because when we set the counter of enumi outside of an enumerate, that does not have any effect (I guess because the counter in LaTeX is reset at the beginning of each enumerate environment?). But the only intent from the user, from what I understand, would be for the above LyX pseudo code to export the following LaTeX pseudo code:
[begin enumerate]
[set counter of enumi to 2]
[item] User intends for this item to be 3.
From a user point of view, at least one who does not know anything about LaTeX (I'm a good proxy for such a user), it's not intuitive that we have to set the counter in the List Preamble. The distinction between setting counters for Theorems, for example, and setting counters for enum items, although clear to LaTeX experts, is too subtle for it to be obvious to many LaTeX beginners. I believe (I would have to double-check with others, perhaps on lyx-users) the alternative workflow suggested above is more intuitive. However, I understand that from a LaTeX perspective it is not intuitive since it does not make sense to set the counter before the environment even begins.
I emphasize that I'm fine if this approach is not considered. I just wanted to explain it fully.
As a separate alternative approach, I wonder if users would prefer to simply right-click on the "1" in the enum and select "change counter" and enter "3" in the dialog.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210508/6d696693/attachment.asc>
More information about the lyx-devel
mailing list