RE: Numbering of Theorems, etc.

2017-02-13 Thread Bernt Lie


From: Andrew Parsloe<mailto:apars...@clear.net.nz>
Sent: Monday, February 13, 2017 21:19
To: Bernt Lie<mailto:bernt@usn.no>; 
lyx-users@lists.lyx.org<mailto:lyx-users@lists.lyx.org>
Subject: Re: Numbering of Theorems, etc.



On 9/02/2017 9:16 a.m., Andrew Parsloe wrote:
>
>
> On 9/02/2017 5:01 a.m., Bernt Lie wrote:
>
>> I have now created a new account, and almost finished setting up the
>> computer. HOWEVER, the AMS environments received from Andrew Parsloe
>> doesn’t work properly (they used to work on my old account…). Here is
>> the error message I get when I open my file which utilizes the number of
>> theorems by chapter and type:
>>
>> This is what I have done:
>>
>> 1.I saved the files from Andrew of November 17, 2016, in the %appdata%
>> under LyX2.2/templates
>>
>>
>
>>
>> Any clues as to what may be wrong?
>>
>> -BL
>>
> The files should go in your LyX2.2/layouts folder Bernt. Shift them
> there and then reconfigure.
>
> Andrew
>
The lists have been down. Did you get this reply Bernt and did it work?
--
Yes, thanks: it worked perfectly. Maybe my response got lost… Anyway, I do hope 
it becomes part of v. 2.3.

I guess that’s why I didn’t see any activity in a while… 
-B




Re: Numbering of Theorems, etc.

2017-02-13 Thread Andrew Parsloe



On 9/02/2017 9:16 a.m., Andrew Parsloe wrote:



On 9/02/2017 5:01 a.m., Bernt Lie wrote:


I have now created a new account, and almost finished setting up the
computer. HOWEVER, the AMS environments received from Andrew Parsloe
doesn’t work properly (they used to work on my old account…). Here is
the error message I get when I open my file which utilizes the number of
theorems by chapter and type:

This is what I have done:

1.I saved the files from Andrew of November 17, 2016, in the %appdata%
under LyX2.2/templates






Any clues as to what may be wrong?

-BL


The files should go in your LyX2.2/layouts folder Bernt. Shift them
there and then reconfigure.

Andrew


The lists have been down. Did you get this reply Bernt and did it work?

Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Numbering of Theorems, etc.

2016-11-18 Thread Richard Heck
On 11/17/2016 03:42 PM, Andrew Parsloe wrote:
>
>
> On 18/11/2016 5:43 a.m., Richard Heck wrote:
>> On 11/17/2016 04:42 AM, Andrew Parsloe wrote:
>>>
>>> LyX doesn't supply all the modules necessary to use AMS environments
>>> numbered by type within chapters. I ran into this problem some weeks
>>> ago but found I could create or adjust the necessary modules using the
>>> supplied ones as models. I've attached the new/adjusted ones to this
>>> email. Place them in the layouts folder of your personal LyX
>>> directory. Then you will need to reconfigure LyX so it knows of them.
>>>
>>> There are dependencies among the modules which is why some can't be
>>> added or deleted without others.
>>
>> Thanks for these. I've committed them, but I guess I should first have
>> asked for a GPL declaration, so I can add you to the credits. Can you
>> just send a short email to lyx-devel saying something like: I hereby
>> agree to license my contributions to LyX under the General Public
>> License, version 2 or any later version?
>>
>> Richard
>>
>
> OK, I'll do that, although my contribution was largely mechanical. I
> gather from comments in the modules that the "real work" was done by
> Paul Rubin building on earlier work by you.

It's probably not essential for licensing purposes, but you deserve the
credit.

Richard



Re: Numbering of Theorems, etc.

2016-11-17 Thread Andrew Parsloe



On 17/11/2016 10:56 p.m., Bernt Lie wrote:


-Original Message-
From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Andrew Parsloe
Sent: torsdag 17. november 2016 10.43
To: lyx-users@lists.lyx.org
Subject: Re: Numbering of Theorems, etc.



On 17/11/2016 9:43 p.m., Bernt Lie wrote:

-Original Message-

From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On
Behalf Of Andrew Parsloe


Perhaps I've misunderstood, but it seems to me what is wanted is
the module Theorems (Numbered by

Type within Chapters) that comes with LyX.

This allows one to number by type within chapters each of theorems,
corollaries, lemmas, propositions,

conjectures, facts, definitions, examples, problems, exercises,
remarks and claims.

 Andrew

--

Thanks Andrew. Yes, that's what I also thought, but this has no
effect... Choosing

