Re: [RFC] Acknowledgment theorem type

2023-02-05 Thread Richard Kimberly Heck

On 2/3/23 10:16, Pavel Sanda wrote:
Riki, wouldn't it make sense to delete the whole theorem style 
"acknowledgement"

extension from LyX?


Jürgen had proposed removing it, but adding relevant code to local 
layout if it's detected. That would be fine with me.


Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Hal Kierstead via lyx-users



> On Feb 3, 2023, at 9:06 AM, Pavel Sanda  wrote:
> 
> On Fri, Feb 03, 2023 at 08:55:09AM -0700, Hal Kierstead wrote:
>>> On Fri, Feb 03, 2023 at 08:34:19AM -0700, Hal Kierstead via lyx-users wrote:
>>>> I use this for most papers in the sense (a). Why delete it? Note that 
>>>> ???Acknowledgment??? is suggested in the amsthm instructions???just like 
>>>> ???Lemma". 
>>> 
>>> Ha :)
>>> Can you point me to any paper of yours, where this is used?
>> 
>> See attachment, just before the references. Of course, in the end the 
>> journal uses their own style.
>> Hal
> 
> No, this is misunderstanding.
> You use Acknowledgments in the traditional sense as unnumbered section at the 
> end of the paper.
> What I'm talking about is that we currently also offer numbered 
> "theorem-style" acknowledgments,
> i.e. you could have it multiplte times as many subsections in the paper.
> 
> I don't think anyone uses it and we based it on amsthm package manual section 
> 4.2, which
> even AMS folks regard as a mistake.
> 
> Pavel
Sorry Pavel, it was a misunderstanding.
Hal
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Pavel Sanda
On Fri, Feb 03, 2023 at 08:55:09AM -0700, Hal Kierstead wrote:
> > On Fri, Feb 03, 2023 at 08:34:19AM -0700, Hal Kierstead via lyx-users wrote:
> >> I use this for most papers in the sense (a). Why delete it? Note that 
> >> ???Acknowledgment??? is suggested in the amsthm instructions???just like 
> >> ???Lemma". 
> > 
> > Ha :)
> > Can you point me to any paper of yours, where this is used?
> 
> See attachment, just before the references. Of course, in the end the journal 
> uses their own style.
> Hal

No, this is misunderstanding.
You use Acknowledgments in the traditional sense as unnumbered section at the 
end of the paper.
What I'm talking about is that we currently also offer numbered "theorem-style" 
acknowledgments,
i.e. you could have it multiplte times as many subsections in the paper.

I don't think anyone uses it and we based it on amsthm package manual section 
4.2, which
even AMS folks regard as a mistake.

Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Pavel Sanda
On Fri, Feb 03, 2023 at 08:34:19AM -0700, Hal Kierstead via lyx-users wrote:
> I use this for most papers in the sense (a). Why delete it? Note that 
> ???Acknowledgment??? is suggested in the amsthm instructions???just like 
> ???Lemma". 

Ha :)
Can you point me to any paper of yours, where this is used?

Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Hal Kierstead via lyx-users


> On Feb 3, 2023, at 8:16 AM, Pavel Sanda  wrote:
> 
> On Wed, Feb 01, 2023 at 04:13:32PM +0100, Jürgen Spitzmüller wrote:
>> Dear all,
>> 
>> As you might know, LyX features a theorem type "Acknowledgment" via the
>> "AMS extended" theorems modules. This is a question for people using
>> this.
> ...
>> (a) expressing gratefulness (credits, as in the "Acknowledgment" section of 
>> books or articles), 
>> (b) expressing respect ("In acknowledgment of his special merits he was 
>> appointed as honorary conductor of the orchestra"),
>> (c) the act or fact of accepting the truth or recognizing the existence of 
>> something ("acknowledgment of a mistake"),
>> (d) a confirmation ("I have received no acknowledgment")
> 
> 
> So this is what we got as an response from AMS tech support:
> 
>> An "Acknowledgment" theorem type is not implemented in the amsthm package.
>> The confusion probably comes from an entry in the amsthm documentation,
>> amsthdoc.pdf, where "Acknowledgment" is listed as a theorem heading that's
>> normally associated with the Remark style. Admittedly, this should not have
>> been included in the documentation, but the person who originally put it
>> there was thinking of case (a). In our publications, we treat these types of
>> Acknowledgments as an unnumbered section appearing at the end of the article,
>> so we do not recommend doing this as a theorem type. We will probably remove
>> this  from the next version of the documentation.
> 
> I actually looked at our latex source and it seems we are defining this 
> ourselves :)
> \theoremstyle{remark}
> \newtheorem{acknowledgement}[thm]{\protect\acknowledgementname}
> 
> Riki, wouldn't it make sense to delete the whole theorem style 
> "acknowledgement"
> extension from LyX?
> 
> Pavel
> -- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users

I use this for most papers in the sense (a). Why delete it? Note that 
“Acknowledgment” is suggested in the amsthm instructions—just like “Lemma". 

The \theoremstyle command
The amsthm package supports the notion of a current theorem style, which 
determines what will be produced by a given \newtheorem command. The three 
theorem styles provided—plain, definition, and remark—specify different degrees 
of visual emphasis corresponding to their relative importance. The details of 
this typographical treatment may vary depending on the document class, but 
typically the plain style produces italic body text, while the other two styles 
produce roman body text. These default settings are provided:
• plain : italic text, extra space above and below;
• definition : upright text, extra space above and below; • remark : upright 
text, no extra space above or below.
If no \theoremstyle command is given, the style used will be plain. To specify 
different styles, divide your \newtheorem commands into groups and preface each 
group with the appropriate \theoremstyle. Some examples:
  \theoremstyle{plain}% default
  \newtheorem{thm}{Theorem}[section]
  \newtheorem{lem}[thm]{Lemma}
  \newtheorem{prop}[thm]{Proposition}
  \newtheorem*{cor}{Corollary}
  \newtheorem*{KL}{Klein’s Lemma}
  \theoremstyle{definition}
  \newtheorem{defn}{Definition}[section]8
Using the amsthm package
4.2
Number swapping
\newtheorem{exmp}{Example}[section]
\newtheorem{xca}[exmp]{Exercise}
\theoremstyle{remark}
\newtheorem*{rem}{Remark}
\newtheorem*{note}{Note}
\newtheorem{case}{Case}
The following list summarizes the types of structures which are normally 
associated with each theorem style.
plain
definition
remark
Theorem, Lemma, Corollary, Proposition, Conjecture, Criterion, Assertion
Definition, Condition, Problem, Example, Exercise, Algorithm, Question, Axiom, 
Property, Assumption, Hypothesis
Remark, Note, Notation, Claim, Summary, Acknowledgment, Case, Conclusion-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Pavel Sanda
On Wed, Feb 01, 2023 at 04:13:32PM +0100, Jürgen Spitzmüller wrote:
> Dear all,
> 
> As you might know, LyX features a theorem type "Acknowledgment" via the
> "AMS extended" theorems modules. This is a question for people using
> this.
...
>(a) expressing gratefulness (credits, as in the "Acknowledgment" section of 
>books or articles), 
>(b) expressing respect ("In acknowledgment of his special merits he was 
>appointed as honorary conductor of the orchestra"),
>(c) the act or fact of accepting the truth or recognizing the existence of 
>something ("acknowledgment of a mistake"),
>(d) a confirmation ("I have received no acknowledgment")


So this is what we got as an response from AMS tech support:

> An "Acknowledgment" theorem type is not implemented in the amsthm package.
> The confusion probably comes from an entry in the amsthm documentation,
> amsthdoc.pdf, where "Acknowledgment" is listed as a theorem heading that's
> normally associated with the Remark style. Admittedly, this should not have
> been included in the documentation, but the person who originally put it
> there was thinking of case (a). In our publications, we treat these types of
> Acknowledgments as an unnumbered section appearing at the end of the article,
> so we do not recommend doing this as a theorem type. We will probably remove
> this  from the next version of the documentation.

I actually looked at our latex source and it seems we are defining this 
ourselves :)
\theoremstyle{remark}
\newtheorem{acknowledgement}[thm]{\protect\acknowledgementname}

Riki, wouldn't it make sense to delete the whole theorem style "acknowledgement"
extension from LyX?

Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-03 Thread Jürgen Spitzmüller
Am Mittwoch, dem 01.02.2023 um 16:13 +0100 schrieb Jürgen Spitzmüller:
> If you use or are familiar with the Acknowledgment theorem type: what
> are its general purposes, or how do you use it?

Clarification comes from AMS technical support (thanks Pavel for
approaching them):



An "Acknowledgment" theorem type is not implemented in the amsthm
package. The confusion probably comes from an entry in the amsthm
documentation, amsthdoc.pdf, where "Acknowledgment" is listed as a
theorem heading that's normally associated with the Remark style.
Admittedly, this should not have been included in the documentation,
but the person who originally put it there was thinking of case (a). In
our publications, we treat these types of Acknowledgments as an
unnumbered section appearing at the end of the article, so we do not
recommend doing this as a theorem type. We will probably remove this
from the next version of the documentation.

Thanks,
Brian Bartling



So we shouldn't have implemented this theorem type at all, but now that
we have it, we will treat its semantics as proposed by Brian.

-- 
Jürgen
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-01 Thread Richard Kimberly Heck

On 2/1/23 14:37, Andrew Parsloe wrote:

On 2/02/2023 4:13 am, Jürgen Spitzmüller wrote:

Dear all,

As you might know, LyX features a theorem type "Acknowledgment" via the
"AMS extended" theorems modules. This is a question for people using
this.

The issue appeared on the developers list that none of us is actually
sure about the function of this theorem type. This is a problem with
regard to translation into other languages, as "acknowledgment" can
mean different things, among them

(a) expressing gratefulness (credits, as in the "Acknowledgment"
section of books or articles),
(b) expressing respect ("In acknowledgment of his special merits he was
appointed as honorary conductor of the orchestra"),
(c) the act or fact of accepting the truth or recognizing the existence
of something ("acknowledgment of a mistake"),
(d) a confirmation ("I have received no acknowledgment")

Depending on the meaning, the term needs to be translated differently
to some languages. Currently, it is translated in the same way than the
Acknowledgment sections in articles (meaning [a]), and we have serious
doubts whether this is appropriate.

If you use or are familiar with the Acknowledgment theorem type: what
are its general purposes, or how do you use it?

Thanks,
My reading of amsthdoc.pdf, Section 4.1, is that Acknowledgment in the 
context of theorem styles is to be understood in sense (a). In 
amsthdoc.pdf it is grouped with things like Remark, Notation, 
Conclusion -- a typesetting style rather than a special kind of 
mathematical object.


I'm not sure about that. In my field anyway, Remark is used for 
comments, more or less. Sometimes it would be an explanation of a 
result, or of why one is proceeding a certain way. Notation would be 
used for explanations of notation. I'm less sure about Conclusion, 
though I would guess it was used for something like a remark that summed 
up the results of a certain line of investigation.


Still, thinking about this further, I agree with you that Acknowledgment 
would probably mean (a). I can imagine something like:


Acknowledgment 3.2: Theorem 3.1 is 'folklore'. The proof given here is 
based upon an idea suggested to me by NN.


Riki

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [RFC] Acknowledgment theorem type

2023-02-01 Thread Andrew Parsloe

On 2/02/2023 4:13 am, Jürgen Spitzmüller wrote:

Dear all,

As you might know, LyX features a theorem type "Acknowledgment" via the
"AMS extended" theorems modules. This is a question for people using
this.

The issue appeared on the developers list that none of us is actually
sure about the function of this theorem type. This is a problem with
regard to translation into other languages, as "acknowledgment" can
mean different things, among them

(a) expressing gratefulness (credits, as in the "Acknowledgment"
section of books or articles),
(b) expressing respect ("In acknowledgment of his special merits he was
appointed as honorary conductor of the orchestra"),
(c) the act or fact of accepting the truth or recognizing the existence
of something ("acknowledgment of a mistake"),
(d) a confirmation ("I have received no acknowledgment")

Depending on the meaning, the term needs to be translated differently
to some languages. Currently, it is translated in the same way than the
Acknowledgment sections in articles (meaning [a]), and we have serious
doubts whether this is appropriate.

If you use or are familiar with the Acknowledgment theorem type: what
are its general purposes, or how do you use it?

Thanks,
My reading of amsthdoc.pdf, Section 4.1, is that Acknowledgment in the 
context of theorem styles is to be understood in sense (a). In 
amsthdoc.pdf it is grouped with things like Remark, Notation, Conclusion 
-- a typesetting style rather than a special kind of mathematical object.

Andrew-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


[RFC] Acknowledgment theorem type

2023-02-01 Thread Jürgen Spitzmüller
Dear all,

As you might know, LyX features a theorem type "Acknowledgment" via the
"AMS extended" theorems modules. This is a question for people using
this.

The issue appeared on the developers list that none of us is actually
sure about the function of this theorem type. This is a problem with
regard to translation into other languages, as "acknowledgment" can
mean different things, among them

(a) expressing gratefulness (credits, as in the "Acknowledgment"
section of books or articles), 
(b) expressing respect ("In acknowledgment of his special merits he was
appointed as honorary conductor of the orchestra"),
(c) the act or fact of accepting the truth or recognizing the existence
of something ("acknowledgment of a mistake"),
(d) a confirmation ("I have received no acknowledgment")

Depending on the meaning, the term needs to be translated differently
to some languages. Currently, it is translated in the same way than the
Acknowledgment sections in articles (meaning [a]), and we have serious
doubts whether this is appropriate.

If you use or are familiar with the Acknowledgment theorem type: what
are its general purposes, or how do you use it?

Thanks,
-- 
Jürgen
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Problems related to custom AMS theorem module

2021-07-24 Thread Andrew Parsloe

On 24/07/2021 9:00 am, Paul A. Rubin wrote:

On 7/23/21 4:14 PM, Rudi Gaelzer wrote:


Is there a way to instruct Lyx to write certain auxiliary files into 
the local directory, instead of in /tmp/lyx_tmpdirxxx?



Is it LyX or LaTeX (pdflatex?) that writes the auxiliary files? I 
suspect the latter, in which case I'm pretty sure the answer to your 
question is no. You could create a custom export format and tell LyX 
to invoke a shell script (written by you) that would run whatever 
LaTeX commands were needed and then copy the selected files to the 
local directory (which I believe you can convince LyX to pass as an 
argument to the script). That's complicated enough that you might be 
better off just writing a script that copies the target files to the 
local directory and run it manually after compiling documents.


I haven't followed this thread with any attention so may well have 
missed the point, but I wonder if LyX's copier mechanism is what you 
want? I'm thinking of the script ext_copy.py that comes with LyX (in 
Resources/scripts). For example, to copy the *.aux files back to your 
document directory from the temp directory,  in Tools>Preferences>File 
Handling>File Formats select the format PDF (pdflatex) and in the Copier 
slot put


python -tt $$s/scripts/ext_copy.py -e pdf,aux -d $$i $$o

then click OK. Now when you export to pdf by the pdflatex route, not 
only will you get the pdf in your document directory but also any aux 
files.


If you want to look at the aux files without the burden of compiling to 
pdf, a good trick is to export to Plain text, which is quick even for 
large complex documents, and in the Copier slot under Plain text to enter


python -tt $$s/scripts/ext_copy.py -e aux -d $$i $$o

Notice that only files with the extension aux are to be copied back. 
That means the plain text file resulting from the export, which you are 
unlikely to be interested in, stays in the temp directory and doesn't 
clutter your document directory, but the aux files do get copied back to 
there.


Andrew

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Problems related to custom AMS theorem module

2021-07-23 Thread Paul A. Rubin

On 7/23/21 4:14 PM, Rudi Gaelzer wrote:


Is there a way to instruct Lyx to write certain auxiliary files into 
the local directory, instead of in /tmp/lyx_tmpdirxxx?



Is it LyX or LaTeX (pdflatex?) that writes the auxiliary files? I 
suspect the latter, in which case I'm pretty sure the answer to your 
question is no. You could create a custom export format and tell LyX to 
invoke a shell script (written by you) that would run whatever LaTeX 
commands were needed and then copy the selected files to the local 
directory (which I believe you can convince LyX to pass as an argument 
to the script). That's complicated enough that you might be better off 
just writing a script that copies the target files to the local 
directory and run it manually after compiling documents.
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Problems related to custom AMS theorem module

2021-07-23 Thread Rudi Gaelzer
On sexta-feira, 23 de julho de 2021 14:40:38 -03 Paul A. Rubin wrote:
> I've never used the totcount package, so this may be a bit naive. For the
> first issue, can you set the relevant counters (equation@totc) etc. to zero
> with a \setcounter command in the preamble of the first document and, if
> so, will that zero value get written to the file if no environments of the
> type counted appear in the document? That would (hopefully) give you a
> starting value for the next document.

I thought about doing something similar, but not exactly as you suggested. 
With the totcount package, you register the counters you'll want to keep track 
of with the 
command 
\regtotcounter[auxfile=first.tc]{thm}
It will create the counter thm@totc and set it to zero.  At the end of the run, 
the counter is 
written into first.tc.  I need to inform this file name to the next lecture.
So, inside the InPreamble, I registered all theorem counters.
Two problems resulted:
1. I got a lot of "!Missing number, treated as zero" errors.  
2. If I ignore the errors and finish the processing, the total counters of the 
environs that 
are NOT used in the document are written in first.tc, all set to zero, as 
expected.  
The problem is that the counters that ARE used are again incremented every time 
the file 
is processed until all cross-references are right.
This time, I inserted the \setcounter{defn}{\totvalue{defn}}
command in the *.inc file.

> 
> For the second issue, can you wrap your preamble code in AtBeginDocument{}
> and, if so, does that allow ams-theorem to load first and your code to
> execute correctly?

That seems to work.  Thanks for pointing out the command.
So, I inserted 
\regtotcounter[auxfile=\currfilebase.tc]{thm}, etc
in the  appropriate places in the *.inc file.  The command \currfilebase comes 
from the 
currfile package.  It just contains the base file name, without the extension.
And then, if I know that in the next lecture the Definition and Exercise 
environs are used, 
inserting in the InPreamble

\AtBeginDocument{\setcounter{defn}{\totvalue{defn}} 
\setcounter{xca}{\totvalue{xca}} }

does the trick.  The counters are set after all the rest of the preamble is 
processed.

Thank you.

Incidentally, in order to create locally the *.aux and *.tc files needed for 
cross-referencing, 
I have to first export the document to LaTeX and then manually run 
pdflatex --draftmode 

Is there a way to instruct Lyx to write certain auxiliary files into the local 
directory, instead 
of in /tmp/lyx_tmpdirxxx?
-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Problems related to custom AMS theorem module

2021-07-23 Thread Paul A. Rubin

On 7/23/21 12:14 PM, Rudi Gaelzer wrote:


This question is still related to the recent thread:

https://www.mail-archive.com/lyx-users@lists.lyx.org/msg112228.html 
<https://www.mail-archive.com/lyx-users@lists.lyx.org/msg112228.html>



I thought I got it right, but several unexpected problems came up and 
I'd like to have your opinion.



What I want to do is the following: I'm preparing a series of lectures 
that will employ theorem-like environments.


Several lectures are related to the same subject and so I want the 
enumeration of numbered things (equations, figures, theorems, 
examples, definitions, etc) in subsequent lectures to continue from 
the previous ones.



In order to guarantee the correct sequence, I'm loading in the 
preamble the totcount package.  For each counter employed in a given 
lecture, the totcount package  creates a new counter (equation@totc, 
figure@totc, etc), which contains the last value of the counter.


The values of these counters are then written in a specific file (call 
it previous.tc), which can be read in the subsequent lecture.  
Finally, by using


\setcounter{}{}

I can guarantee the desired continuation of the enumeration of things.


For the native LaTeX counters (equation, figure, etc), I've been 
including all the necessary commands in an ERT with the layout InPreamble.


For the native counters, this works all right because the counters are 
defined with the class and class packages, which are read before 
user-specific definitions incuded with the InPreamble layout.



However, for the theorem-like environments, the implementation is more 
involved.  The problems that are coming up are:



1. Say a given environment like theorem is only introduced from the 
second lecture.  In this case, the file previous.tc will not contain 
the last value of the counter thm@totc, because there was no theorem 
in the first lecture.  Hence, I cannot issue a \setcounter{thm}{value>} because in this case the number of the first theorem gets 
increased for each LyX/LaTeX compilation.


This complicates the implementation of the custom theorem-bytpe module 
I've been tinkering with in my previous thread.  Somehow I need to 
introduce instructions to read the previous.tc file and find out if 
the counter thm was previously employed.  Only if there is a last 
value of thm@totc that I can \setvalue the counter.


I'm not sure what will be the best way to implement this.  Several 
posts I've been browsing through suggest the use of TeX natives like 
\newread, \openin \read, etc, and then use some package (like xstring) 
that identifies specific strings in each line read.  Seems too much 
trouble for me.



2. Then I decided to dumb down my approach.  I will only use \setvalue 
for those counters that I know are employed in the previous lecture, 
as I was doing so far with the native LaTeX counters.


The problem now is that with the layout InPreamble, those instructions 
will be written before the ams-theorem module defines the thm 
counters.  That is going to give errors.


It seems that as of now there is no way to choose the ordering of the 
instructions contained in the layout InPreamble inside the document's 
preamble.  This is discussed in this thread:


https://www.mail-archive.com/lyx-users@lists.lyx.org/msg100172.html 
<https://www.mail-archive.com/lyx-users@lists.lyx.org/msg100172.html>



Therefore, the only solution that I can imagine is to write the 
necessary instructions in the user-defined preamble accessible in


Document Settings -> LaTeX Preamble

This way, I guarantee the correct ordering of the instructions.


Anyway, I just wanted to vent out my frustration that I was not smart 
enough to somehow automatize this process.  This is an admittedly very 
specific problem, and I don't know if you think this can be of 
interest to the larger community.



--

Rudi Gaelzer

Institute of Physics

Federal University of Rio Grande do Sul

BRAZIL

Registered linux user # 153741


I've never used the totcount package, so this may be a bit naive. For 
the first issue, can you set the relevant counters (equation@totc) etc. 
to zero with a \setcounter command in the preamble of the first document 
and, if so, will that zero value get written to the file if no 
environments of the type counted appear in the document? That would 
(hopefully) give you a starting value for the next document.


For the second issue, can you wrap your preamble code in 
AtBeginDocument{} and, if so, does that allow ams-theorem to load first 
and your code to execute correctly?


Paul

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Problems related to custom AMS theorem module

2021-07-23 Thread Rudi Gaelzer
This question is still related to the recent thread:
https://www.mail-archive.com/lyx-users@lists.lyx.org/msg112228.html[1]


I thought I got it right, but several unexpected problems came up and I'd like 
to have your 
opinion.


What I want to do is the following: I'm preparing a series of lectures that 
will employ 
theorem-like environments.
Several lectures are related to the same subject and so I want the enumeration 
of 
numbered things (equations, figures, theorems, examples, definitions, etc) in 
subsequent 
lectures to continue from the previous ones.


In order to guarantee the correct sequence, I'm loading in the preamble the 
totcount 
package.  For each counter employed in a given lecture, the totcount package  
creates a 
new counter (equation@totc, figure@totc, etc), which contains the last value of 
the 
counter.  
The values of these counters are then written in a specific file (call it 
previous.tc), which 
can be read in the subsequent lecture.  Finally, by using 
\setcounter{}{}
I can guarantee the desired continuation of the enumeration of things.


For the native LaTeX counters (equation, figure, etc), I've been including all 
the necessary 
commands in an ERT with the layout InPreamble.
For the native counters, this works all right because the counters are defined 
with the 
class and class packages, which are read before user-specific definitions 
incuded with the 
InPreamble layout.


However, for the theorem-like environments, the implementation is more 
involved.  The 
problems that are coming up are:


1. Say a given environment like theorem is only introduced from the second 
lecture.  In 
this case, the file previous.tc will not contain the last value of the counter 
thm@totc, 
because there was no theorem in the first lecture.  Hence, I cannot issue a 
\setcounter{thm}{} because in this case the number of the first 
theorem gets 
increased for each LyX/LaTeX compilation.
This complicates the implementation of the custom theorem-bytpe module I've 
been 
tinkering with in my previous thread.  Somehow I need to introduce instructions 
to read 
the previous.tc file and find out if the counter thm was previously employed.  
Only if there 
is a last value of thm@totc that I can \setvalue the counter.  
I'm not sure what will be the best way to implement this.  Several posts I've 
been browsing 
through suggest the use of TeX natives like \newread, \openin \read, etc, and 
then use 
some package (like xstring) that identifies specific strings in each line read. 
 Seems too 
much trouble for me.


2. Then I decided to dumb down my approach.  I will only use \setvalue for 
those counters 
that I know are employed in the previous lecture, as I was doing so far with 
the native 
LaTeX counters.
The problem now is that with the layout InPreamble, those instructions will be 
written 
before the ams-theorem module defines the thm counters.  That is going to give 
errors.
It seems that as of now there is no way to choose the ordering of the 
instructions 
contained in the layout InPreamble inside the document's preamble.  This is 
discussed in 
this thread:
https://www.mail-archive.com/lyx-users@lists.lyx.org/msg100172.html[2]


Therefore, the only solution that I can imagine is to write the necessary 
instructions in the 
user-defined preamble accessible in 
Document Settings -> LaTeX Preamble
This way, I guarantee the correct ordering of the instructions.


Anyway, I just wanted to vent out my frustration that I was not smart enough to 
somehow 
automatize this process.  This is an admittedly very specific problem, and I 
don't know if 
you think this can be of interest to the larger community.


-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741


[1] https://www.mail-archive.com/lyx-users@lists.lyx.org/msg112228.html
[2] https://www.mail-archive.com/lyx-users@lists.lyx.org/msg100172.html
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Customizing counters of theorem environments.

2021-07-21 Thread Rudi Gaelzer
(Ditto here)

Thanks for the reply, Paul.

On quarta-feira, 21 de julho de 2021 17:40:48 -03 Paul A. Rubin wrote:
> (Accidentally replied directly rather than to the list. Better late than
> never?)
> 
> I can see no reason to mess with the layout translations file. If your LyX
> user interface uses a language other than English, just give your custom
> theorem environment a layout name in that language. If your new environment
> makes its way into the LyX distribution some day, then it will need
> translations into all supported languages.
> 
> As far as implementing a custom theorem-like environment, you need to (a)
> figure out the LaTeX code to implement it and then (b) create a module file
> (or use your hacked ...-bytype.module file) containing a LyX layout for it
> (which will include the LaTeX code to be inserted into the preamble).
> Mimicking what's already in the bytype module file (or, more precisely, in
> one of the .inc files it uses) should get you there pretty easily.
> 
> Paul

I did just that, thanks.

Since I want something quite specific, I created the new environment with the 
label only in 
Portuguese. 

-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Customizing counters of theorem environments.

2021-07-21 Thread Paul A. Rubin
(Accidentally replied directly rather than to the list. Better late than 
never?)


I can see no reason to mess with the layout translations file. If your 
LyX user interface uses a language other than English, just give your 
custom theorem environment a layout name in that language. If your new 
environment makes its way into the LyX distribution some day, then it 
will need translations into all supported languages.


As far as implementing a custom theorem-like environment, you need to 
(a) figure out the LaTeX code to implement it and then (b) create a 
module file (or use your hacked ...-bytype.module file) containing a LyX 
layout for it (which will include the LaTeX code to be inserted into the 
preamble). Mimicking what's already in the bytype module file (or, more 
precisely, in one of the .inc files it uses) should get you there pretty 
easily.


