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


Align headings and their outline numbers

2021-07-23 Thread Andreas Plihal

Hi,

 

as you know, I'm writing a KOMA book. 

 

How can I get all heading text to be left-justified and their associated section numbers right-justified? 

 

For a better understanding, I have enclosed a graphic that illustrates what I mean.

 

Greetings

Andreas
-- 
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 




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 




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: Jabref 5.3.1

2021-07-23 Thread Herbert Voss



Am 23.07.21 um 17:34 schrieb Wolfgang Engelmann:



Am 22.07.21 um 20:44 schrieb Herbert Voss:


First I deleted the old JabRef. Then I downloaded the new deb file
and with doubleclick on that file it will be installed by the install 
manager.

After that I can use jabref as usual.

Herbert


 I did also delete the old JabRef.
I downloaded for Ubuntu/Debian Jabref_5.3-1_amd64.deb (155MB)
 via download.fosshub.com
opened with GDebi-Paket-Installationprogramm (Standard)
and clicked Paket installieren

I tried
jabref
./jabref



After a successful instalation it should be available by the menu. With 
an input

of "jab" the icon of jabref should be on the screen.

Herbert




tried again after 7 minutes (don't know how long the installation 
takes, there is no info on it)


to no avail

Herbert, did you use another source for the Debian package?

Wolfgang


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


Re: Jabref 5.3.1

2021-07-23 Thread Wolfgang Engelmann




Am 22.07.21 um 20:44 schrieb Herbert Voss:


First I deleted the old JabRef. Then I downloaded the new deb file
and with doubleclick on that file it will be installed by the install 
manager.

After that I can use jabref as usual.

Herbert


 I did also delete the old JabRef.
I downloaded for Ubuntu/Debian Jabref_5.3-1_amd64.deb (155MB)
 via download.fosshub.com
opened with GDebi-Paket-Installationprogramm (Standard)
and clicked Paket installieren

I tried
jabref
./jabref

tried again after 7 minutes (don't know how long the installation takes, 
there is no info on it)


to no avail

Herbert, did you use another source for the Debian package?

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


Re: Jabref 5.3.1

2021-07-23 Thread Dr Eberhard Lisse

Get a Mac :-)-O

el

On 22/07/2021 21:31, Paul A. Rubin wrote:

On 7/22/21 2:25 PM, Wolfgang Engelmann wrote:

Am 22.07.21 um 20:12 schrieb Wolfgang Engelmann:

Am 22.07.21 um 17:32 schrieb Paul A. Rubin:

On 7/22/21 9:31 AM, Wolfgang Engelmann wrote:

[...]


--
To email me replace 'nospam' with 'el'

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