Re: Counters of custom list environment

2019-04-04 Thread Dr Eberhard Lisse
Daniel,

to be honest, I'll probably figure this out and install it anyway.

Eventually :-)-O

Even though in my daily use I usuallyhave Enumerate-Resume on the outer
level and Enumerate on the indented one(s).  So this may or may not work
:-)-O


el

On 03/04/2019 16:34, Daniel wrote:
> On 03/04/2019 13:35, Dr Eberhard Lisse wrote:
>> I have noticed same, but it bothered me for about 27 seconds and I am
>> now used to it.
> 
> With Jean-Marc's comment, there is no need to get used to it any more.
> Though I admire your ability to adapt.  :)
> 
> Daniel
> 
> 




Re: Counters of custom list environment

2019-04-04 Thread Daniel

On 2019-04-04 08:01, Baris Erkus wrote:

On 03-Apr-19 5:34 PM, Daniel wrote:

On 03/04/2019 13:35, Dr Eberhard Lisse wrote:

I have noticed same, but it bothered me for about 27 seconds and I am
now used to it.


With Jean-Marc's comment, there is no need to get used to it any more.
Though I admire your ability to adapt. :)

Daniel


Well, what I meant was exactly this solution.  You can place these
options in the preamble to be valid for whole document, or you can place
it in the Enumerate Options of LyX to be valid only for that particular
list. I use both. LyX does not have a tool that set these for you.


I think this is still a misunderstanding.

You suggest to change the LaTeX output by manipulating the preamble or 
setting Enumerate Options.


In contrast, Jean-Marc's suggestion had nothing to do with LaTeX. It's 
aim was to change the appearance in LyX' work area by modifying the 
Local Layout.


Daniel



Re: Counters of custom list environment

2019-04-04 Thread Baris Erkus
On 03-Apr-19 5:34 PM, Daniel wrote:
> On 03/04/2019 13:35, Dr Eberhard Lisse wrote:
>> I have noticed same, but it bothered me for about 27 seconds and I am
>> now used to it.
>
> With Jean-Marc's comment, there is no need to get used to it any more. 
> Though I admire your ability to adapt. :)
>
> Daniel
>
Well, what I meant was exactly this solution.  You can place these 
options in the preamble to be valid for whole document, or you can place 
it in the Enumerate Options of LyX to be valid only for that particular 
list. I use both. LyX does not have a tool that set these for you.

-- 
↓↓
Please bottom-post. Start your reply here:



Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 03/04/2019 à 17:21, Daniel a écrit :
What the labeltype Enumerate does is to count nesting of enumerate 
items to know whether the counter will be enumi, enumii, enumiii or 
enumiv. Your own enumerate layout is not supposed to do that.


I see. That was just an oversimplification on my side. Attached is a 
variant. If I understand you correctly your solution cannot be used for it.


Currently, itemize and enumerate are handled in a hard-coded way. It is 
thus not possible to add a new layout that acts like that. However, it 
would be possible to generalize enumerate/itemize support to get rid of 
any hard-coding (in theory at least).


JMarc



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 16:58, Jean-Marc Lasgouttes wrote:

Le 03/04/2019 à 14:55, Daniel a écrit :
Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


What the labeltype Enumerate does is to count nesting of enumerate items 
to know whether the counter will be enumi, enumii, enumiii or enumiv. 
Your own enumerate layout is not supposed to do that.


I see. That was just an oversimplification on my side. Attached is a 
variant. If I understand you correctly your solution cannot be used for it.


Daniel


myenumerate.lyx
Description: application/lyx


Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 03/04/2019 à 14:55, Daniel a écrit :
Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


What the labeltype Enumerate does is to count nesting of enumerate items 
to know whether the counter will be enumi, enumii, enumiii or enumiv. 
Your own enumerate layout is not supposed to do that.


JMarc



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 13:35, Dr Eberhard Lisse wrote:

I have noticed same, but it bothered me for about 27 seconds and I am
now used to it.


With Jean-Marc's comment, there is no need to get used to it any more. 
Though I admire your ability to adapt. :)


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 12:36, Jean-Marc Lasgouttes wrote:

Le 02/04/2019 à 12:45, Daniel a écrit :

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate


Try the one attached. I changed LabelType to Static and set the format 
(because otherwise labeltype was reset to Itemize). Does it do what you 
want?


JMarc


Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Dr Eberhard Lisse
I have noticed same, but it bothered me for about 27 seconds and I am 
now used to it.


el

On 02/04/2019 12:45, Daniel wrote:
> Hi,
> 
> In the attached document the list structure in the work area is shown
> as
> 
> i. MyEnumerate
> (a) Enumerate
> 
> but the output is actually
> 
> i. MyEnumerate
> 1. Enumerate
> 
> I seem unable to figure out how to tell LyX that my custom enumerate
> (as set in the Local Layout and Preamble) is different from the
> standard one and hence the counting should restart when changing
> environments.
> 
> I thought LyX would figure out what I want by seeing that the
> LatexName or LabelCounter differs from the standard enumerate
> environment but that does not do the trick.
> 
> Is there an additional setting I miss, or is it a shortcoming of LyX?
> 
> Best,
> Daniel




Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 02/04/2019 à 12:45, Daniel a écrit :

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate


Try the one attached. I changed LabelType to Static and set the format 
(because otherwise labeltype was reset to Itemize). Does it do what you 
want?


JMarc


myenumerate.lyx
Description: application/lyx


Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 08:53, Baris Erkus wrote:

On 02-Apr-19 1:45 PM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate
(as set in the Local Layout and Preamble) is different from the
standard one and hence the counting should restart when changing
environments.

I thought LyX would figure out what I want by seeing that the
LatexName or LabelCounter differs from the standard enumerate
environment but that does not do the trick.

Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel


AFAIK:{You need to use ERT in the "Enumarate Opitons" of LyX, and tell
LaTeX to restart or resume numbering by yourself. Otherwise LyX does not
have a direct option to do that.}


I guess that is a misunderstanding. I want LyX to show what LaTeX does 
not the other way around. (See my answer to Paul.)


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Baris Erkus
On 02-Apr-19 1:45 PM, Daniel wrote:
> Hi,
>
> In the attached document the list structure in the work area is shown as
>
> i. MyEnumerate
> (a) Enumerate
>
> but the output is actually
>
> i. MyEnumerate
> 1. Enumerate
>
> I seem unable to figure out how to tell LyX that my custom enumerate 
> (as set in the Local Layout and Preamble) is different from the 
> standard one and hence the counting should restart when changing 
> environments.
>
> I thought LyX would figure out what I want by seeing that the 
> LatexName or LabelCounter differs from the standard enumerate 
> environment but that does not do the trick.
>
> Is there an additional setting I miss, or is it a shortcoming of LyX?
>
> Best,
> Daniel

AFAIK:{You need to use ERT in the "Enumarate Opitons" of LyX, and tell 
LaTeX to restart or resume numbering by yourself. Otherwise LyX does not 
have a direct option to do that.}

Baris

-- 
↓↓
Please bottom-post. Start your reply here:



Re: Counters of custom list environment

2019-04-02 Thread Daniel

On 02/04/2019 20:20, Paul A. Rubin wrote:

On 4/2/19 6:45 AM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
(a) Enumerate

but the output is actually

i. MyEnumerate
1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate 
(as set in the Local Layout and Preamble) is different from the 
standard one and hence the counting should restart when changing 
environments.


I thought LyX would figure out what I want by seeing that the 
LatexName or LabelCounter differs from the standard enumerate 
environment but that does not do the trick.


Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel
Are you saying that you want the LaTeX output to match what you see in 
LyX ("(a)" in PDF), or that you want what you see in LyX to match the 
LaTeX output ("1." in LyX)?


The latter.

Daniel



Re: Counters of custom list environment

2019-04-02 Thread Paul A. Rubin

On 4/2/19 6:45 AM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
(a) Enumerate

but the output is actually

i. MyEnumerate
1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate 
(as set in the Local Layout and Preamble) is different from the 
standard one and hence the counting should restart when changing 
environments.


I thought LyX would figure out what I want by seeing that the 
LatexName or LabelCounter differs from the standard enumerate 
environment but that does not do the trick.


Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel
Are you saying that you want the LaTeX output to match what you see in 
LyX ("(a)" in PDF), or that you want what you see in LyX to match the 
LaTeX output ("1." in LyX)?


Paul