Paul

On 7/21/21 11:46 AM, Rudi Gaelzer wrote:


I would like to run by you my solution and ask another question.


I copied the files theorems-ams-bytype.module and 
theorems-ams-bytype.inc into my local layouts directory (with new 
names), then edited them accordingly.  For instance, in the .inc file, 
for the Lemma style, inside the Preamble EndPreamble field I included 
the line


  \renewcommand{\thelem}{\thearea-\arabic{lem}}

\thearea being the prefix to the lemma counter.


Did similar things for the other styles, then reconfigured LyX and 
voila! My customized module is accessible (and works as intended).


I just don't know if this solution is sanctioned by you LyX developers...


Now the question I want to ask.

I want to create a new theorem-like environment.  Reading through the 
Customization.lyx manual, I understand that the different translations 
for the names of the environs reside in the layouttranslations file.  
Looking into it, it says that



# This file has been automatically generated by po/lyx_pot.py.

# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to 
regenerate


# this file from the translations, run `make 
../lib/layouttranslations' in po.


# Python polib library is needed for building the output file.


I confess I did not quite grasp the process. Do I have to create a 
local layouttranslations file containing the translations for the new 
environment name?  Is there a more detailed guide for this procedure?



On terça-feira, 20 de julho de 2021 20:20:41 -03 Rudi Gaelzer wrote:

> Well, it seems that the solution is indeed via \renewtheorem. However, I

> had to dig deep into the installation of AMS theorem to find the proper

> names of the counters. So far, I've found \thethm, \thelem, 
\thedefn, etc.


> I did not find a full list of counters, so if someone could point me out

> where I can find such a list, I'd be grateful.

>


--

Rudi Gaelzer

Institute of Physics

Federal University of Rio Grande do Sul

BRAZIL

Registered linux user # 153741




-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Customizing counters of theorem environments.

2021-07-21 Thread Rudi Gaelzer
I would like to run by you my solution and ask another question.

I copied the files theorems-ams-bytype.module and theorems-ams-bytype.inc into 
my 
local layouts directory (with new names), then edited them accordingly.  For 
instance, in 
the .inc file, for the Lemma style, inside the Preamble EndPreamble field I 
included the line 
  \renewcommand{\thelem}{\thearea-\arabic{lem}}
\thearea being the prefix to the lemma counter.

Did similar things for the other styles, then reconfigured LyX and voila! My 
customized 
module is accessible (and works as intended).
I just don't know if this solution is sanctioned by you LyX developers...

Now the question I want to ask.
I want to create a new theorem-like environment.  Reading through the 
Customization.lyx 
manual, I understand that the different translations for the names of the 
environs reside 
in the layouttranslations file.  Looking into it, it says that

# This file has been automatically generated by po/lyx_pot.py.
# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to regenerate
# this file from the translations, run `make ../lib/layouttranslations' in po.
# Python polib library is needed for building the output file.

I confess I did not quite grasp the process. Do I have to create a local 
layouttranslations 
file containing the translations for the new environment name?  Is there a more 
detailed 
guide for this procedure?

On terça-feira, 20 de julho de 2021 20:20:41 -03 Rudi Gaelzer wrote:
> Well, it seems that the solution is indeed via \renewtheorem.  However, I
> had to dig deep into the installation of AMS theorem to find the proper
> names of the counters. So far, I've found \thethm, \thelem, \thedefn, etc.
> I did not find a full list of counters, so if someone could point me out
> where I can find such a list, I'd be grateful.
> 

-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Customizing counters of theorem environments.

2021-07-20 Thread Rudi Gaelzer
Well, it seems that the solution is indeed via \renewtheorem.  However, I had 
to dig deep 
into the installation of AMS theorem to find the proper names of the counters.
So far, I've found \thethm, \thelem, \thedefn, etc.
I did not find a full list of counters, so if someone could point me out where 
I can find such 
a list, I'd be grateful.

On terça-feira, 20 de julho de 2021 19:29:27 -03 Rudi Gaelzer wrote:
> Hi there.
> I'm using the module Theorems (AMS, Numbered by Type).
> I would like to change the counters of theorem-like environs, adding a fixed
> string in front of the number.  Something like
> 
> Theorem TGA-1
> Definition TGA-2
> etc
> 
> Can I do that the usual way that is done for the standard LaTeX counters?
> I mean, in ERT:
> \renewcommand{\theequation}{TGA-\arabic{equation}}
> I that case, I would need to know the names of the counters, but I can't
> find them.
> 
> Or is there another way?
> Thanks.

-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Customizing counters of theorem environments.

2021-07-20 Thread Rudi Gaelzer
Hi there.
I'm using the module Theorems (AMS, Numbered by Type).
I would like to change the counters of theorem-like environs, adding a fixed 
string in front 
of the number.  Something like 

Theorem TGA-1
Definition TGA-2
etc

Can I do that the usual way that is done for the standard LaTeX counters?
I mean, in ERT: 
\renewcommand{\theequation}{TGA-\arabic{equation}} 
I that case, I would need to know the names of the counters, but I can't find 
them.

Or is there another way?
Thanks.
-- 
Rudi Gaelzer
Institute of Physics
Federal University of Rio Grande do Sul
BRAZIL
Registered linux user # 153741
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Axiom missing in theorem packages

2019-07-26 Thread Paul A. Rubin

On 7/26/19 2:22 PM, Marius Shekow wrote:


Hi,

I've noticed that when adding some theorem module (in the document 
settings), there are many new environments available in the layout 
dropdown menu, such as Corollary or Theorem. However, for some reason 
you forgot (?) /axiom/, which is a bit funny, given that it is the 
most basic element there is


Am I missing something? I've been using LyX for years, and time and 
time again after each update I have to fix the .inc and .module files 
myself (which are overwritten by the update), so I figured I'd report 
this oversight.


Best regards!
Marius

If you add the Theorems (AMS) and Theorems (AMS-Extended) modules, you 
will get both Axiom and Axiom*.


Paul



Axiom missing in theorem packages

2019-07-26 Thread Marius Shekow

Hi,

I've noticed that when adding some theorem module (in the document
settings), there are many new environments available in the layout
dropdown menu, such as Corollary or Theorem. However, for some reason
you forgot (?) /axiom/, which is a bit funny, given that it is the most
basic element there is

Am I missing something? I've been using LyX for years, and time and time
again after each update I have to fix the .inc and .module files myself
(which are overwritten by the update), so I figured I'd report this
oversight.

Best regards!
Marius



Re: Garbled Chinese theorem names

2018-09-26 Thread Erik Apostol (Che-hsiu Cheng)
I finally solve this problem by inserting the LaTeX code at the beginning
of the document ( not in the preamble):
\renewcommand{\remarkname}{備註}
\renewcommand{\casename}{案例}
\renewcommand{\theoremname}{定理}

This work around is inspired by this page:
https://tex.stackexchange.com/questions/24878/cjk-package-and-figurename
It says that any cjk character should be put in the cjk environment, but
the cjk environment can be placed only in the body rather than the preamble.

Originally, in the Source Pane, I see the commands in the preamble:
\providecommand{\remarkname}{備註}
\providecommand{\casename}{案例}
\providecommand{\theoremname}{定理}
I guess it's probably why it's not dealt with by the cjk package.

On Sat, Sep 8, 2018, 11:48 Erik Apostol (Che-hsiu Cheng) <
erikapos...@gmail.com> wrote:

> I'm using LyX 2.2.3, and I found that theorem names, such as theorem,
> case, remark, in Chinese are not shown correctly. For example, I have a
> .lyx file with content
>
>> 定理 1. 一二三四五
>> 案例 1. 六七八九十
>>
>>
>> 備註 2. 十一時二十三
>>
> in which 定理 is the Theorem environment, 案例 is the Case environment, and 備註
> is the Remark environment. But after export to pdf (via pdflatex) it's
> shown as
>
>> åőŽçŘĘ 1. 一二三四五
>> æąĹä¿Ń 1. 六七八九十
>> åĆŹèĺż 2. 十一時二十三
>>
> Only theorem names are garbled, but other Chinese words are normal.  In
> Document settings, I've set CJK font to *bsmi*, language to *Chinese
> (traditional)*, and encoding to *Unicode (CJK) (utf8)*. The original LyX
> file is here
> <https://www.dropbox.com/s/ilvjvc6m380i55f/Abnormality%20of%20Chinese.lyx?dl=0>
> .
>
>


Re: Garbled Chinese theorem names

2018-09-10 Thread Wolfgang Engelmann




On 09.09.2018 21:25, Scott Kostyshak wrote:

On Sun, Sep 09, 2018 at 09:46:15AM +0200, Wolfgang Engelmann wrote:


Ah no, I just open the .lyx file and click on the eyes icon. Or
equivalently, I go to File > Export > PDF (pdflatex).

I use a script that installs TeX Live directly (rather than through the
TeX Live repos), which does a little bit of magic/hacking in the
background, and I forget exactly what it does.

Scott, could you kindly supply this script to others (with some how to do)?

Everything is here:

   https://github.com/scottkosty/lyx-tester

I strongly warn you not to run this script on your main system. I
believe I'm the only one that has ever used this script. If you are
curious, I suggest running the script on a fresh installation of Ubuntu
(e.g., in a virtual box).


It sounds very useful. Does it work also for Linux?

It only works on Linux, and unfortunately only on Ubuntu (could probably
be easily adapted to Debian/Mint/etc.).

Note that the goal of the script is to install dependencies needed to
run all of LyX's ctests. Because we have Chinese documents, that's why I
added whatever needed to be done to compile those documents. That was
long ago though, so I'm not sure anymore how it does things. You could
take a look inside to try to find out.

Scott

Thanks, Scott, for these infos. Wolfgang


Re: Garbled Chinese theorem names

2018-09-09 Thread Scott Kostyshak
On Sun, Sep 09, 2018 at 09:46:15AM +0200, Wolfgang Engelmann wrote:

> > Ah no, I just open the .lyx file and click on the eyes icon. Or
> > equivalently, I go to File > Export > PDF (pdflatex).
> > 
> > I use a script that installs TeX Live directly (rather than through the
> > TeX Live repos), which does a little bit of magic/hacking in the
> > background, and I forget exactly what it does.
> Scott, could you kindly supply this script to others (with some how to do)?

