Re: Change chapter number as displayed in LyX

2020-03-27 Thread Matt Barnard
That seemed to be the case, thanks for confirming.
Is your patch on github? I have time now due to current events and could
take a look at finishing it.

Matt

On Fri, Mar 27, 2020, 9:19 AM Richard Kimberly Heck 
wrote:

> On 3/26/20 8:55 PM, Matt Barnard wrote:
>
> Sure, see attached. Adjusting the LyX numbering like this is something
> I've found myself wanting to do a number of times.
>
> Yes, the only to fix this in LyX itself would be with some LaTeX trickery
> of the sort you describe below. There's not currently any way to manipulate
> LyX's counters within the text itself. I have a partial patch that will do
> this kind of thing but haven't had time to finish it.
>
> Riki
>
>
>
> Example (attached)
>
>> \setcounter{part}{9}
>> Part 10 My document starts on Part 10
>> 1 with one section
>> \addcontentsline{toc}{part}{*By the way,}*By the way,
>> This chapter is an aside, but it needs to be at the Part level in the ToC
>> \setcounter{part}{9}
>> Part 11 then we continue with Part 10
>> 2 but LyX says this is Part 11
>
>
> Note that I resolved this for now using the following:
>
> \newcounter{previouschapter}
>> \newcounter{previoussection}
>> \newcounter{uniquechapteranchor}
>> \newcommand{\pushchapter}{%
>>   \let\previouschaptertitle\parttitle%
>>
>   \setcounter{previouschapter}{\value{part}}%
>>   \setcounter{previoussection}{\value{section}}%
>> }
>> \newcommand{\popchapter}{%
>>   \renewcommand*{\theHpart}{\value{uniquechapteranchor}\the\value{part}}
>> % for hyperref
>
>   \chapt{\value{previouschapter}}   %
>> shorthand for \setcounter{part}{n-1}
>>   \part{\previouschaptertitle~(cont.)}%
>>   \sect{\value{previoussection}}%
>>   \stepcounter{section}%
>>   \stepcounter{uniquechapteranchor}%
>> }
>
>
> and then
>
>
>> \part{Real  part  }
>
> \pushchapter
>> \part*{Interrupting part}
>
> \popchapter % output a new part, but don't start a new part in LyX
>
> \section{this is in real  part}
>
>
> LyX continues numbering with the previous part even though I write a new
> part in the output
>
> On Thu, Mar 26, 2020 at 4:57 PM Richard Kimberly Heck 
> wrote:
>
>> On 3/26/20 4:16 PM, Matt Barnard wrote:
>>
>> Hello,
>>
>> I'm interrupting a numbered chapter with an unnumbered chapter, and I
>> would like to continue sections within that previous numbered chapter. I've
>> done this on the output side with \setcounter{part}, but in LyX the
>> chapter number is still incremented.
>>
>> I've fixed this for the first instance using the local layout
>>
>> Counter part
>>
>> InitialValue 12
>>
>> End
>>
>> but I haven't found a way to give LyX a command mid-document to adjust
>> numbering.
>>
>> Is this currently supported?
>>
>> I'm not sure I entirely understand the issue. Can you post a very simple
>> example file?
>>
>> Riki
>>
>>
>>
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Change chapter number as displayed in LyX

2020-03-27 Thread Richard Kimberly Heck
On 3/26/20 8:55 PM, Matt Barnard wrote:
> Sure, see attached. Adjusting the LyX numbering like this is something
> I've found myself wanting to do a number of times.

Yes, the only to fix this in LyX itself would be with some LaTeX
trickery of the sort you describe below. There's not currently any way
to manipulate LyX's counters within the text itself. I have a partial
patch that will do this kind of thing but haven't had time to finish it.

Riki


