[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: forcing new numbering and odd pages with sections
From:       Herbert Voss <Herbert.Voss () alumni ! TU-Berlin ! DE>
Date:       2001-12-28 22:42:20
[Download RAW message or body]

dochawk@psu.edu wrote:

> I've switched from Article to Book in the process here.
> 
> I now have a preamble of
> 
> \pagenumbering{roman}
> \makeindex


the last one is done by lyx when you insert the index.


> \@addtoreset{page}{chapter}
> 
> and at the end of my Introduction (done with Chapter* in book layout),
> I have an ERT of
> 
> \let\myChapter\chapter
> \renewcommand{\chapter}[1]{%
> \cleardoublepage 
> \myChapter{#1}%
> } 


this is only necessary for the oneside mode, because it's the default
for books in twosidemode

> \renewcommand{\thefigure}{\thechapter-\arabic{figure}} 
> \renewcommand{\thetable}{\arabic{chapter}.\roman{table}.} 
> \renewcommand{\theequation}{\thechapter-\arabic{equation}} 
> 
> This seems to do it, save that starting with chapter 2, page numbers 
> begin at 0 rather than 1, and that I get the raw page number printed at 
> the bottom of the first page.


the chapterpage has per definition it's own pagestyle, called plain,
where the pagenumber is always at the bottom. This is easy to change
with fancyhdr:

http://www.lyx.org/help/fancy/header.html#plain


> Also, is this really the way I want to do it?  If I reference a page 
> this way, won't I get "4" rather than "2-4"


I don't really understand what kind of pagenumbers do you want
to have: only numbers or chapter-number?

if you want to reset the pagecounter with every chapter than write
a \setcounter{page} behind the cleardoublepage and without a pagenumber
it looks like (in the preamble)

  \let\myChapter\chapter
  \renewcommand{\chapter}[1]{%
    \cleardoublepage
    \myChapter{#1}%
    \setcounter{page}{1}%
    \thispagestyle{empty}% without any pagenumber
  }

let me know, if you like an examplefile.


> I tried to follow the pages into fancy headers and headers and 
> footerxs, but gave in when my head spun too much :)
> 
> Anyway, a couple of gratuitous adjustments to that page:
> 
> New Counter
> in latex preamble 
>  without any automatic reset: \newcounter{myCounter} 
>  with a rest by chapter: \newcounter{myCounter}[chapter] 
>         ^^^^
> 
> should be "reset", I presume?


yes

>>   Now myCounter is no more resetted when a new section starts.
>>
>                       ^^^^^^^^^^^^^^^^
> 
> should be "is no longer reset"

yes

Herbert


-- 
http://www.lyx.org/help/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic