On Tue, Nov 10, 2015 at 2:20 PM, PhilipPirrip <[email protected]> wrote:

> On 11/10/2015 03:54 PM, Jacob Bishop wrote:
>
>> I am having a problem. I put \thispagestyle{empty} into my LyX preamble,
>> expecting it to suppress the page number on the first page (as per the
>> wiki: http://wiki.lyx.org/FAQ/Numbering#noPageNumberOnFirstPage). It
>> does not. The page number shows up anyway. Attached is a minimal
>> example. Does anyone have an idea as to what is happening? I am on Linux
>> Mint 17 64-bit using LyX 2.1.4 (Friday, July 24, 2015).
>>
>>
> The command has to go in a LaTeX code inset (so called ERT).  Ctrl+L, type
> the code, compile
> This link above has an example in lyx that works.
>
>
> Steve, thanks for the response. That works.
Philip, you are also correct. Thank you. I went over the wiki page more
carefully and noticed the link to a file this time.

I also played with LyX a bit more because I prefer to put hacks into the
preamble instead of as ERT in the document itself. Initially, my efforts
were not successful, but after some trial and error, what I have come up
with (which works surprisingly well for my needs) is to put the following
in the preamble:

\renewcommand{\thispagestyle}[1]{}


This disables the command \thispagestyle by redefining it to null, causing
all future occurrences to do nothing. Strangely, this produces the exact
behavior I want. It causes all pages in the document to follow the setting
under Document Settings>Page Layout. I had initially expected that setting
to govern the global paper behavior anyway, and when it didn't it was a bit
frustrating. I believe this works because there are manual calls to
\thispagestyle on the first page and at the beginning of chapters in some
document classes.


I would love to see an additional LyX feature that adds a checkbox option
like "apply headings style settings globally" which could work by simply
disabling the \thispagestyle command.


Jacob

Reply via email to