>
> Example (attached)
>
> \setcounter{part}{9}
> Part 10 My document starts on Part 10
> 1 with one section
> \addcontentsline{toc}{part}{*By the way,}*By the way,
> This chapter is an aside, but it needs to be at the Part level in
> the ToC
> \setcounter{part}{9}
> Part 11 then we continue with Part 10
> 2 but LyX says this is Part 11
>
>
> Note that I resolved this for now using the following:
>
> \newcounter{previouschapter}
> \newcounter{previoussection}
> \newcounter{uniquechapteranchor}
> \newcommand{\pushchapter}{%
>   \let\previouschaptertitle\parttitle%
>
>   \setcounter{previouschapter}{\value{part}}%
>   \setcounter{previoussection}{\value{section}}%
> }
> \newcommand{\popchapter}{%
>   \renewcommand*{\theHpart}{\value{uniquechapteranchor}\the\value{part}} 
> % for hyperref
>
>   \chapt{\value{previouschapter}}                                 
>  % shorthand for \setcounter{part}{n-1}
>   \part{\previouschaptertitle~(cont.)}%
>   \sect{\value{previoussection}}%
>   \stepcounter{section}%
>   \stepcounter{uniquechapteranchor}%
> }
>
>
> and then 
>  
>
> \part{Real  part  } 
>
> \pushchapter
> \part*{Interrupting part} 
>
> \popchapter % output a new part, but don't start a new part in LyX
>
> \section{this is in real  part} 
>
>  
> LyX continues numbering with the previous part even though I write a
> new part in the output
>
> On Thu, Mar 26, 2020 at 4:57 PM Richard Kimberly Heck
> mailto:rikih...@lyx.org>> wrote:
>
> On 3/26/20 4:16 PM, Matt Barnard wrote:
>> Hello,
>>
>> I'm interrupting a numbered chapter with an unnumbered chapter,
>> and I would like to continue sections within that previous
>> numbered chapter. I've done this on the output side with
>> \setcounter{part}, but in LyX the chapter number is still
>> incremented.
>>
>> I've fixed this for the first instance using the local layout
>>
>> Counter part
>>
>> InitialValue 12
>>
>> End
>>
>> but I haven't found a way to give LyX a command mid-document to
>> adjust numbering.
>>
>> Is this currently supported?
>>
> I'm not sure I entirely understand the issue. Can you post a very
> simple example file?
>
> Riki
>
>

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


Re: Use different texlive installation

2020-03-27 Thread Kornel Benko
Am Fri, 27 Mar 2020 02:05:56 +0100
schrieb Zelphir Kaltstahl :

> > Hello Zelphir,
> > I had a similar problem with other window managers, because of not using 
> > .profile.
> > (I use tcsh as a shell)
> > I don't know Guix, but it may be the same solution would work for you too.
> > 1.) Edit (or create) ~/.pam_environment (Attached the content of my file)
> > 2.) You need also some packages libpam-runtime libpam0g libpam-modules
> > libpam-modules-bin libpam-systemd
> >   (You probably have them already)
> > It should work with the next login.
> >
> > Kornel  
> 
> 
> Hi Kornel!
> 
> You were right! I found an even easier solution though:
> 
> My ~/.profile definitions are not visible to a program installed via
> Guix, when it starts. So I looked around in my Guix profile folder at
> ~/.guix-profile and found an etc/profile in there. There I add my
> variables, just like in ~/.profile and tada! LyX starts just fine. I
> guess, that LyX only worked the first time correctly, because the Guix
> daemon was already started and did not read the default definitions in
> that ~/.guix-profile/etc/profile without rebooting or relogin. So when I
> started my machine the next day, it suddenly started seeing those wrong
> default variable values in there. Now that I changed them in there,
> after a relogin everything works as expected. No more errors on command
> line output.
> 
> Not sure whether that profile file will be overwritten in the future,
> but if that happens I will notice and search for a Guix best practice
> regarding environment variables.
> 
> Thank you for your help and hints!
> 
> Regards,
> Zelphir

Your ~/.guix-profile are safe.

Thanks for the confirmation.

Kornel


pgpJHyZOh69PN.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users