Page numbers not showing in place

Paul A. Rubin parubin73 at gmail.com
Tue Nov 30 15:26:33 UTC 2021


On 11/30/21 4:51 AM, Daniel wrote:
> On 30/11/2021 08:08, Melvin Bolton wrote:
>> Hello Paul
>>
>> Thank you for your response. I've cut the Lyx document down to the 
>> few first pages, and am also attaching the pdf output from it. You 
>> will see one entry in the preamble that reverses the odd/even pages. 
>> Without this, the right side (recto) pages show the left page 
>> margins, but the numbering problem remains, with or without that 
>> entry in the preamble.
>>
>> Melvin
>>
>> On 30/11/2021 10:44, Paul A. Rubin wrote:
>>> On 11/29/21 7:00 PM, Melvin Bolton wrote:
>>>> I have in the past completed a lengthy book, using Lyx,  without 
>>>> needing to trouble anybody for help, but I'm now baffled by what 
>>>> should be a simple, basic task and I have no idea what to try next.
>>>>
>>>> My problem is that the pagestyle settings that should place page 
>>>> numbers in the footer, are showing them in the output only on the 
>>>> first page of each chapter, which the User Guide says is treated by 
>>>> Lyx as a special environment.
>>>> I began with KOMA-Script ( scrbook) with pagestyle set to 'plain' 
>>>> as I'd done previously. This places page numbers in the outer end 
>>>> of the footer as I prefer them. When I found them only appearing on 
>>>> the first page of each chapter I searched online and tried pasting 
>>>> a few commands in the preamble but nothing helped and mostly I got 
>>>> compilation errors. I've cleared the preamble.
>>>>
>>>> I tried Lyx Standard Class (Book) with pagestyle set to 'plain', 
>>>> which centred the page numbers as it should, but still only on 
>>>> first pages of chapters. Neither was there any improvement after I 
>>>> tried pagestyle set to 'fancy' and tried to customize that. It's as 
>>>> though chapter footers are not accessible, except for first page.
>>>>
>>>> In my document, immediately before the first chapter, I have the 
>>>> following ERT:  \mainmatter\pagestyle{plain} \setcounter{page}{1}
>>>>
>>>> The frontmatter is fine because I have don't want page numbers 
>>>> there and have pagestyle set to 'empty.' That, at least, has 
>>>> worked; there were Roman numerals there to begin with.
>>>> Finally, I did a reinstallation of Lyx (ver. 2.3.6.1) in case of 
>>>> corruption, (apparently not) and I'm now out of ideas.
>>>>
>>>> I shall be truly grateful for any help, but I will need precise 
>>>> instruction if I am to paste commands correctly into the preamble. 
>>>> I really am an old novice.
>>>>
>>>> Thank you
>
> Hi Melvin,
>
> Try removing the centering from the ERT with
>
> \mainmatter\pagestyle{plain} \setcounter{page}{1}
>
> That seems to mess things up, probably because pagestyle is then in an 
> environment?!? (Also, I think you can skip \setcounter{page}{1} 
> because \mainmatter should take care of that and you can switch back 
> to the KOMA-script book class.)
>
> Best,
> Daniel
>
Confirmed. Good catch!

Paul



More information about the lyx-users mailing list