Everything is here:

  https://github.com/scottkosty/lyx-tester

I strongly warn you not to run this script on your main system. I
believe I'm the only one that has ever used this script. If you are
curious, I suggest running the script on a fresh installation of Ubuntu
(e.g., in a virtual box).

> It sounds very useful. Does it work also for Linux?

It only works on Linux, and unfortunately only on Ubuntu (could probably
be easily adapted to Debian/Mint/etc.).

Note that the goal of the script is to install dependencies needed to
run all of LyX's ctests. Because we have Chinese documents, that's why I
added whatever needed to be done to compile those documents. That was
long ago though, so I'm not sure anymore how it does things. You could
take a look inside to try to find out.

Scott


signature.asc
Description: PGP signature


Re: Garbled Chinese theorem names

2018-09-09 Thread Wolfgang Engelmann




On 09.09.2018 00:26, Scott Kostyshak wrote:

On Sat, Sep 08, 2018 at 11:55:00PM +0800, Erik Apostol (Che-hsiu Cheng) wrote:

On Sat, Sep 8, 2018 at 12:55 PM Scott Kostyshak  wrote:

Hi Scott.
I'm surprised that words in your pdf file are shown correctly.

OK good to know. We should be able to figure out what the difference
is between our systems.


That's what I get on Ubuntu with TeX Live,
without changing anything in your .lyx file.

Do you mean you exported the .lyx file via the option LaTeX (plain)
and then compiled the resultant .tex file in a terminal? I do so in my
Ubuntu 18.04 but the theorem names are still garbled.

Ah no, I just open the .lyx file and click on the eyes icon. Or
equivalently, I go to File > Export > PDF (pdflatex).

I use a script that installs TeX Live directly (rather than through the
TeX Live repos), which does a little bit of magic/hacking in the
background, and I forget exactly what it does.
Scott, could you kindly supply this script to others (with some how to 
do)? It sounds very useful. Does it work also for Linux?

Wolfgang


Does it help if you install these packages? ttf-wqy-microhei ttf-wqy-zenhei 
xfonts-wqy

Attached is my .log file. If you compare it with yours, perhaps it will
show some helpful clues.

Best,

Scott




Re: Garbled Chinese theorem names

2018-09-08 Thread Erik Apostol (Che-hsiu Cheng)
On Sun, Sep 9, 2018 at 6:26 AM Scott Kostyshak  wrote:
>
> On Sat, Sep 08, 2018 at 11:55:00PM +0800, Erik Apostol (Che-hsiu Cheng) wrote:
> > On Sat, Sep 8, 2018 at 12:55 PM Scott Kostyshak  wrote:
> >
> > Hi Scott.
> > I'm surprised that words in your pdf file are shown correctly.
>
> OK good to know. We should be able to figure out what the difference
> is between our systems.
>
> > > That's what I get on Ubuntu with TeX Live,
> > > without changing anything in your .lyx file.
> >
> > Do you mean you exported the .lyx file via the option LaTeX (plain)
> > and then compiled the resultant .tex file in a terminal? I do so in my
> > Ubuntu 18.04 but the theorem names are still garbled.
>
> Ah no, I just open the .lyx file and click on the eyes icon. Or
> equivalently, I go to File > Export > PDF (pdflatex).
>
> I use a script that installs TeX Live directly (rather than through the
> TeX Live repos), which does a little bit of magic/hacking in the
> background, and I forget exactly what it does.
I'm using the repo provided by Ubuntu.

> Does it help if you install these packages? ttf-wqy-microhei ttf-wqy-zenhei 
> xfonts-wqy
Unfortunately, it doesn't help.

> Attached is my .log file. If you compare it with yours, perhaps it will
> show some helpful clues.
I've compared my log file with yours, and I don't see anything
inspiring. My log file is attached.