and

seems to give the same result. I don’t understand why. (Is it because
the first selection says AMS, Numbered by Type, and the second one
doesn’t mention AMS?)

Anyway, depending on which choice I make first, not all choices are
available. Example: with the latter of these choices (both Theorems
(AMS, ...) and Theorems (Numbered by Type...)...

·if I try to select Theorems (AMS, ...) first, option “Delete” is not
available

·so I have to delete the second option first, and then after that, I
can delete “Theorems (AMS, ...)”.

Likewise, module “Theorems (Numbered by Type within Chapters)” – which
is really what I want – can only be added if I **first** add “Theorems
(AMS, Numbered by Type)”... and then it doesn’t give the expected effect.

Ideally, this is how I’d like it to work, without having to “hack” in
the preamble...

--

Thanks,

Bernt



 LyX doesn't supply all the modules necessary to use AMS environments 
numbered by type within
 chapters. I ran into this problem some weeks ago but found I could create 
or adjust the necessary
 modules using the supplied ones as models. I've attached the new/adjusted 
ones to this email. Place
 them in the layouts folder of your personal LyX directory.
 Then you will need to reconfigure LyX so it knows of them.

 There are dependencies among the modules which is why some can't be added 
or deleted without
 others.
--
Thanks, Andrew...

* I will probably be able to figure out what the "layouts folder of your personal 
LyX directory" is. I *assume* that what I have to do, is simply save the attached 
files in this folder. (Explorer... using %appdata%, I found folder layouts under LyX2.2.)

* "Then you will need to reconfigure LyX so it knows of them". Here, I'm lost 
as to what this means. Does this simply mean: go into Document Settings of LyX, and add 
the new modules in the Modules part? Or something entirely different?




-Bernt

OK, I see others have intervened while I've been asleep but for 
completeness I'll answer anyway.


"layouts folder of your personal LyX directory": On my windows 7 
machine, the folder is C:\Users\Andrew\AppData\Roaming\LyX2.2\layouts. 
(On your machine obviously the "Andrew" will be different but the folder 
you've discovered sounds like the right one.) Save the files to this folder.


Reconfiguring LyX: Open LyX. Under Tools > Reconfigure click 
Reconfigure. A lot of activity will show in the status bar at the bottom 
of the LyX window, LyX may even seem to freeze for some seconds, and 
then a message box should pop up telling you to close then restart LyX. 
When you do and go to Documents > Settings > Modules the new modules 
should be present in the list.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Numbering of Theorems, etc.

2016-11-17 Thread Andrew Parsloe



On 18/11/2016 5:43 a.m., Richard Heck wrote:

On 11/17/2016 04:42 AM, Andrew Parsloe wrote:


LyX doesn't supply all the modules necessary to use AMS environments
numbered by type within chapters. I ran into this problem some weeks
ago but found I could create or adjust the necessary modules using the
supplied ones as models. I've attached the new/adjusted ones to this
email. Place them in the layouts folder of your personal LyX
directory. Then you will need to reconfigure LyX so it knows of them.

There are dependencies among the modules which is why some can't be
added or deleted without others.


Thanks for these. I've committed them, but I guess I should first have
asked for a GPL declaration, so I can add you to the credits. Can you
just send a short email to lyx-devel saying something like: I hereby
agree to license my contributions to LyX under the General Public
License, version 2 or any later version?

Richard



OK, I'll do that, although my contribution was largely mechanical. I 
gather from comments in the modules that the "real work" was done by 
Paul Rubin building on earlier work by you.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Numbering of Theorems, etc.

2016-11-17 Thread Richard Heck
On 11/17/2016 04:42 AM, Andrew Parsloe wrote:
>
> LyX doesn't supply all the modules necessary to use AMS environments
> numbered by type within chapters. I ran into this problem some weeks
> ago but found I could create or adjust the necessary modules using the
> supplied ones as models. I've attached the new/adjusted ones to this
> email. Place them in the layouts folder of your personal LyX
> directory. Then you will need to reconfigure LyX so it knows of them.
>
> There are dependencies among the modules which is why some can't be
> added or deleted without others.

Thanks for these. I've committed them, but I guess I should first have
asked for a GPL declaration, so I can add you to the credits. Can you
just send a short email to lyx-devel saying something like: I hereby
agree to license my contributions to LyX under the General Public
License, version 2 or any later version?

Richard



RE: Numbering of Theorems, etc.

2016-11-17 Thread Bernt Lie
-Original Message-
From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Wolfgang Engelmann
Sent: torsdag 17. november 2016 11.06
To: lyx-users@lists.lyx.org
Subject: Re: Numbering of Theorems, etc.



On 17.11.2016 10:56, Bernt Lie wrote:
> -Original Message-
> From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On 
> Behalf Of Andrew Parsloe
> Sent: torsdag 17. november 2016 10.43
> To: lyx-users@lists.lyx.org
> Subject: Re: Numbering of Theorems, etc.
>
>
>
> On 17/11/2016 9:43 p.m., Bernt Lie wrote:
>> -Original Message-
>>
>> From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On 
>> Behalf Of Andrew Parsloe
>>
>>
>> Perhaps I've misunderstood, but it seems to me what is wanted is 
>> the module Theorems (Numbered by
>>
>> Type within Chapters) that comes with LyX.
>>
>> This allows one to number by type within chapters each of 
>> theorems, corollaries, lemmas, propositions,
>>
>> conjectures, facts, definitions, examples, problems, exercises, 
>> remarks and claims.
>>
>>  Andrew
>>
>> --
>>
>> Thanks Andrew. Yes, that's what I also thought, but this has no 
>> effect... Choosing
>>
>> and
>>
>> seems to give the same result. I don’t understand why. (Is it because 
>> the first selection says AMS, Numbered by Type, and the second one 
>> doesn’t mention AMS?)
>>
>> Anyway, depending on which choice I make first, not all choices are 
>> available. Example: with the latter of these choices (both Theorems 
>> (AMS, ...) and Theorems (Numbered by Type...)...
>>
>> ·if I try to select Theorems (AMS, ...) first, option “Delete” is not 
>> available
>>
>> ·so I have to delete the second option first, and then after that, I 
>> can delete “Theorems (AMS, ...)”.
>>
>> Likewise, module “Theorems (Numbered by Type within Chapters)” – 
>> which is really what I want – can only be added if I **first** add 
>> “Theorems (AMS, Numbered by Type)”... and then it doesn’t give the expected 
>> effect.
>>
>> Ideally, this is how I’d like it to work, without having to “hack” in 
>> the preamble...
>>
>> --
>>
>> Thanks,
>>
>> Bernt
>>
>  LyX doesn't supply all the modules necessary to use AMS environments 
> numbered by type within
>  chapters. I ran into this problem some weeks ago but found I could 
> create or adjust the necessary
>  modules using the supplied ones as models. I've attached the 
> new/adjusted ones to this email. Place
>  them in the layouts folder of your personal LyX directory.
>  Then you will need to reconfigure LyX so it knows of them.
>
>  There are dependencies among the modules which is why some can't be 
> added or deleted without
>  others.
> --
> Thanks, Andrew...
>
> * I will probably be able to figure out what the "layouts folder of 
> your personal LyX directory" is. I *assume* that what I have to do, is 
> simply save the attached files in this folder. (Explorer... using 
> %appdata%, I found folder layouts under LyX2.2.)
>
> * "Then you will need to reconfigure LyX so it knows of them". Here, I'm lost 
> as to what this means. Does this simply mean: go into Document Settings of 
> LyX, and add the new modules in the Modules part? Or something entirely 
> different?
>
> -Bernt
   >tools>reconfigure
   Wolfgang


Beautiful! Thanks, Richard, Andrew and Wolfgang!

It would be very nice if these improved/fixed modules could be part of the 
standard installation of LyX in the future -- so that I don't have to remember 
to save them each time...

-Bernt


Re: Numbering of Theorems, etc.

2016-11-17 Thread Wolfgang Engelmann



On 17.11.2016 10:56, Bernt Lie wrote:

-Original Message-
From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Andrew Parsloe
Sent: torsdag 17. november 2016 10.43
To: lyx-users@lists.lyx.org
Subject: Re: Numbering of Theorems, etc.



On 17/11/2016 9:43 p.m., Bernt Lie wrote:

-Original Message-

From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On
Behalf Of Andrew Parsloe


Perhaps I've misunderstood, but it seems to me what is wanted is
the module Theorems (Numbered by

Type within Chapters) that comes with LyX.

This allows one to number by type within chapters each of theorems,
corollaries, lemmas, propositions,

conjectures, facts, definitions, examples, problems, exercises,
remarks and claims.

 Andrew

--

Thanks Andrew. Yes, that's what I also thought, but this has no
effect... Choosing

and

seems to give the same result. I don’t understand why. (Is it because
the first selection says AMS, Numbered by Type, and the second one
doesn’t mention AMS?)

Anyway, depending on which choice I make first, not all choices are
available. Example: with the latter of these choices (both Theorems
(AMS, ...) and Theorems (Numbered by Type...)...

·if I try to select Theorems (AMS, ...) first, option “Delete” is not
available

·so I have to delete the second option first, and then after that, I
can delete “Theorems (AMS, ...)”.

Likewise, module “Theorems (Numbered by Type within Chapters)” – which
is really what I want – can only be added if I **first** add “Theorems
(AMS, Numbered by Type)”... and then it doesn’t give the expected effect.

Ideally, this is how I’d like it to work, without having to “hack” in
the preamble...

--

Thanks,

Bernt


 LyX doesn't supply all the modules necessary to use AMS environments 
numbered by type within
 chapters. I ran into this problem some weeks ago but found I could create 
or adjust the necessary
 modules using the supplied ones as models. I've attached the new/adjusted 
ones to this email. Place
 them in the layouts folder of your personal LyX directory.
 Then you will need to reconfigure LyX so it knows of them.

 There are dependencies among the modules which is why some can't be added 
or deleted without
 others.
--
Thanks, Andrew...

* I will probably be able to figure out what the "layouts folder of your personal 
LyX directory" is. I *assume* that what I have to do, is simply save the attached 
files in this folder. (Explorer... using %appdata%, I found folder layouts under LyX2.2.)

* "Then you will need to reconfigure LyX so it knows of them". Here, I'm lost 
as to what this means. Does this simply mean: go into Document Settings of LyX, and add 
the new modules in the Modules part? Or something entirely different?

-Bernt

>tools>reconfigure
Wolfgang


RE: Numbering of Theorems, etc.

2016-11-17 Thread Bernt Lie

-Original Message-
From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Andrew Parsloe
Sent: torsdag 17. november 2016 10.43
To: lyx-users@lists.lyx.org
Subject: Re: Numbering of Theorems, etc.



On 17/11/2016 9:43 p.m., Bernt Lie wrote:
> -Original Message-
>
> From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On 
> Behalf Of Andrew Parsloe
>
>
>Perhaps I've misunderstood, but it seems to me what is wanted is 
> the module Theorems (Numbered by
>
>Type within Chapters) that comes with LyX.
>
>This allows one to number by type within chapters each of theorems, 
> corollaries, lemmas, propositions,
>
>conjectures, facts, definitions, examples, problems, exercises, 
> remarks and claims.
>
> Andrew
>
> --
>
> Thanks Andrew. Yes, that's what I also thought, but this has no 
> effect... Choosing
>
> and
>
> seems to give the same result. I don’t understand why. (Is it because 
> the first selection says AMS, Numbered by Type, and the second one 
> doesn’t mention AMS?)
>
> Anyway, depending on which choice I make first, not all choices are 
> available. Example: with the latter of these choices (both Theorems 
> (AMS, ...) and Theorems (Numbered by Type...)...
>
> ·if I try to select Theorems (AMS, ...) first, option “Delete” is not 
> available
>
> ·so I have to delete the second option first, and then after that, I 
> can delete “Theorems (AMS, ...)”.
>
> Likewise, module “Theorems (Numbered by Type within Chapters)” – which 
> is really what I want – can only be added if I **first** add “Theorems 
> (AMS, Numbered by Type)”... and then it doesn’t give the expected effect.
>
> Ideally, this is how I’d like it to work, without having to “hack” in 
> the preamble...
>
> --
>
> Thanks,
>
> Bernt
>

LyX doesn't supply all the modules necessary to use AMS environments 
numbered by type within 
chapters. I ran into this problem some weeks ago but found I could create 
or adjust the necessary   
modules using the supplied ones as models. I've attached the new/adjusted 
ones to this email. Place  
them in the layouts folder of your personal LyX directory. 
Then you will need to reconfigure LyX so it knows of them.

There are dependencies among the modules which is why some can't be added 
or deleted without  
others.
--
Thanks, Andrew...

* I will probably be able to figure out what the "layouts folder of your 
personal LyX directory" is. I *assume* that what I have to do, is simply save 
the attached files in this folder. (Explorer... using %appdata%, I found folder 
layouts under LyX2.2.)

* "Then you will need to reconfigure LyX so it knows of them". Here, I'm lost 
as to what this means. Does this simply mean: go into Document Settings of LyX, 
and add the new modules in the Modules part? Or something entirely different?

-Bernt


Re: Numbering of Theorems, etc.

2016-11-17 Thread Andrew Parsloe



On 17/11/2016 9:43 p.m., Bernt Lie wrote:

-Original Message-

From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf
Of Andrew Parsloe


   Perhaps I've misunderstood, but it seems to me what is wanted is the
module Theorems (Numbered by

   Type within Chapters) that comes with LyX.

   This allows one to number by type within chapters each of theorems,
corollaries, lemmas, propositions,

   conjectures, facts, definitions, examples, problems, exercises,
remarks and claims.

Andrew

--

Thanks Andrew. Yes, that's what I also thought, but this has no
effect... Choosing

and

seems to give the same result. I don’t understand why. (Is it because
the first selection says AMS, Numbered by Type, and the second one
doesn’t mention AMS?)

Anyway, depending on which choice I make first, not all choices are
available. Example: with the latter of these choices (both Theorems
(AMS, ...) and Theorems (Numbered by Type...)...

·if I try to select Theorems (AMS, ...) first, option “Delete” is not
available

·so I have to delete the second option first, and then after that, I can
delete “Theorems (AMS, ...)”.

Likewise, module “Theorems (Numbered by Type within Chapters)” – which
is really what I want – can only be added if I **first** add “Theorems
(AMS, Numbered by Type)”... and then it doesn’t give the expected effect.

Ideally, this is how I’d like it to work, without having to “hack” in
the preamble...

--

Thanks,

Bernt



LyX doesn't supply all the modules necessary to use AMS environments 
numbered by type within chapters. I ran into this problem some weeks ago 
but found I could create or adjust the necessary modules using the 
supplied ones as models. I've attached the new/adjusted ones to this 
email. Place them in the layouts folder of your personal LyX directory. 
Then you will need to reconfigure LyX so it knows of them.


There are dependencies among the modules which is why some can't be 
added or deleted without others.


Andrew


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
# Original Author : David L. Johnson 
# Probably broken by Jean-Marc Lasgouttes 
# modified and modularized by Emmanuel GUREGHIAN 
# Tinkered with Sep. '07 by Paul Rubin 
# Modularized Jan 08 by Richard Heck 
# Hacked June '09 by Paul Rubin  to use separate counters
# Chapter dependence added Oct '16 by Andrew Parsloe 

# The environments defined are :
# - Theorem
# - Corollary
# - Lemma
# - Proposition
# - Conjecture
# - Fact
# - Definition
# - Example
# - Problem
# - Exercise
# - Solution
# - Remark
# - Claim
# - Case (by inclusion)


# We need separate counters for each theorem-like style.
Format 60
Counter theorem
End
Counter corollary
End
Counter lemma
End
Counter proposition
End
Counter conjecture
End
Counter fact
End
Counter definition
End
Counter example
End
Counter problem
End
Counter exercise
End
Counter solution
End
Counter remark
End
Counter claim
End

OutlinerName thm "Definitions & Theorems"

Style Theorem
Category  Reasoning
MarginFirst_Dynamic
LatexType Environment
LatexName thm
NextNoIndent  1
ResetArgs 1
AddToToc  thm
IsTocCaption  1
Argument 1
LabelString"Additional Theorem Text"
Tooltip"Additional text appended to the theorem header"
IsTocCaption  1
EndArgument
LabelSep  xx
ParIndent MMM
ParSkip   0.4
ItemSep   0.2
TopSep0.7
BottomSep 0.7
ParSep0.3
Align Block
AlignPossible Left
LabelType Static
LabelCounter  theorem
LabelString   "Theorem \thechapter.\thetheorem."
Font
  Shape   Italic
  SizeNormal
EndFont
LabelFont
  Shape   Up
  Series  Bold
EndFont
Preamble
\theoremstyle{plain}
\ifx\thechapter\undefined
\newtheorem{thm}{\protect\theoremname}
  \else
  \newtheorem{thm}{\protect\theoremname}[chapter]
\fi
EndPreamble
LangPreamble
\providecommand{\theoremname}{_(Theorem)}
EndLangPreamble
BabelPreamble
\addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
EndBabelPreamble
Requires  amsthm
End


Style Corollary
CopyStyle Theorem
LatexName cor
LabelString   "Corollary 

RE: Numbering of Theorems, etc.

2016-11-17 Thread Bernt Lie


-Original Message-

From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Andrew Parsloe

Sent: onsdag 16. november 2016 23.08

To: lyx-users@lists.lyx.org

Subject: Re: Numbering of Theorems, etc.







On 17/11/2016 6:02 a.m., Richard Heck wrote:

> On 11/16/2016 04:03 AM, Bernt Lie wrote:

>>

>> *From:*Richard Heck [mailto:rgh...@lyx.org]

>> *Sent:* tirsdag 15. november 2016 19.04

>> *To:* Bernt Lie <bernt@hit.no>; LyX Users

>> <lyx-users@lists.lyx.org>

>> *Subject:* Re: Numbering of Theorems, etc.

>>

>> On 11/15/2016 09:43 AM, Bernt Lie wrote:

>>

>> I use LyX 2.2.1 (currently) on Windows 10.

>>

>> I have a rather long document (some 600 pages, with 9 chapters +

>> several appendices), and want to number Exercises, Problems,

>> Examples, Theorems, etc. **independently** and numbered **by the

>> chapter** (or appendix) they appear in. Thus, exercises in chapter

>> 6 should be numbered Exercise 6.1, Exercise 6.2, etc., while

>> examples in chapter 6 should be numbered Example 6.1, Example 6.2,

>> etc.

>>

>> Currently, this doesn’t work. My set-up is:

>>

>> ·Document class: Book (Standard Class)

>>

>> ·Modules: Theorems (AMS, Numbered by Type)

>>

>> What else do I need to set?

>>

>>

>> I assume the problem is that you are not getting the "numbered by

>> chapter" bit? If so, then maybe the easiest thing to do is use the

>> internal LaTeX command \@addtoreset in the preamble, thus:

>> \@addtoreset{theorem}{chapter}

>> Now the theorem counter gets reset whenever the chapter counter is reset.

>>

>> You'll need to do the same thing for any other counters you are

>> using, and see the theorems-ams-bytype.inc file for the names of the

>> various counters.

>>

>> See also: http://www.tex.ac.uk/FAQ-addtoreset.html.

>>

>> Richard

>>

>> --

>>

>> Richard,

>>

>> Thanks for quick reply. I’ve tested it (inserting

>> “\@addtoreset{theorem}{chapter}” in the preamble), but now get the

>> following error messages:

>>

>> OK. Let me try to be a little bit more precise. Currently, the

>> counters count independently. In other words, Definition 1,

>> Definition 2, Theorem 1, Definition 3, Theorem 2, Example 1, etc.

>>

>> However, they (i) do not contain a chapter counter, and (ii) they do

>> (obviously) not reset the chapter counter in each chapter.

>>

>

> See the attached. Sorry, I got the names of the counters wrong. (I

> mixed up the LyX counters and the LaTeX ones.) The LaTeX names are the

> same as the names of the environments as they are declared in the preamble, 
> e.g.:

>  \newtheorem{lem}{\protect\lemmaname}

> So the counter is "lem" for Lemmas.

>

> Richard

>

  Perhaps I've misunderstood, but it seems to me what is wanted is the module 
Theorems (Numbered by

  Type within Chapters) that comes with LyX.



  This allows one to number by type within chapters each of theorems, 
corollaries, lemmas, propositions,

  conjectures, facts, definitions, examples, problems, exercises, remarks and 
claims.



   Andrew

--

Thanks Andrew. Yes, that's what I also thought, but this has no effect... 
Choosing



[cid:image001.jpg@01D240B7.133551E0]



and

[cid:image002.jpg@01D240B7.133551E0]



seems to give the same result. I don’t understand why. (Is it because the first 
selection says AMS, Numbered by Type, and the second one doesn’t mention AMS?)



Anyway, depending on which choice I make first, not all choices are available. 
Example: with the latter of these choices (both Theorems (AMS, ...) and 
Theorems (Numbered by Type...)...

· if I try to select Theorems (AMS, ...) first, option “Delete” is not 
available

· so I have to delete the second option first, and then after that, I 
can delete “Theorems (AMS, ...)”.

Likewise, module “Theorems (Numbered by Type within Chapters)” – which is 
really what I want – can only be added if I *first* add “Theorems (AMS, 
Numbered by Type)”... and then it doesn’t give the expected effect.



Ideally, this is how I’d like it to work, without having to “hack” in the 
preamble...

--

Thanks,

Bernt


Re: Numbering of Theorems, etc.

2016-11-16 Thread Andrew Parsloe



On 17/11/2016 6:02 a.m., Richard Heck wrote:

On 11/16/2016 04:03 AM, Bernt Lie wrote:


*From:*Richard Heck [mailto:rgh...@lyx.org]
*Sent:* tirsdag 15. november 2016 19.04
*To:* Bernt Lie <bernt@hit.no>; LyX Users <lyx-users@lists.lyx.org>
*Subject:* Re: Numbering of Theorems, etc.

On 11/15/2016 09:43 AM, Bernt Lie wrote:

I use LyX 2.2.1 (currently) on Windows 10.

I have a rather long document (some 600 pages, with 9 chapters +
several appendices), and want to number Exercises, Problems,
Examples, Theorems, etc. **independently** and numbered **by the
chapter** (or appendix) they appear in. Thus, exercises in chapter
6 should be numbered Exercise 6.1, Exercise 6.2, etc., while
examples in chapter 6 should be numbered Example 6.1, Example 6.2,
etc.

Currently, this doesn’t work. My set-up is:

·Document class: Book (Standard Class)

·Modules: Theorems (AMS, Numbered by Type)

What else do I need to set?


I assume the problem is that you are not getting the "numbered by
chapter" bit? If so, then maybe the easiest thing to do is use the
internal LaTeX command \@addtoreset in the preamble, thus:
\@addtoreset{theorem}{chapter}
Now the theorem counter gets reset whenever the chapter counter is reset.

You'll need to do the same thing for any other counters you are using,
and see the theorems-ams-bytype.inc file for the names of the various
counters.

See also: http://www.tex.ac.uk/FAQ-addtoreset.html.

Richard

--

Richard,

Thanks for quick reply. I’ve tested it (inserting
“\@addtoreset{theorem}{chapter}” in the preamble), but now get the
following error messages:

OK. Let me try to be a little bit more precise. Currently, the
counters count independently. In other words, Definition 1, Definition
2, Theorem 1, Definition 3, Theorem 2, Example 1, etc.

However, they (i) do not contain a chapter counter, and (ii) they do
(obviously) not reset the chapter counter in each chapter.



See the attached. Sorry, I got the names of the counters wrong. (I mixed
up the LyX counters and the LaTeX ones.) The LaTeX names are the same as
the names of the environments as they are declared in the preamble, e.g.:
 \newtheorem{lem}{\protect\lemmaname}
So the counter is "lem" for Lemmas.

Richard

Perhaps I've misunderstood, but it seems to me what is wanted is the 
module Theorems (Numbered by Type within Chapters) that comes with LyX. 
This allows one to number by type within chapters each of theorems, 
corollaries, lemmas, propositions, conjectures, facts, definitions, 
examples, problems, exercises, remarks and claims.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: Numbering of Theorems, etc.

2016-11-16 Thread Richard Heck
On 11/16/2016 04:03 AM, Bernt Lie wrote:
>
> *From:*Richard Heck [mailto:rgh...@lyx.org]
> *Sent:* tirsdag 15. november 2016 19.04
> *To:* Bernt Lie <bernt@hit.no>; LyX Users <lyx-users@lists.lyx.org>
> *Subject:* Re: Numbering of Theorems, etc.
>
>  
>
> On 11/15/2016 09:43 AM, Bernt Lie wrote:
>
> I use LyX 2.2.1 (currently) on Windows 10.
>
>  
>
> I have a rather long document (some 600 pages, with 9 chapters +
> several appendices), and want to number Exercises, Problems,
> Examples, Theorems, etc. **independently** and numbered **by the
> chapter** (or appendix) they appear in. Thus, exercises in chapter
> 6 should be numbered Exercise 6.1, Exercise 6.2, etc., while
> examples in chapter 6 should be numbered Example 6.1, Example 6.2,
> etc.
>
>  
>
> Currently, this doesn’t work. My set-up is:
>
> · Document class: Book (Standard Class)
>
> · Modules: Theorems (AMS, Numbered by Type)
>
>  
>
> What else do I need to set?
>
>
> I assume the problem is that you are not getting the "numbered by
> chapter" bit? If so, then maybe the easiest thing to do is use the
> internal LaTeX command \@addtoreset in the preamble, thus:
> \@addtoreset{theorem}{chapter}
> Now the theorem counter gets reset whenever the chapter counter is reset.
>
> You'll need to do the same thing for any other counters you are using,
> and see the theorems-ams-bytype.inc file for the names of the various
> counters.
>
> See also: http://www.tex.ac.uk/FAQ-addtoreset.html.
>
> Richard
>
> --
>
> Richard,
>
> Thanks for quick reply. I’ve tested it (inserting
> “\@addtoreset{theorem}{chapter}” in the preamble), but now get the
> following error messages:
>
>  
>
> OK. Let me try to be a little bit more precise. Currently, the
> counters count independently. In other words, Definition 1, Definition
> 2, Theorem 1, Definition 3, Theorem 2, Example 1, etc.
>
>  
>
> However, they (i) do not contain a chapter counter, and (ii) they do
> (obviously) not reset the chapter counter in each chapter.
>

See the attached. Sorry, I got the names of the counters wrong. (I mixed
up the LyX counters and the LaTeX ones.) The LaTeX names are the same as
the names of the environments as they are declared in the preamble, e.g.:
\newtheorem{lem}{\protect\lemmaname}
So the counter is "lem" for Lemmas.

Richard



ch.lyx
Description: application/lyx


RE: Numbering of Theorems, etc.

2016-11-16 Thread Bernt Lie
From: Richard Heck [mailto:rgh...@lyx.org]
Sent: tirsdag 15. november 2016 19.04
To: Bernt Lie <bernt@hit.no>; LyX Users <lyx-users@lists.lyx.org>
Subject: Re: Numbering of Theorems, etc.

On 11/15/2016 09:43 AM, Bernt Lie wrote:
I use LyX 2.2.1 (currently) on Windows 10.

I have a rather long document (some 600 pages, with 9 chapters + several 
appendices), and want to number Exercises, Problems, Examples, Theorems, etc. 
*independently* and numbered *by the chapter* (or appendix) they appear in. 
Thus, exercises in chapter 6 should be numbered Exercise 6.1, Exercise 6.2, 
etc., while examples in chapter 6 should be numbered Example 6.1, Example 6.2, 
etc.

Currently, this doesn’t work. My set-up is:

· Document class: Book (Standard Class)

· Modules: Theorems (AMS, Numbered by Type)

What else do I need to set?

I assume the problem is that you are not getting the "numbered by chapter" bit? 
If so, then maybe the easiest thing to do is use the internal LaTeX command 
\@addtoreset in the preamble, thus:
\@addtoreset{theorem}{chapter}
Now the theorem counter gets reset whenever the chapter counter is reset.

You'll need to do the same thing for any other counters you are using, and see 
the theorems-ams-bytype.inc file for the names of the various counters.

See also: http://www.tex.ac.uk/FAQ-addtoreset.html.

Richard
--
Richard,
Thanks for quick reply. I’ve tested it (inserting 
“\@addtoreset{theorem}{chapter}” in the preamble), but now get the following 
error messages:
[cid:image001.jpg@01D23FF0.AC5099B0]

OK. Let me try to be a little bit more precise. Currently, the counters count 
independently. In other words, Definition 1, Definition 2, Theorem 1, 
Definition 3, Theorem 2, Example 1, etc.

However, they (i) do not contain a chapter counter, and (ii) they do 
(obviously) not reset the chapter counter in each chapter.

So, I still have a problem.
-Bernt


Re: Numbering of Theorems, etc.

2016-11-15 Thread Richard Heck
On 11/15/2016 09:43 AM, Bernt Lie wrote:
>
> I use LyX 2.2.1 (currently) on Windows 10.
>
>  
>
> I have a rather long document (some 600 pages, with 9 chapters +
> several appendices), and want to number Exercises, Problems, Examples,
> Theorems, etc. **independently** and numbered **by the chapter** (or
> appendix) they appear in. Thus, exercises in chapter 6 should be
> numbered Exercise 6.1, Exercise 6.2, etc., while examples in chapter 6
> should be numbered Example 6.1, Example 6.2, etc.
>
>  
>
> Currently, this doesn’t work. My set-up is:
>
> · Document class: Book (Standard Class)
>
> · Modules: Theorems (AMS, Numbered by Type)
>
>  
>
> What else do I need to set?
>

I assume the problem is that you are not getting the "numbered by
chapter" bit? If so, then maybe the easiest thing to do is use the
internal LaTeX command \@addtoreset in the preamble, thus:
\@addtoreset{theorem}{chapter}
Now the theorem counter gets reset whenever the chapter counter is reset.

You'll need to do the same thing for any other counters you are using,
and see the theorems-ams-bytype.inc file for the names of the various
counters.

See also: http://www.tex.ac.uk/FAQ-addtoreset.html.

Richard



Numbering of Theorems, etc.

2016-11-15 Thread Bernt Lie
I use LyX 2.2.1 (currently) on Windows 10.

I have a rather long document (some 600 pages, with 9 chapters + several 
appendices), and want to number Exercises, Problems, Examples, Theorems, etc. 
*independently* and numbered *by the chapter* (or appendix) they appear in. 
Thus, exercises in chapter 6 should be numbered Exercise 6.1, Exercise 6.2, 
etc., while examples in chapter 6 should be numbered Example 6.1, Example 6.2, 
etc.

Currently, this doesn’t work. My set-up is:

· Document class: Book (Standard Class)

· Modules: Theorems (AMS, Numbered by Type)

What else do I need to set?

Thanks,
BL