Chris Share wrote:
Hi,

I'm a PhD student and I'd like to use LyX for my thesis. I'm new to LyX (although I have written one research paper in LaTeX using TeXnicCenter). I've read the Introduction, Tutorial and part of the User's Guide.

I have two questions:

1. My document consists of a main file and separate files for each chapter. All files are "reports". I realise that in a report class an abstract appears without a page number. How can I force a page number to appear on the abstract page/s?
\thispagestyle{plain}
inside an ERT box.  The ERT box goes inside the abstract, for example
in the first line.  This trick works for the standard report class.
When I tried this, LyX reset the page counter to "1" on the first page
of the abstract.  If this isn't what you want, consider
\setcounter{page}{45} or whatever to fix it. Or perhaps
you want a different style page numbers for the abstract?


2. Each chapter title is in Chapter format however because they're separate, each one is labelled "Chapter 1". Although this doesn't affect the final document, I'd like to change it so that it matches the actual chapter number. How can I do this?
Three ways you may use:

The \setcounter way:
==============
I wouldn't bother with it, but \setcounter{chapter}{5} will cause
the next chapter to be number 6.  I.e. use setcounter and one
less than the chapter number you want.  Logical, because
you are really setting the number of the previous chapter,
and the new chapter increase the counter value before printing.

Note that you will not see a different chapter number inside LyX,
only in the previews/printouts.

The reason I wouldn't bother with it, is mainly that this screws
up completely _if_ you add or remove a chapter, or reorder them.
you will then have to fix every \setcounter command.  Doing nothing
works for the final document after all.



Chapter headings in the main document
==========================
Another way of achieving what you want.  Put all the
chapter headings in the master document, and include
child documents that doesn't contain the "chapter"
environment.

When you print drafts, always print the master document
where you simply don't include more than one child document.
That way - you get headings for "empty" chapters as well as the
one document you wanted.
The numbering is correct no matter  how you re-order stuff,
and you don't waste time running the entire thesis through
latex everytime.

Newer versions of LyX support "Document branches".  This lets
you turn parts of the document "on" and "off", instead of
removing/reinserting files in the master document.


Document branches
==============
You can also use document branches to achieve time & paper
saving, without having to split into several documents.
In this case you put everything into one big document, and
put each chapter (except for the chapter heading itself perhaps)
in a document branch of its own.  You can then use
the document->settings->branches menu to turn
various parts of the document on and off.  Performance
should be fine even with a single huge document.


Helge Hafting

Reply via email to