> Best,
>
> Scott
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2018.7.11)  9 SEP 2018 11:51
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**Abnormality_of_Chinese.tex
(./Abnormality_of_Chinese.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.

(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
(/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:Redeclaring font encoding T1 on input line 48.
)) (/usr/share/texmf/tex/latex/CJK/CJK.sty
Package: CJK 2015/04/18 4.8.4
(/usr/share/texmf/tex/latex/CJK/mule/MULEenc.sty
Package: MULEenc 2015/04/18 4.8.4
) (/usr/share/texmf/tex/latex/CJK/CJK.enc
File: CJK.enc 2015/04/18 4.8.4
)
LaTeX Info: Redefining \selectfont on input line 755.
\CJK@indent=\box26
) (/usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty
Package: enumitem 2011/09/28 v3.5.2 Customized lists
\enitkv@toks@=\toks14
\labelindent=\skip43
\enit@outerparindent=\dimen103
\enit@toks=\toks15
\enit@inbox=\box27
\enitdp@description=\count87
) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2017/09/02 v2.17a AMS math features
\@mathmargin=\skip44
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks16
\ex@=\dimen104
)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen105
) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2016/03/08 v2.02 operator names
)
\inf@bad=\count88
LaTeX Info: Redefining \frac on input line 213.
\uproot@=\count89
\leftroot@=\count90
LaTeX Info: Redefining \overline on input line 375.
\classnum@=\count91
\DOTSCASE@=\count92
LaTeX Info: Redefining \ldots on input line 472.
LaTeX Info: Redefining \dots on input line 475.
LaTeX Info: Redefining \cdots on input line 596.
\Mathstrutbox@=\box28
\strutbox@=\box29
\big@size=\dimen106
LaTeX Font Info:Redeclaring font encoding OML on input line 712.
LaTeX Font Info:Redeclaring font encoding OMS on input line 713.
\macc@depth=\count93
\c@MaxMatrixCols=\count94
\dotsspace@=\muskip10
\c@parentequation=\count95
\dspbrk@lvl=\count96
\tag@help=\toks17
\row@=\count97
\column@=\count98
\maxfields@=\count99
\andhelp@=\toks18
\eqnshift@=\dimen107
\alignsep@=\dimen108
\tagshift@=\dimen109
\tagwidth@=\dimen110
\totwidth@=\dimen111
\lineht@=\dimen112
\@envbody=\toks19
\multlinegap=\skip45
\multlinetaggap=\skip46
\mathdisplay@stack=\toks20
LaTeX Info: Redefining \[ on input line 2817.
LaTeX Info: Redefining \] on input line 2818.
) (/usr/sh

Re: Garbled Chinese theorem names

2018-09-08 Thread Scott Kostyshak
On Sat, Sep 08, 2018 at 11:55:00PM +0800, Erik Apostol (Che-hsiu Cheng) wrote:
> On Sat, Sep 8, 2018 at 12:55 PM Scott Kostyshak  wrote:
> 
> Hi Scott.
> I'm surprised that words in your pdf file are shown correctly.

OK good to know. We should be able to figure out what the difference
is between our systems.

> > That's what I get on Ubuntu with TeX Live,
> > without changing anything in your .lyx file.
> 
> Do you mean you exported the .lyx file via the option LaTeX (plain)
> and then compiled the resultant .tex file in a terminal? I do so in my
> Ubuntu 18.04 but the theorem names are still garbled.

Ah no, I just open the .lyx file and click on the eyes icon. Or
equivalently, I go to File > Export > PDF (pdflatex).

I use a script that installs TeX Live directly (rather than through the
TeX Live repos), which does a little bit of magic/hacking in the
background, and I forget exactly what it does.

Does it help if you install these packages? ttf-wqy-microhei ttf-wqy-zenhei 
xfonts-wqy

Attached is my .log file. If you compare it with yours, perhaps it will
show some helpful clues.

Best,

Scott
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded 
format=pdflatex 2018.7.30)  8 SEP 2018 18:24
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**Abnormality_of_Chinese.tex
(./Abnormality_of_Chinese.tex
LaTeX2e <2018-04-01> patch level 5

(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/local/texlive/2018/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2017/04/05 v2.0i Standard LaTeX package
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/t1enc.def
File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file
LaTeX Font Info:Redeclaring font encoding T1 on input line 48.
)) (/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJKutf8.sty
Package: CJKutf8 2015/04/18 4.8.4
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
) (/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/04/06 v1.3b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
) (/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJK.sty
Package: CJK 2015/04/18 4.8.4
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/mule/MULEenc.sty
Package: MULEenc 2015/04/18 4.8.4
) (/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJK.enc
File: CJK.enc 2015/04/18 4.8.4
Now handling font encoding C00 ...
... no UTF-8 mapping file for font encoding C00
Now handling font encoding C05 ...
... no UTF-8 mapping file for font encoding C05
Now handling font encoding C09 ...
... no UTF-8 mapping file for font encoding C09
Now handling font encoding C10 ...
... no UTF-8 mapping file for font encoding C10
Now handling font encoding C20 ...
... no UTF-8 mapping file for font encoding C20
Now handling font encoding C19 ...
... no UTF-8 mapping file for font encoding C19
Now handling font encoding C40 ...
... no UTF-8 mapping file for font encoding C40
Now handling font encoding C42 ...
... no UTF-8 mapping file for font encoding C42
Now handling font encoding C43 ...
... no UTF-8 mapping file for font encoding C43
Now handling font encoding C50 ...
... no UTF-8 mapping file for font encoding C50
Now handling font encoding C52 ...
... no UTF-8 mapping file for font encoding C52
Now handling font encoding C49 ...
... no UTF-8 mapping file for font encoding C49
Now handling font encoding C60 ...
... no UTF-8 mapping file for font encoding C60
Now handling font encoding C61 ...
... no UTF-8 mapping file for font encoding C61
Now handling font encoding C63 ...
... no UTF-8 mapping file for font encoding C63
Now handling font encoding C64 ...
... no UTF-8 mapping file for font encoding C64
Now handling font encoding C65 ...
... no UTF-8 mapping file for font encoding C65
Now handling font encoding C70 ...
... no UTF-8 mapping file for font encoding C70
Now handling font encoding C31 ...
... no UTF-8 mapping file for font encoding C31
Now handling font encoding C32 ...
... no UTF-8 mapping file for font encoding C32
Now handling font encoding C33 ...
... no UTF-8 mapping file for font encoding C33
Now handling font encoding C34 ...
... no UTF-8 mapping file for font encoding C34
Now handling font encoding C35 ...
... no UTF-8 mapping file for font encoding C35
Now handling font encoding C36 ...
... no UTF-8 mapping file for font encoding C36
Now handling font

Re: Garbled Chinese theorem names

2018-09-08 Thread Erik Apostol (Che-hsiu Cheng)
On Sat, Sep 8, 2018 at 12:55 PM Scott Kostyshak  wrote:
>
> On Sat, Sep 08, 2018 at 11:48:13AM +0800, Erik Apostol (Che-hsiu Cheng) wrote:
> > I'm using LyX 2.2.3, and I found that theorem names, such as theorem, case,
> > remark, in Chinese are not shown correctly. For example, I have a .lyx file
> > with content
> >
> > > 定理 1. 一二三四五
> > > 案例 1. 六七八九十
> > >
> > >
> > > 備註 2. 十一時二十三
> > >
> > in which 定理 is the Theorem environment, 案例 is the Case environment, and 備註
> > is the Remark environment. But after export to pdf (via pdflatex) it's
> > shown as
> >
> > > åőŽçŘĘ 1. 一二三四五
> > > æąĹä¿Ń 1. 六七八九十
> > > åĆŹèĺż 2. 十一時二十三
> > >
> > Only theorem names are garbled, but other Chinese words are normal.  In
> > Document settings, I've set CJK font to *bsmi*, language to *Chinese
> > (traditional)*, and encoding to *Unicode (CJK) (utf8)*. The original LyX
> > file is here
> > <https://www.dropbox.com/s/ilvjvc6m380i55f/Abnormality%20of%20Chinese.lyx?dl=0>
>
> Hi Erik,
>
> Is the attached PDF correct?

Hi Scott.
I'm surprised that words in your pdf file are shown correctly.

>
> That's what I get on Ubuntu with TeX Live,
> without changing anything in your .lyx file.

Do you mean you exported the .lyx file via the option LaTeX (plain)
and then compiled the resultant .tex file in a terminal? I do so in my
Ubuntu 18.04 but the theorem names are still garbled.

I've checked the texlive-related packaged I installed, and I wonder if
there's lack of some crucial packages:
texlive-base/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-bibtex-extra/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-binaries/bionic,now 2017.20170613.44572-8build1 amd64 [installed]
texlive-extra-utils/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-font-utils/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-fonts-extra/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-fonts-extra-doc/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-fonts-extra-links/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-fonts-recommended/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-fonts-recommended-doc/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-formats-extra/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-full/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-games/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-generic-extra/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-generic-recommended/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-htmlxml/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-humanities/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-humanities-doc/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-lang-african/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-all/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-arabic/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-chinese/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-cjk/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-cyrillic/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-czechslovak/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-english/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-european/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-french/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-german/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-greek/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-indic/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-italian/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-japanese/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-korean/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-other/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-polish/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-portuguese/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-lang-spanish/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-latex-base/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-latex-base-doc/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-latex-extra/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-latex-extra-doc/bionic,bionic,now 2017.20180305-2 all [installed]
texlive-latex-recommended/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-latex-recommended-doc/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-luatex/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-metapost/bionic,bionic,now 2017.20180305-1 all [installed]
texlive-metapost-doc/bionic,bionic,now 2017.2018

Re: Garbled Chinese theorem names

2018-09-07 Thread Scott Kostyshak
On Sat, Sep 08, 2018 at 11:48:13AM +0800, Erik Apostol (Che-hsiu Cheng) wrote:
> I'm using LyX 2.2.3, and I found that theorem names, such as theorem, case,
> remark, in Chinese are not shown correctly. For example, I have a .lyx file
> with content
> 
> > 定理 1. 一二三四五
> > 案例 1. 六七八九十
> >
> >
> > 備註 2. 十一時二十三
> >
> in which 定理 is the Theorem environment, 案例 is the Case environment, and 備註
> is the Remark environment. But after export to pdf (via pdflatex) it's
> shown as
> 
> > åőŽçŘĘ 1. 一二三四五
> > æąĹä¿Ń 1. 六七八九十
> > åĆŹèĺż 2. 十一時二十三
> >
> Only theorem names are garbled, but other Chinese words are normal.  In
> Document settings, I've set CJK font to *bsmi*, language to *Chinese
> (traditional)*, and encoding to *Unicode (CJK) (utf8)*. The original LyX
> file is here
> <https://www.dropbox.com/s/ilvjvc6m380i55f/Abnormality%20of%20Chinese.lyx?dl=0>

Hi Erik,

Is the attached PDF correct? That's what I get on Ubuntu with TeX Live,
without changing anything in your .lyx file.

Scott


Abnormality_of_Chinese.pdf
Description: Adobe PDF document


signature.asc
Description: PGP signature


Garbled Chinese theorem names

2018-09-07 Thread Erik Apostol (Che-hsiu Cheng)
I'm using LyX 2.2.3, and I found that theorem names, such as theorem, case,
remark, in Chinese are not shown correctly. For example, I have a .lyx file
with content

> 定理 1. 一二三四五
> 案例 1. 六七八九十
>
>
> 備註 2. 十一時二十三
>
in which 定理 is the Theorem environment, 案例 is the Case environment, and 備註
is the Remark environment. But after export to pdf (via pdflatex) it's
shown as

> åőŽçŘĘ 1. 一二三四五
> æąĹä¿Ń 1. 六七八九十
> åĆŹèĺż 2. 十一時二十三
>
Only theorem names are garbled, but other Chinese words are normal.  In
Document settings, I've set CJK font to *bsmi*, language to *Chinese
(traditional)*, and encoding to *Unicode (CJK) (utf8)*. The original LyX
file is here
<https://www.dropbox.com/s/ilvjvc6m380i55f/Abnormality%20of%20Chinese.lyx?dl=0>
.


Re: How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Richard Heck
On 07/23/2016 01:37 PM, Hal Kierstead wrote:
> Thanks, this worked. Should I have been able to figure this out on my own?  I 
> did try using the manuals.

The shortcut is shown on the menu here.

Richard


> Hal
>
>> On Jul 23, 2016, at 9:51 AM, Richard Heck <rgh...@lyx.org> wrote:
>>
>> On 07/23/2016 12:06 PM, Hal Kierstead wrote:
>>> How do I bind a key combination to insert additional theorem text? I am 
>>> using 2.2.0.
>> Does "Alt-A 1" work? This is the default here. Look under
>> "argument-insert" for the bindings.
>>
>> Richard
>>



Re: How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Hal Kierstead
Thanks, I got it.  This should be very useful in the future.
Hal

> On Jul 23, 2016, at 9:56 AM, Scott Kostyshak <skost...@lyx.org> wrote:
> 
> On Sat, Jul 23, 2016 at 09:06:51AM -0700, Hal Kierstead wrote:
>> How do I bind a key combination to insert additional theorem text? I am 
>> using 2.2.0.
> 
> The following SE answer explains how to add a shortcut that corresponds
> to something you know how to do manually:
> 
> http://tex.stackexchange.com/questions/208510/lyx-commands-to-insert-wysiwyg-horizontal-line-for-keyboard-shortcut/208531#208531
> 
> Scott



Re: How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Hal Kierstead
Thanks, this worked. Should I have been able to figure this out on my own?  I 
did try using the manuals.

Hal

> On Jul 23, 2016, at 9:51 AM, Richard Heck <rgh...@lyx.org> wrote:
> 
> On 07/23/2016 12:06 PM, Hal Kierstead wrote:
>> How do I bind a key combination to insert additional theorem text? I am 
>> using 2.2.0.
> 
> Does "Alt-A 1" work? This is the default here. Look under
> "argument-insert" for the bindings.
> 
> Richard
> 



Re: How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Richard Heck
On 07/23/2016 12:06 PM, Hal Kierstead wrote:
> How do I bind a key combination to insert additional theorem text? I am using 
> 2.2.0.

Does "Alt-A 1" work? This is the default here. Look under
"argument-insert" for the bindings.

Richard



Re: How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Scott Kostyshak
On Sat, Jul 23, 2016 at 09:06:51AM -0700, Hal Kierstead wrote:
> How do I bind a key combination to insert additional theorem text? I am using 
> 2.2.0.

The following SE answer explains how to add a shortcut that corresponds
to something you know how to do manually:

http://tex.stackexchange.com/questions/208510/lyx-commands-to-insert-wysiwyg-horizontal-line-for-keyboard-shortcut/208531#208531

Scott


signature.asc
Description: PGP signature


How do I bind a key combination to insert additional theorem text?

2016-07-23 Thread Hal Kierstead
How do I bind a key combination to insert additional theorem text? I am using 
2.2.0.

Thanks,

Hal

Re: Put Theorem Numbers in Boxes

2015-03-21 Thread Richard Heck

On 03/20/2015 02:16 PM, Jacob Shapiro wrote:

Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own module but I have no idea
how to do so and I was wondering if somebody had some experience with that and 
could help me implement the answer in LyX.


Have a look at Chapter 5 of the Customization module. Also have a look 
at the theorems-ams.inc file, which includes the standard AMS theorem 
definitions. Basically, you want to do something very much like what's 
in the file for the Theorem definition, except you'll defined 
BoxedTheorem and add the preamble code to the Preamble section.


Richard



Re: Put Theorem Numbers in Boxes

2015-03-21 Thread Richard Heck

On 03/20/2015 02:16 PM, Jacob Shapiro wrote:

Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own module but I have no idea
how to do so and I was wondering if somebody had some experience with that and 
could help me implement the answer in LyX.


Have a look at Chapter 5 of the Customization module. Also have a look 
at the theorems-ams.inc file, which includes the standard AMS theorem 
definitions. Basically, you want to do something very much like what's 
in the file for the Theorem definition, except you'll defined 
BoxedTheorem and add the preamble code to the Preamble section.


Richard



Re: Put Theorem Numbers in Boxes

2015-03-21 Thread Richard Heck

On 03/20/2015 02:16 PM, Jacob Shapiro wrote:

Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own "module" but I have no idea
how to do so and I was wondering if somebody had some experience with that and 
could help me implement the answer in LyX.


Have a look at Chapter 5 of the Customization module. Also have a look 
at the theorems-ams.inc file, which includes the standard AMS theorem 
definitions. Basically, you want to do something very much like what's 
in the file for the Theorem definition, except you'll defined 
BoxedTheorem and add the preamble code to the Preamble section.


Richard



Put Theorem Numbers in Boxes

2015-03-20 Thread Jacob Shapiro
Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own module but I have no idea 
how to do so and I was 
wondering if somebody had some experience with that and 
could help me implement the answer 
in LyX.

Thank you very much in advance!



Put Theorem Numbers in Boxes

2015-03-20 Thread Jacob Shapiro
Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own module but I have no idea 
how to do so and I was 
wondering if somebody had some experience with that and 
could help me implement the answer 
in LyX.

Thank you very much in advance!



Put Theorem Numbers in Boxes

2015-03-20 Thread Jacob Shapiro
Hello everyone.

I recently asked a question on stack exchange:
http://tex.stackexchange.com/questions/230344/how-to-put-theorem-numbers-in-boxes

and I was wondering how to implement the answer in LyX?

I realize I might need to write my own "module" but I have no idea 
how to do so and I was 
wondering if somebody had some experience with that and 
could help me implement the answer 
in LyX.

Thank you very much in advance!



IEEEtran and Theorem Numbering by Type

2012-07-19 Thread Virgil
Hi, everyone!
The IEEETran class has a corresponding LyX layout which seems to work well. 
This 
includes handling theorems.

However, it appears that after a recent LyX update, none of the modules for 
numbering theorems by type (e.g., theorem 1, theorem 2, lemma 1, proposition 1, 
theorem 3, lemma 2, ..., as opposed to theorem 1, theorem 2, lemma 3, 
proposition 4, ...). can be chosen if the IEEEtran document class has been 
selected.

It seems that this restriction is hard-coded and cannot be changed from within 
LyX (one can obviously export to LaTeX, and manually change certain lines, and 
compile from LaTeX).

Is this a bug or a feature?

Is there a work-around other than the LaTeX export route?

If this is intentional, it would be nice if the user was allowed to overrule 
it, 
and add some of the Theorem by Type modules. Perhaps a maintainer has assumed 
that each and every IEEE publication today forbids Theorem by Type numbering. 
However, such prohibition does not appear to exist. For example, the IEEEtran 
manual says is:
Sometimes it is desirable that a structure share its counter with another 
structure. This can be accomplished by using the alternate form of \newtheorem
\newtheorem{struct_type}[num_like]{struct_title}
where num_like is the name of an existing structure.
(see pag 14 of the IEEEtran_HOWTO.pdf ). 

That paragraph suggests clearly that a theorem common counter is by no means 
mandatory...

...and even if  all IEEE publications in existence today made the common 
counter 
mandatory (which does not seem to be the case), the policy could be changed in 
the future, or new IEEE publications could deviate from it.

Please, remove that restriction, whether intentional or not (perhaps LyX could 
simply generate some sort of warning when a user chooses numbered by type 
and IEEEtran together).

Many thanks.

Virgil



IEEEtran and Theorem Numbering by Type

2012-07-19 Thread Virgil
Hi, everyone!
The IEEETran class has a corresponding LyX layout which seems to work well. 
This 
includes handling theorems.

However, it appears that after a recent LyX update, none of the modules for 
numbering theorems by type (e.g., theorem 1, theorem 2, lemma 1, proposition 1, 
theorem 3, lemma 2, ..., as opposed to theorem 1, theorem 2, lemma 3, 
proposition 4, ...). can be chosen if the IEEEtran document class has been 
selected.

It seems that this restriction is hard-coded and cannot be changed from within 
LyX (one can obviously export to LaTeX, and manually change certain lines, and 
compile from LaTeX).

Is this a bug or a feature?

Is there a work-around other than the LaTeX export route?

If this is intentional, it would be nice if the user was allowed to overrule 
it, 
and add some of the Theorem by Type modules. Perhaps a maintainer has assumed 
that each and every IEEE publication today forbids Theorem by Type numbering. 
However, such prohibition does not appear to exist. For example, the IEEEtran 
manual says is:
Sometimes it is desirable that a structure share its counter with another 
structure. This can be accomplished by using the alternate form of \newtheorem
\newtheorem{struct_type}[num_like]{struct_title}
where num_like is the name of an existing structure.
(see pag 14 of the IEEEtran_HOWTO.pdf ). 

That paragraph suggests clearly that a theorem common counter is by no means 
mandatory...

...and even if  all IEEE publications in existence today made the common 
counter 
mandatory (which does not seem to be the case), the policy could be changed in 
the future, or new IEEE publications could deviate from it.

Please, remove that restriction, whether intentional or not (perhaps LyX could 
simply generate some sort of warning when a user chooses numbered by type 
and IEEEtran together).

Many thanks.

Virgil



IEEEtran and Theorem Numbering by Type

2012-07-19 Thread Virgil
Hi, everyone!
The IEEETran class has a corresponding LyX layout which seems to work well. 
This 
includes handling theorems.

However, it appears that after a recent LyX update, none of the modules for 
numbering theorems by type (e.g., theorem 1, theorem 2, lemma 1, proposition 1, 
theorem 3, lemma 2, ..., as opposed to theorem 1, theorem 2, lemma 3, 
proposition 4, ...). can be chosen if the IEEEtran document class has been 
selected.

It seems that this restriction is hard-coded and cannot be changed from within 
LyX (one can obviously export to LaTeX, and manually change certain lines, and 
compile from LaTeX).

Is this a "bug" or a "feature"?

Is there a work-around other than the LaTeX export route?

If this is intentional, it would be nice if the user was allowed to overrule 
it, 
and add some of the Theorem by Type modules. Perhaps a maintainer has assumed 
that each and every IEEE publication today forbids "Theorem by Type" numbering. 
However, such prohibition does not appear to exist. For example, the IEEEtran 
manual says is:
"Sometimes it is desirable that a structure share its counter with another 
structure. This can be accomplished by using the alternate form of \newtheorem
\newtheorem{struct_type}[num_like]{struct_title}
where num_like is the name of an existing structure."
(see pag 14 of the IEEEtran_HOWTO.pdf ). 

That paragraph suggests clearly that a theorem "common counter" is by no means 
mandatory...

...and even if  all IEEE publications in existence today made the common 
counter 
mandatory (which does not seem to be the case), the policy could be changed in 
the future, or new IEEE publications could deviate from it.

Please, remove that restriction, whether intentional or not (perhaps LyX could 
simply generate some sort of "warning" when a user chooses "numbered by type" 
and IEEEtran together).

Many thanks.

Virgil



Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
document with SIAM document class, every time I want to start a new paragraph
with [ENTER] a new theorem environment is created instead of Standard. I guess
this has something to do with the environment order as appears in the 
environment
dropdown (i.e. Theorem is first).

Is there any way to fix this?

Thanks,
Dima Batenkov




Re: Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
Dima dima.batenkov at gmail.com writes:

 
 After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
 document with SIAM document class, every time I want to start a new paragraph
 with [ENTER] a new theorem environment is created instead of Standard. I 
guess
 this has something to do with the environment order as appears in the 
environment
 dropdown (i.e. Theorem is first).
 
 Is there any way to fix this?
 
 Thanks,
 Dima Batenkov
 
 

Answering my own question, the importing of the theorems module should be done 
after the declaration of the Standard environment in siamltex.layout.

See http://www.lyx.org/trac/ticket/8194





Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
document with SIAM document class, every time I want to start a new paragraph
with [ENTER] a new theorem environment is created instead of Standard. I guess
this has something to do with the environment order as appears in the 
environment
dropdown (i.e. Theorem is first).

Is there any way to fix this?

Thanks,
Dima Batenkov




Re: Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
Dima dima.batenkov at gmail.com writes:

 
 After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
 document with SIAM document class, every time I want to start a new paragraph
 with [ENTER] a new theorem environment is created instead of Standard. I 
guess
 this has something to do with the environment order as appears in the 
environment
 dropdown (i.e. Theorem is first).
 
 Is there any way to fix this?
 
 Thanks,
 Dima Batenkov
 
 

Answering my own question, the importing of the theorems module should be done 
after the declaration of the Standard environment in siamltex.layout.

See http://www.lyx.org/trac/ticket/8194





Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
document with SIAM document class, every time I want to start a new paragraph
with [ENTER] a new theorem environment is created instead of "Standard". I guess
this has something to do with the environment order as appears in the 
environment
dropdown (i.e. "Theorem" is first).

Is there any way to fix this?

Thanks,
Dima Batenkov




Re: Lyx 2.0.3 - SIAM document class problem - theorem is the default environment

2012-06-09 Thread Dima
Dima  gmail.com> writes:

> 
> After upgrade to Lyx 2.0.3 the following problem surfaced: if I am editing a
> document with SIAM document class, every time I want to start a new paragraph
> with [ENTER] a new theorem environment is created instead of "Standard". I 
guess
> this has something to do with the environment order as appears in the 
environment
> dropdown (i.e. "Theorem" is first).
> 
> Is there any way to fix this?
> 
> Thanks,
> Dima Batenkov
> 
> 

Answering my own question, the importing of the theorems module should be done 
after the declaration of the Standard environment in siamltex.layout.

See http://www.lyx.org/trac/ticket/8194





macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Hi all,

So I have a (complicated) theorem statement in the main text of a paper, 
which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? (\newcommand 
is probably not good as the theorem is complicated to write in latex)



Thanks a lot!

-Qiqi


Re: macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Cool! Thanks! -Qiqi
On 04/28/2012 02:46 PM, Richard Heck wrote:

On 04/28/2012 05:34 PM, Qiqi Yan wrote:

Hi all,

So I have a (complicated) theorem statement in the main text of a 
paper, which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? 
(\newcommand is probably not good as the theorem is complicated to 
write in latex)


Thanks a lot!


You know, you can do things like this:

[ERT]\newcommand\mytheorem{[/ERT]This is the statement of a very 
complicated theorem, using lots and lots of LaTeX, and maybe even some 
other stuff like tikz.[ERT]}[\ERT]


On export, this will define \mytheorem just as you want it. Now you 
can use it in ERT twice: Once in the statement of the main theorem, 
and again in the appendix.


Richard





macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Hi all,

So I have a (complicated) theorem statement in the main text of a paper, 
which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? (\newcommand 
is probably not good as the theorem is complicated to write in latex)



Thanks a lot!

-Qiqi


Re: macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Cool! Thanks! -Qiqi
On 04/28/2012 02:46 PM, Richard Heck wrote:

On 04/28/2012 05:34 PM, Qiqi Yan wrote:

Hi all,

So I have a (complicated) theorem statement in the main text of a 
paper, which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? 
(\newcommand is probably not good as the theorem is complicated to 
write in latex)


Thanks a lot!


You know, you can do things like this:

[ERT]\newcommand\mytheorem{[/ERT]This is the statement of a very 
complicated theorem, using lots and lots of LaTeX, and maybe even some 
other stuff like tikz.[ERT]}[\ERT]


On export, this will define \mytheorem just as you want it. Now you 
can use it in ERT twice: Once in the statement of the main theorem, 
and again in the appendix.


Richard





macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Hi all,

So I have a (complicated) theorem statement in the main text of a paper, 
which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? (\newcommand 
is probably not good as the theorem is complicated to write in latex)



Thanks a lot!

-Qiqi


Re: macro for repeating a theorem statement in appendix

2012-04-28 Thread Qiqi Yan

Cool! Thanks! -Qiqi
On 04/28/2012 02:46 PM, Richard Heck wrote:

On 04/28/2012 05:34 PM, Qiqi Yan wrote:

Hi all,

So I have a (complicated) theorem statement in the main text of a 
paper, which I want to repeat in the appendix right before the proof.


Is there a macro-way of doing this instead of copy-pasting? 
(\newcommand is probably not good as the theorem is complicated to 
write in latex)


Thanks a lot!


You know, you can do things like this:

[ERT]\newcommand\mytheorem{[/ERT]This is the statement of a very 
complicated theorem, using lots and lots of LaTeX, and maybe even some 
other stuff like tikz.[ERT]}[\ERT]


On export, this will define \mytheorem just as you want it. Now you 
can use it in ERT twice: Once in the statement of the main theorem, 
and again in the appendix.


Richard





Re: xetex and theorem

2012-02-27 Thread d c
Torquil Macdonald Sørensen torquil at gmail.com writes:
 
 On 11/01/12 15:41, Jürgen Spitzmüller wrote:

  A crude workaround is to put
  \providecommand\inputencoding[1]{}
  in your preamble.
 
 Thank you very much!
 

I second that! I was ready to lose my mind! Phew



Re: xetex and theorem

2012-02-27 Thread d c
Torquil Macdonald Sørensen torquil at gmail.com writes:
 
 On 11/01/12 15:41, Jürgen Spitzmüller wrote:

  A crude workaround is to put
  \providecommand\inputencoding[1]{}
  in your preamble.
 
 Thank you very much!
 

I second that! I was ready to lose my mind! Phew



Re: xetex and theorem

2012-02-27 Thread d c
Torquil Macdonald Sørensen  gmail.com> writes:
> 
> On 11/01/12 15:41, Jürgen Spitzmüller wrote:

> > A crude workaround is to put
> > \providecommand\inputencoding[1]{}
> > in your preamble.
> 
> Thank you very much!
> 

I second that! I was ready to lose my mind! Phew



Re: mathspec and new theorem disable instant preview

2012-02-25 Thread d c

d c gmane.99.kyoto at spamgourmet.com writes:

 
 I ahve just discovered, arduously, that using mathspec prevents preview from 
 working. Is this a bug, feature, or other?
 
 


sorry I realized I was being perhaps cryptic.

specifically:
\usepackage[no-math]{mathspec} 
in my preamble seems to make instant preview stop functioning. 
I am using xetex, and I have tried many combinations of settings, but it all 
seems to boil down to this line.
I want to be able to set the font for math. 
Perhaps another package for this exists?

In a possible related vein, I also noticed that 
adding the following to my preamble also is breaking instant preview:

\newtheoremstyle{mytheorem} %hnamei
{\topsep}%  Space above
{\topsep}%  Space below
{\ttfamily} % hBody fonti
{} % hIndent amounti1
{\ttfamily} % hTheorem head fonti
{:} % hPunctuation after theorem headi
{.5em} % hSpace after theorem headi2
{} % hTheorem head spec (can be left empty, meaning ‘normal’)i
\theoremstyle{mytheorem} % this should set the current theorem style to 
mytheorem?
\newtheorem{mytheorem}{My Theorems} %this loads the new theorem style and uses 
My Theorems as its heading 
%\newtheorem{thm}{Theorem}
--

These may or may not be related. They work (that is to say act to break) 
independently of each other.




Re: mathspec and new theorem disable instant preview

2012-02-25 Thread d c

d c gmane.99.kyoto at spamgourmet.com writes:

 
 I ahve just discovered, arduously, that using mathspec prevents preview from 
 working. Is this a bug, feature, or other?
 
 


sorry I realized I was being perhaps cryptic.

specifically:
\usepackage[no-math]{mathspec} 
in my preamble seems to make instant preview stop functioning. 
I am using xetex, and I have tried many combinations of settings, but it all 
seems to boil down to this line.
I want to be able to set the font for math. 
Perhaps another package for this exists?

In a possible related vein, I also noticed that 
adding the following to my preamble also is breaking instant preview:

\newtheoremstyle{mytheorem} %hnamei
{\topsep}%  Space above
{\topsep}%  Space below
{\ttfamily} % hBody fonti
{} % hIndent amounti1
{\ttfamily} % hTheorem head fonti
{:} % hPunctuation after theorem headi
{.5em} % hSpace after theorem headi2
{} % hTheorem head spec (can be left empty, meaning ‘normal’)i
\theoremstyle{mytheorem} % this should set the current theorem style to 
mytheorem?
\newtheorem{mytheorem}{My Theorems} %this loads the new theorem style and uses 
My Theorems as its heading 
%\newtheorem{thm}{Theorem}
--

These may or may not be related. They work (that is to say act to break) 
independently of each other.




Re: mathspec and new theorem disable instant preview

2012-02-25 Thread d c

d c  spamgourmet.com> writes:

> 
> I ahve just discovered, arduously, that using mathspec prevents preview from 
> working. Is this a bug, feature, or other?
> 
> 


sorry I realized I was being perhaps cryptic.

specifically:
\usepackage[no-math]{mathspec} 
in my preamble seems to make instant preview stop functioning. 
I am using xetex, and I have tried many combinations of settings, but it all 
seems to boil down to this line.
I want to be able to set the font for math. 
Perhaps another package for this exists?

In a possible related vein, I also noticed that 
adding the following to my preamble also is breaking instant preview:

\newtheoremstyle{mytheorem} %hnamei
{\topsep}%  Space above
{\topsep}%  Space below
{\ttfamily} % hBody fonti
{} % hIndent amounti1
{\ttfamily} % hTheorem head fonti
{:} % hPunctuation after theorem headi
{.5em} % hSpace after theorem headi2
{} % hTheorem head spec (can be left empty, meaning ‘normal’)i
\theoremstyle{mytheorem} % this should set the current theorem style to 
mytheorem?
\newtheorem{mytheorem}{My Theorems} %this loads the new theorem style and uses 
"My Theorems" as its heading 
%\newtheorem{thm}{Theorem}
--

These may or may not be related. They work (that is to say act to break) 
independently of each other.




Theorem proof results in error

2012-01-14 Thread Jeroen van Zundert
Hi all,

In LyX 2.0.2 (on Win7) I am using the module  Theorems (Numbered by Type)
for lemmas, propositions, etc. However, the proof functionality results in
an error when compiling the document into a pdf file. It seems, from the
log file, that there is an error, as in the source there is the following
piece: \ifx\proof\undefined\, note the backslash at the end. I've already
found that there has been a bug fix 6 months ago, see
http://www.lyx.org/trac/changeset/39217. The change in that file (removing
the backslash) also exists in the file on my pc
(..\Resources\layouts\theorems-proof-std.inc), so it seems to me that the
fix is applied in version 2.0.2. The problem is that in the LaTeX source
created by LyX the error still exists. Do I have to activate this fix in
some way, or can I manually patch this error in some other file?

