On 2021-11-17 14:44, Jean-Marc Lasgouttes wrote:
Le 14/11/2021 à 09:05, Daniel a écrit :
On 2021-11-11 15:24, Scott Kostyshak wrote:
This works great. Thank you! I had to set 'InitialValue' to 2 since the
title takes up a frame for me.
I guess a more ideal solution would be to make the title also increase
the counter by one since sometimes one might have a title frame and
sometimes not (or a custom one consisting of a normal frame). However,
I did not manage to get the counter to step up with the Title style
*without* adding a label. For example, I tried
Style Title
LabelType Static
LabelString ""
LabelCounter frame
End
It would not be difficult in Buffer::Impl::setLabel to handle the case
where LabelType==NoLabel and there is a LabelCounter specified. All is
needed is to step the counter if it exists.
How about checking for whether, in case of an environment, this is the
first paragraph in the sequence?
Similar to what is done in the case of the other labels, all in all
something like:
docstring const & lcounter = layout.counter;
if (!lcounter.empty() && counters.hasCounter(lcounter)
&& (layout.latextype != LATEX_ENVIRONMENT
|| it.text()->isFirstInSequence(it.pit()))) {)
counters.step(lcounter, utype);
}
Daniel
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel