I've written a little on the subject here:
http://www.troubleshooters.com/lpm/200210/200210.htm#_HeadersandFooters

HTH

SteveT

On Thursday 10 April 2008 13:14, Filippo Zangheri wrote:
> Miguel Daniel Rodríguez Magarzo ha scritto:
> > El mié, 09-04-2008 a las 13:08 +0200, Filippo Zangheri escribió:
> >
> >
> >
> > Firstly, thank you very much for your last email, your reply was
> > _definitive_. :-)
> >
> >>> I've tried with that, removing much of the lines I had in the preamble;
> >>> this is what is there at the moment:
> >>>
> >>> \AtBeginDocument{%
> >>> \addto\captionsspanish{%
> >>> \renewcommand{\chaptername}{Tema }%
> >>> }}
> >>> \usepackage{fancyhdr}
> >>> \pagestyle{fancy}
> >>> \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
> >>> \fancyhead[ER,OR,EL,OL]{}
> >>> \fancyhead[EC,OC]{Biología\hfill \leftmark}
> >>> \cfoot{\thepage}
> >>
> >> You can safely remove this last line, because that's the default
> >> footer of "fancy" pagestyle.
> >
> > Right, I've checked it.
> >
> >>> This code works, since:
> >>>   a. To the left of each page, heading, appears the string wanted.
> >>>   b. To the right of the same page, heading, takes place the title of
> >>> the chapter, as desired, but...
> >>>
> >>>   1. There is a minor detail, a difference in relation to what I wanted:
> >>> it appears in upper case letters; I didn't wanted in that way, but
> >>> lower case letters except the first, e.g. Nucleic acids, not NUCLEIC
> >>> ACIDS.
> >>
> >> Strange, indeed! I copied your LaTeX preamble and put it into the
> >> LaTeX preamble of a new document, then I created a master document
> >> with two children and the result is literally the one you wish:
> >> lowercase chapter name. I attached those three files, check by yourself.
> >
> > I was playing with those three files you sent me during a long time,
> > believe me...
> > They worked as expected, I mean.. the master document behaves rightly
> > with that code, it looks like at the preview dvi is just what we wanted,
> > indeed.
> > So, I stated to _compare_ de "Document settings" from yours (the test)
> > and mine (the real work) point by point, I didn't see any relevant
> > difference (both book-style,etc.) but I was getting the same result; I
> > even got to change everything in yours  settings (latexdefault->utf8,
> > Italian->Spanish, default page margins -> mines, etc...) and nothing.
> > Then I caught it. My God! The chapter string of your two child documents
> > were written in lower case letters, that was all!!!! A little detail
> > that was there always present and I was unable to notice until several
> > hours after. My right headers show upper case letters because I
> > intentionally write the string of each chapter name in
> > upper-case-letters..., yeeeeaaah. ;-)
> >
> > Well, I don't know whether it could be true that with LaTeX no
> > everything can be possible, those two things particularly here, but if I
> > have to choose, I PREFER _chapter names in upper case letters, at the
> > beginning of each (child) document despite the right header have to come
> > with upper case letters too_, THAN chapter names in lower case letters,
> > which dislikes me*, just in order to get lower case letters in the
> > headers.
> >
> > * Into these kind of materials I'm working right now (much long
> > chapters).
>
> I just can't understand your hate for lowercase chapter names --
> even if chapters are very long :). Anyway, the best I can do is the
> following:
>
> replace:
>  \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
> with:
>  \renewcommand{\chaptermark}[1]{\markboth{\lowercase{#1}}{}}
>
> But this makes *all* characters in lower case, even the first one --
> which probably makes this solution not suitable to your needs.
>
> If someone knew how to handle strings (in particular, characters
> arrays) in LaTeX, it would be easy to get a *definitive* solution
> for your problem. I never heard about this possibility, but I'm sure
> something must exist.
>
> >>>   2. Besides, now a new (big) fail has appeared: the number page is the
> >>> "1" in all pages of the master document. Much probably this has to do
> >>> with the ERT that I had placed at the beginning of each document
> >>> (child), just after the chapter, this one:
> >>>
> >>> \setcounter{page}{1}
> >>>
> >>> This did let me to obtain a desired effect: to reset page numbers when
> >>> starting each chapter. I know this practise is not much common, but for
> >>> some materials it reveals to be very practical (specially for pupils).
> >>>
> >>> Is there any work around for solving these issues, please?
> >>
> >> To fix the problem, try to put the ERT[\setcounter{page}{1}] at the
> >> very beginning of the child document - before the chapter. ;)
> >
> > That was absolutely great! I caught it at first try because your example
> > files, if not I were put them just before the string of the chapter (as
> > really did firstly), where they don't work. It must be placed at a
> > previous line (with the "normal" style chosen), as you showed me. :-)
>
> Yes. I meant, in the first line of the child document, all alone.
>
> > ...
> > Thank you very much, Filippo.
>
> No problem Miguel, I'm pleased to be of help for someone. Though I'm
> not a LyX, nor a LaTeX guru. :)
>
> > With this one, I've got satisfied more or less the questions that arose
> > to me past days/weeks. Thanks again, to you and others here in the list
> > for your time, I know too how much difficult becomes sometimes to find a
> > little of time for such a things to all us, and how many important time
> > is into our lives.
>
> I hope one day you'll be able to answer other people's questions, in
> order to share your (yet little, like mine) amount of knowledge and
> make the Internet a better place. :)
>
> > By the way, maybe the following could be interesting for developers in
> > the list (most of you, I suspect...) ;-).  When I was playing with those
> > three files I realized of some kind of "bug" (maybe?) that, fortunately,
> > this time I could face up without having to ask for help to the list.
> > Maybe is just a well-known issue (not a bug), I don't know...
> >     a. To launch a new instance of LyX (my intention is to build a master
> > document).
> >     b. File > New document. Right.
> >     c. Then, Insert > File > Child document, proceeding. Repeating the same
> >             operation for another one, etc.
> >     d. Document > Settings, paste your LaTeX code in the preamble, etc.
> >     e. Save, giving a name, placing over there, etc.
> >     f. dvi update (or just dvi preview (xdvi here)) ---> Pops up a warning:
> >
> >     "Un archivo de salida vacío fue generado" e.g., more or less..
> >     "An empty output file was generated",
> >     and you cannot see anything about its look with xdvi.
> >
> >     BUT, if you proceed by changing the sequence of some of those steps,
> > that just won't occur, that is, you will not get into that warning at
> > all. The sequence that must be correct (you all should know this, since
> > you are able to create master documents, :-))), but...) is this:
> >     a. > b. > e. (!) > c. > d. > f.
>
> Actually, the working sequence is the one that seems most natural to
> me. :)
>
> Best regards.

Reply via email to