Jeroen


Re: Theorem proof results in error

2012-01-14 Thread Paul A . Rubin
Jeroen van Zundert zundertj at gmail.com writes:

 
 The change in that file (removing the backslash) also exists in the file on my
pc (..\Resources\layouts\theorems-proof-std.inc)

You might check the ...\layouts folder under your home directory (on Win 7
that's usually something like C:\Users\you\AppData\Roaming\LyX2.0) and make
sure you don't have an old customized version that contains the errant 
backslash.

Paul





Theorem proof results in error

2012-01-14 Thread Jeroen van Zundert
Hi all,

In LyX 2.0.2 (on Win7) I am using the module  Theorems (Numbered by Type)
for lemmas, propositions, etc. However, the proof functionality results in
an error when compiling the document into a pdf file. It seems, from the
log file, that there is an error, as in the source there is the following
piece: \ifx\proof\undefined\, note the backslash at the end. I've already
found that there has been a bug fix 6 months ago, see
http://www.lyx.org/trac/changeset/39217. The change in that file (removing
the backslash) also exists in the file on my pc
(..\Resources\layouts\theorems-proof-std.inc), so it seems to me that the
fix is applied in version 2.0.2. The problem is that in the LaTeX source
created by LyX the error still exists. Do I have to activate this fix in
some way, or can I manually patch this error in some other file?

Jeroen


Re: Theorem proof results in error

2012-01-14 Thread Paul A . Rubin
Jeroen van Zundert zundertj at gmail.com writes:

 
 The change in that file (removing the backslash) also exists in the file on my
pc (..\Resources\layouts\theorems-proof-std.inc)

You might check the ...\layouts folder under your home directory (on Win 7
that's usually something like C:\Users\you\AppData\Roaming\LyX2.0) and make
sure you don't have an old customized version that contains the errant 
backslash.

Paul





Theorem proof results in error

2012-01-14 Thread Jeroen van Zundert
Hi all,

In LyX 2.0.2 (on Win7) I am using the module  "Theorems (Numbered by Type)"
for lemmas, propositions, etc. However, the proof functionality results in
an error when compiling the document into a pdf file. It seems, from the
log file, that there is an error, as in the source there is the following
piece: "\ifx\proof\undefined\", note the backslash at the end. I've already
found that there has been a bug fix 6 months ago, see
http://www.lyx.org/trac/changeset/39217. The change in that file (removing
the backslash) also exists in the file on my pc
("..\Resources\layouts\theorems-proof-std.inc"), so it seems to me that the
fix is applied in version 2.0.2. The problem is that in the LaTeX source
created by LyX the error still exists. Do I have to activate this fix in
some way, or can I manually patch this error in some other file?

Jeroen


Re: Theorem proof results in error

2012-01-14 Thread Paul A . Rubin
Jeroen van Zundert  gmail.com> writes:

> 
> The change in that file (removing the backslash) also exists in the file on my
pc ("..\Resources\layouts\theorems-proof-std.inc")

You might check the ...\layouts folder under your home directory (on Win 7
that's usually something like C:\Users\\AppData\Roaming\LyX2.0) and make
sure you don't have an old customized version that contains the errant 
backslash.

Paul





xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

Hi!

I cannot get PDF (xetex) output from the attached document which uses the 
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It works 
fine when not using Theorems.


The error I get is:

! Undefined control sequence.
\definitionname -\inputencoding
 {latin9}Definition
l.43 T
  his is a definition.\end{defn}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


Sorry about the briefness, I'm just starting to type using a Dvorak keyboard, so 
I'm extremely slow at the moment...


Best regards and thanks,
Torquil Sørensen


example.lyx
Description: application/lyx


Re: xetex and theorem

2012-01-11 Thread Jürgen Spitzmüller
Torquil Macdonald Sørensen wrote:
 I cannot get PDF (xetex) output from the attached document which uses the 
 Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
 works fine when not using Theorems.
 
 The error I get is:
 
 ! Undefined control sequence.
 \definitionname -\inputencoding
   {latin9}Definition

Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.

HTH
Jürgen


Re: xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

On 11/01/12 15:41, Jürgen Spitzmüller wrote:

Torquil Macdonald Sørensen wrote:

I cannot get PDF (xetex) output from the attached document which uses the
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
works fine when not using Theorems.

The error I get is:

! Undefined control sequence.
\definitionname -\inputencoding
   {latin9}Definition


Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.


Thank you very much!

Torquil


xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

Hi!

I cannot get PDF (xetex) output from the attached document which uses the 
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It works 
fine when not using Theorems.


The error I get is:

! Undefined control sequence.
\definitionname -\inputencoding
 {latin9}Definition
l.43 T
  his is a definition.\end{defn}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


Sorry about the briefness, I'm just starting to type using a Dvorak keyboard, so 
I'm extremely slow at the moment...


Best regards and thanks,
Torquil Sørensen


example.lyx
Description: application/lyx


Re: xetex and theorem

2012-01-11 Thread Jürgen Spitzmüller
Torquil Macdonald Sørensen wrote:
 I cannot get PDF (xetex) output from the attached document which uses the 
 Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
 works fine when not using Theorems.
 
 The error I get is:
 
 ! Undefined control sequence.
 \definitionname -\inputencoding
   {latin9}Definition

Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.

HTH
Jürgen


Re: xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

On 11/01/12 15:41, Jürgen Spitzmüller wrote:

Torquil Macdonald Sørensen wrote:

I cannot get PDF (xetex) output from the attached document which uses the
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
works fine when not using Theorems.

The error I get is:

! Undefined control sequence.
\definitionname -\inputencoding
   {latin9}Definition


Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.


Thank you very much!

Torquil


xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

Hi!

I cannot get "PDF (xetex)" output from the attached document which uses the 
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It works 
fine when not using Theorems.


The error I get is:

"! Undefined control sequence.
\definitionname ->\inputencoding
 {latin9}Definition
l.43 T
  his is a definition.\end{defn}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined."


Sorry about the briefness, I'm just starting to type using a Dvorak keyboard, so 
I'm extremely slow at the moment...


Best regards and thanks,
Torquil Sørensen


example.lyx
Description: application/lyx


Re: xetex and theorem

2012-01-11 Thread Jürgen Spitzmüller
Torquil Macdonald Sørensen wrote:
> I cannot get "PDF (xetex)" output from the attached document which uses the 
> Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
> works fine when not using Theorems.
> 
> The error I get is:
> 
> "! Undefined control sequence.
> \definitionname ->\inputencoding
>   {latin9}Definition

Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.

HTH
Jürgen


Re: xetex and theorem

2012-01-11 Thread Torquil Macdonald Sørensen

On 11/01/12 15:41, Jürgen Spitzmüller wrote:

Torquil Macdonald Sørensen wrote:

I cannot get "PDF (xetex)" output from the attached document which uses the
Theorems module. I'm using LyX 2.0.2 and Debian Sid with texlive-xetex. It
works fine when not using Theorems.

The error I get is:

"! Undefined control sequence.
\definitionname ->\inputencoding
   {latin9}Definition


Yes, that's a known bug:
http://www.lyx.org/trac/ticket/7800

A crude workaround is to put
\providecommand\inputencoding[1]{}
in your preamble.


Thank you very much!

Torquil


Re: Error reading theorem modules. [SOLVED]

2011-08-10 Thread Rudi Gaelzer
Of course that's the problem!  How silly of me.

I changed those modules back in the days when the internationalization was not 
complete 
and then simply forgot about them...

Sorry for the newbie question...

On Monday 08 August 2011 18:59:55 Paul Rubin wrote:
 Rudi Gaelzer rgaelzer at gmail.com writes:
  Is it possible that the texlive 2010 version in F15 is lacking the
  needed packages?  I
  have the F14 version of texlive 2010 installed in another workstation
  and that works all right.
 
 I don't think so; the only packages by type uses are amsmath.sty and
 amsthm.sty, and without those all the AMS theorem modules should be borked.
 
 I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error
 you did.  Then I looked in ~/.lyx/layouts and saw that I had old versions
 of some of the .inc files used by the theorem modules.  I deleted those,
 reconfigured LyX and the module is now working.  So you might check there.
 
 Paul

-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Re: Error reading theorem modules. [SOLVED]

2011-08-10 Thread Rudi Gaelzer
Of course that's the problem!  How silly of me.

I changed those modules back in the days when the internationalization was not 
complete 
and then simply forgot about them...

Sorry for the newbie question...

On Monday 08 August 2011 18:59:55 Paul Rubin wrote:
 Rudi Gaelzer rgaelzer at gmail.com writes:
  Is it possible that the texlive 2010 version in F15 is lacking the
  needed packages?  I
  have the F14 version of texlive 2010 installed in another workstation
  and that works all right.
 
 I don't think so; the only packages by type uses are amsmath.sty and
 amsthm.sty, and without those all the AMS theorem modules should be borked.
 
 I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error
 you did.  Then I looked in ~/.lyx/layouts and saw that I had old versions
 of some of the .inc files used by the theorem modules.  I deleted those,
 reconfigured LyX and the module is now working.  So you might check there.
 
 Paul

-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Re: Error reading theorem modules. [SOLVED]

2011-08-10 Thread Rudi Gaelzer
Of course that's the problem!  How silly of me.

I changed those modules back in the days when the internationalization was not 
complete 
and then simply forgot about them...

Sorry for the newbie question...

On Monday 08 August 2011 18:59:55 Paul Rubin wrote:
> Rudi Gaelzer  gmail.com> writes:
> > Is it possible that the texlive 2010 version in F15 is lacking the
> > needed packages?  I
> > have the F14 version of texlive 2010 installed in another workstation
> > and that works all right.
> 
> I don't think so; the only packages "by type" uses are amsmath.sty and
> amsthm.sty, and without those all the AMS theorem modules should be borked.
> 
> I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error
> you did.  Then I looked in ~/.lyx/layouts and saw that I had old versions
> of some of the .inc files used by the theorem modules.  I deleted those,
> reconfigured LyX and the module is now working.  So you might check there.
> 
> Paul

-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Error reading theorem modules.

2011-08-08 Thread Rudi Gaelzer
I've just upgraded my laptop box to Fedora 15, with texlive 2010-fc15.

Since then, when I try to load the Theorem-AMS-Bytype modules (using book 
layout and 
class), I get the error messages:

Error reading module theorem-ams-bytype

The strange thing is that the usual Theorems (AMS) module works with no 
troubles.  It's 
just when I try to load instead the Theorems (AMS, Numbered by Type) module 
that I get the 
error messages.

Is it possible that the texlive 2010 version in F15 is lacking the needed 
packages?  I 
have the F14 version of texlive 2010 installed in another workstation and that 
works all 
right.
-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Re: Error reading theorem modules.

2011-08-08 Thread Paul Rubin
Rudi Gaelzer rgaelzer at gmail.com writes:

 Is it possible that the texlive 2010 version in F15 is lacking the 
 needed packages?  I 
 have the F14 version of texlive 2010 installed in another workstation 
 and that works all right.

I don't think so; the only packages by type uses are amsmath.sty and
amsthm.sty, and without those all the AMS theorem modules should be borked.

I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error you
did.  Then I looked in ~/.lyx/layouts and saw that I had old versions of some of
the .inc files used by the theorem modules.  I deleted those, reconfigured LyX
and the module is now working.  So you might check there.

Paul





Error reading theorem modules.

2011-08-08 Thread Rudi Gaelzer
I've just upgraded my laptop box to Fedora 15, with texlive 2010-fc15.

Since then, when I try to load the Theorem-AMS-Bytype modules (using book 
layout and 
class), I get the error messages:

Error reading module theorem-ams-bytype

The strange thing is that the usual Theorems (AMS) module works with no 
troubles.  It's 
just when I try to load instead the Theorems (AMS, Numbered by Type) module 
that I get the 
error messages.

Is it possible that the texlive 2010 version in F15 is lacking the needed 
packages?  I 
have the F14 version of texlive 2010 installed in another workstation and that 
works all 
right.
-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Re: Error reading theorem modules.

2011-08-08 Thread Paul Rubin
Rudi Gaelzer rgaelzer at gmail.com writes:

 Is it possible that the texlive 2010 version in F15 is lacking the 
 needed packages?  I 
 have the F14 version of texlive 2010 installed in another workstation 
 and that works all right.

I don't think so; the only packages by type uses are amsmath.sty and
amsthm.sty, and without those all the AMS theorem modules should be borked.

I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error you
did.  Then I looked in ~/.lyx/layouts and saw that I had old versions of some of
the .inc files used by the theorem modules.  I deleted those, reconfigured LyX
and the module is now working.  So you might check there.

Paul





Error reading theorem modules.

2011-08-08 Thread Rudi Gaelzer
I've just upgraded my laptop box to Fedora 15, with texlive 2010-fc15.

Since then, when I try to load the Theorem-AMS-Bytype modules (using book 
layout and 
class), I get the error messages:

"Error reading module theorem-ams-bytype"

The strange thing is that the usual Theorems (AMS) module works with no 
troubles.  It's 
just when I try to load instead the Theorems (AMS, Numbered by Type) module 
that I get the 
error messages.

Is it possible that the texlive 2010 version in F15 is lacking the needed 
packages?  I 
have the F14 version of texlive 2010 installed in another workstation and that 
works all 
right.
-- 
Rudi Gaelzer
Department of Physics
Institute of Physics and Mathematics
Federal University of Pelotas
BRAZIL
Registered linux user # 153741


Re: Error reading theorem modules.

2011-08-08 Thread Paul Rubin
Rudi Gaelzer  gmail.com> writes:

> Is it possible that the texlive 2010 version in F15 is lacking the 
> needed packages?  I 
> have the F14 version of texlive 2010 installed in another workstation 
> and that works all right.

I don't think so; the only packages "by type" uses are amsmath.sty and
amsthm.sty, and without those all the AMS theorem modules should be borked.

I just tried on my laptop (Linux Mint, TeXLive 2010) and got the same error you
did.  Then I looked in ~/.lyx/layouts and saw that I had old versions of some of
the .inc files used by the theorem modules.  I deleted those, reconfigured LyX
and the module is now working.  So you might check there.

Paul





Re: cross-reference to an enumerated item within a theorem

2011-05-31 Thread Richard Heck
On 05/30/2011 02:52 PM, Ernesto Posse wrote:
 Hi. Is there a way to do the following? Suppose I have a Proposition
 environment and the text is something like this

 Proposition 3 [pro:some-label] The following holds:
  1. [enu:item1] something
  2. [enu:item2] other

 and later on I want references to show, for example as:

 ... by Proposition 3(2)

 Currently I use a Formatted reference for the first part and an
 un-formatted reference for the second:

 ... by [Formatted ref: pro:some-label]([Ref: enu:item2])

 or in plain LaTeX (with prettyref)

 ... by \prettyref{pro:some-label}(\ref{enu:item2})

 This is a bit cumbersome. Since enu:item2 is inside the Proposition
 environment, would it be possible to infer the label pro:some-label
 associated with that environment to create a format in prettyref so
 that referring only to the individual item, so that it gives you the
 full reference, i.e. something like

 ... by [Formatted ref: enu-item2]

 yields

 ... by Proposition 3(2)

 ?

This would be possible in LaTeX, but a really general solution would be
difficult. If you want to try writing the LaTeX macros, then my idea
would be to use labels of the form:
pro:theprop
enu:1-pro:theprop
enu:2-pro:theprop
the point being that we can reconstruct the earlier label. I don't think
LaTeX normally knows that you are inside some construct you've already
labeled.

Richard



Re: cross-reference to an enumerated item within a theorem

2011-05-31 Thread Richard Heck
On 05/30/2011 02:52 PM, Ernesto Posse wrote:
 Hi. Is there a way to do the following? Suppose I have a Proposition
 environment and the text is something like this

 Proposition 3 [pro:some-label] The following holds:
  1. [enu:item1] something
  2. [enu:item2] other

 and later on I want references to show, for example as:

 ... by Proposition 3(2)

 Currently I use a Formatted reference for the first part and an
 un-formatted reference for the second:

 ... by [Formatted ref: pro:some-label]([Ref: enu:item2])

 or in plain LaTeX (with prettyref)

 ... by \prettyref{pro:some-label}(\ref{enu:item2})

 This is a bit cumbersome. Since enu:item2 is inside the Proposition
 environment, would it be possible to infer the label pro:some-label
 associated with that environment to create a format in prettyref so
 that referring only to the individual item, so that it gives you the
 full reference, i.e. something like

 ... by [Formatted ref: enu-item2]

 yields

 ... by Proposition 3(2)

 ?

This would be possible in LaTeX, but a really general solution would be
difficult. If you want to try writing the LaTeX macros, then my idea
would be to use labels of the form:
pro:theprop
enu:1-pro:theprop
enu:2-pro:theprop
the point being that we can reconstruct the earlier label. I don't think
LaTeX normally knows that you are inside some construct you've already
labeled.

Richard



Re: cross-reference to an enumerated item within a theorem

2011-05-31 Thread Richard Heck
On 05/30/2011 02:52 PM, Ernesto Posse wrote:
> Hi. Is there a way to do the following? Suppose I have a "Proposition"
> environment and the text is something like this
>
> Proposition 3 [pro:some-label] The following holds:
>  1. [enu:item1] something
>  2. [enu:item2] other
>
> and later on I want references to show, for example as:
>
> "... by Proposition 3(2)"
>
> Currently I use a Formatted reference for the first part and an
> un-formatted reference for the second:
>
> "... by [Formatted ref: pro:some-label]([Ref: enu:item2])"
>
> or in plain LaTeX (with prettyref)
>
> "... by \prettyref{pro:some-label}(\ref{enu:item2})"
>
> This is a bit cumbersome. Since enu:item2 is inside the Proposition
> environment, would it be possible to infer the label pro:some-label
> associated with that environment to create a format in prettyref so
> that referring only to the individual item, so that it gives you the
> full reference, i.e. something like
>
> "... by [Formatted ref: enu-item2]"
>
> yields
>
> "... by Proposition 3(2)"
>
> ?
>
This would be possible in LaTeX, but a really general solution would be
difficult. If you want to try writing the LaTeX macros, then my idea
would be to use labels of the form:
pro:theprop
enu:1-pro:theprop
enu:2-pro:theprop
the point being that we can reconstruct the earlier label. I don't think
LaTeX normally knows that you are inside some construct you've already
labeled.

Richard



cross-reference to an enumerated item within a theorem

2011-05-30 Thread Ernesto Posse
Hi. Is there a way to do the following? Suppose I have a Proposition
environment and the text is something like this

Proposition 3 [pro:some-label] The following holds:
 1. [enu:item1] something
 2. [enu:item2] other

and later on I want references to show, for example as:

... by Proposition 3(2)

Currently I use a Formatted reference for the first part and an
un-formatted reference for the second:

... by [Formatted ref: pro:some-label]([Ref: enu:item2])

or in plain LaTeX (with prettyref)

... by \prettyref{pro:some-label}(\ref{enu:item2})

This is a bit cumbersome. Since enu:item2 is inside the Proposition
environment, would it be possible to infer the label pro:some-label
associated with that environment to create a format in prettyref so
that referring only to the individual item, so that it gives you the
full reference, i.e. something like

... by [Formatted ref: enu-item2]

yields

... by Proposition 3(2)

?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


cross-reference to an enumerated item within a theorem

2011-05-30 Thread Ernesto Posse
Hi. Is there a way to do the following? Suppose I have a Proposition
environment and the text is something like this

Proposition 3 [pro:some-label] The following holds:
 1. [enu:item1] something
 2. [enu:item2] other

and later on I want references to show, for example as:

... by Proposition 3(2)

Currently I use a Formatted reference for the first part and an
un-formatted reference for the second:

... by [Formatted ref: pro:some-label]([Ref: enu:item2])

or in plain LaTeX (with prettyref)

... by \prettyref{pro:some-label}(\ref{enu:item2})

This is a bit cumbersome. Since enu:item2 is inside the Proposition
environment, would it be possible to infer the label pro:some-label
associated with that environment to create a format in prettyref so
that referring only to the individual item, so that it gives you the
full reference, i.e. something like

... by [Formatted ref: enu-item2]

yields

... by Proposition 3(2)

?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


cross-reference to an enumerated item within a theorem

2011-05-30 Thread Ernesto Posse
Hi. Is there a way to do the following? Suppose I have a "Proposition"
environment and the text is something like this

Proposition 3 [pro:some-label] The following holds:
 1. [enu:item1] something
 2. [enu:item2] other

and later on I want references to show, for example as:

"... by Proposition 3(2)"

Currently I use a Formatted reference for the first part and an
un-formatted reference for the second:

"... by [Formatted ref: pro:some-label]([Ref: enu:item2])"

or in plain LaTeX (with prettyref)

"... by \prettyref{pro:some-label}(\ref{enu:item2})"

This is a bit cumbersome. Since enu:item2 is inside the Proposition
environment, would it be possible to infer the label pro:some-label
associated with that environment to create a format in prettyref so
that referring only to the individual item, so that it gives you the
full reference, i.e. something like

"... by [Formatted ref: enu-item2]"

yields

"... by Proposition 3(2)"

?


-- 
Ernesto Posse

Modelling and Analysis in Software Engineering
School of Computing
Queen's University - Kingston, Ontario, Canada


Example is counted as a theorem

2011-04-21 Thread Jinxi Cheng
Hi, I am writing an article [ams] using Lyx. I started a few hours ago
and I inserted an example. Lyx autoatically named it Example 1. that
is good. next I inserted a theorem. But it is named Theorem 2 and
not Theorem 1.  It seems Lyx counted the example as a theorem also.
How can I fix this in Lyx?

Thank you in advance.


Re: Example is counted as a theorem

2011-04-21 Thread Daniel CLEMENT
Hello,

Jinxi Cheng wrote:
 Hi, I am writing an article [ams] using Lyx. I started a few hours ago
 and I inserted an example. Lyx autoatically named it Example 1. that
 is good. next I inserted a theorem. But it is named Theorem 2 and
 not Theorem 1.  It seems Lyx counted the example as a theorem also.
 How can I fix this in Lyx?

In order to get independent numbering, you need to load the proper
theorems module:

document  parameters  modules

and choose (e.g.) theorems (AMS, numbered by type)

 
 Thank you in advance.
 
HTH,
-- 
Daniel CLEMENT




Re: Example is counted as a theorem

2011-04-21 Thread David L. Johnson

On 04/21/2011 11:58 AM, Jinxi Cheng wrote:

Hi, I am writing an article [ams] using Lyx. I started a few hours ago
and I inserted an example. Lyx autoatically named it Example 1. that
is good. next I inserted a theorem. But it is named Theorem 2 and
not Theorem 1.  It seems Lyx counted the example as a theorem also.
How can I fix this in Lyx?


You can change the way all such things are counted in Document - 
Modules.  Try numbered by type.


--

David L. Johnson

You will say Christ saith this and the apostles say this; but what
canst thou say?
-- George Fox.


Example is counted as a theorem

2011-04-21 Thread Jinxi Cheng
Hi, I am writing an article [ams] using Lyx. I started a few hours ago
and I inserted an example. Lyx autoatically named it Example 1. that
is good. next I inserted a theorem. But it is named Theorem 2 and
not Theorem 1.  It seems Lyx counted the example as a theorem also.
How can I fix this in Lyx?

Thank you in advance.


Re: Example is counted as a theorem

2011-04-21 Thread Daniel CLEMENT
Hello,

Jinxi Cheng wrote:
 Hi, I am writing an article [ams] using Lyx. I started a few hours ago
 and I inserted an example. Lyx autoatically named it Example 1. that
 is good. next I inserted a theorem. But it is named Theorem 2 and
 not Theorem 1.  It seems Lyx counted the example as a theorem also.
 How can I fix this in Lyx?

In order to get independent numbering, you need to load the proper
theorems module:

document  parameters  modules

and choose (e.g.) theorems (AMS, numbered by type)

 
 Thank you in advance.
 
HTH,
-- 
Daniel CLEMENT




Re: Example is counted as a theorem

2011-04-21 Thread David L. Johnson

On 04/21/2011 11:58 AM, Jinxi Cheng wrote:

Hi, I am writing an article [ams] using Lyx. I started a few hours ago
and I inserted an example. Lyx autoatically named it Example 1. that
is good. next I inserted a theorem. But it is named Theorem 2 and
not Theorem 1.  It seems Lyx counted the example as a theorem also.
How can I fix this in Lyx?


You can change the way all such things are counted in Document - 
Modules.  Try numbered by type.


--

David L. Johnson

You will say Christ saith this and the apostles say this; but what
canst thou say?
-- George Fox.


  1   2   3   4   5   6   7   >