-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Miguel Daniel Rodríguez Magarzo ha scritto:
> El mar, 08-04-2008 a las 10:52 +0200, Filippo Zangheri escribió:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Miguel Daniel Rodríguez Magarzo ha scritto:
>>> Hi again,
>>>
>>> Honestly, I hope to get to explain good enough. The issue is very
>>> simple. 
>>>
>>> What I've done until now in order to sorting this out has been just
>>> taping in the preamble, inside "\rhead{}", the string I wanted to be
>>> appeared there (using the fancyhdr). But how to do if I want the same
>>> result using code? 
>>>
>>> I've tried several combinations, but without results. Actually, I never
>>> knew much what I  was really doing, since I know nothing about LaTeX,
>>> but the "try and error" method didn't gave me a only chance either.
>>>
>>> In a pdf document ("Page layout in LaTeX", Piet van Oostrum, Utrecht
>>> University, 2004), page 10, it shows several examples of this, more...
>>> what I wanted was there... !!!, __just__ the third from the end, very
>>> simple:
>>>
>>> \renewcommand{\chaptermark}[1]{%
>>>  \markboth{#1}{}}
>> Hi Miguel,
>>
>> Try using the syntax below, maybe you are not using \leftmark?
>>
>> \usepackage{fancyhdr}
>> \pagestyle{fancy}
>> \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
>> \fancyhead[ER,OR,EL,OL]{}
>> \fancyhead[EC,OC]{Your Name\hfill \leftmark}
>>
>> As a note, if you find that header font is too small, you can always
>> do: \begin{large} <your header here> \end{large} .
>>
>> Greetings.
>>
>>
>> - --
>> Filippo Zangheri
>>
> 
> Thank you for your suggestion, Filippo.
> 
> 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.


> 
> 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.


>       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. ;)


Best regards.

- --
Filippo Zangheri

GPG key ID: 0xE1D879FA
Key fingerprint: 816B CE57 D43C 0A47 EF35 3378 EA5F A72A E1D8 79FA
Key server: pgp.mit.edu

- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d- s+:- a-- C++ UL+++ P+ L+++ E-- W+ N* o-- K- w--- O-- M--
V- PS++ PE+ Y+ PGP++ t 5-- X++ R* tv b+ DI-- D---- G-- e++ h--
r++ z*
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH/KOM6l+nKuHYefoRAhwbAJ9fPMXZut5dwYDAp3DDaajRe2gKewCfcD3X
XbcpBhF9w6nHjiVLK18qt9M=
=jFzF
-----END PGP SIGNATURE-----

Attachment: test1_child1.lyx
Description: application/lyx

Attachment: test1_child2.lyx
Description: application/lyx

Attachment: test1_master.lyx
Description: application/lyx

Attachment: test1_child1.lyx.sig
Description: Binary data

Attachment: test1_child2.lyx.sig
Description: Binary data

Attachment: test1_master.lyx.sig
Description: Binary data

Reply via email to