[Tex/LaTex] How to put the title on the head on the left side and the name of the chapter on the right

fancyhdrheader-footerlyx

I'm working with Lyx, and I have the fancy style in the page layout. My document is printed on both sides. On the left side, I want to only have the title of the document and on the right the name of the chapter. Example:

Title of my thesis (left aligned) | Chapter 4. Chapter name (aligned right)

regards

Best Answer

Under Document > Settings... > Page Layout, select the "fancy" headings style under Page Layout (also check "Two sided document" for a twoside layout):

enter image description here

To construct the actual headings, add to your document preamble (Document > Settings... > LaTeX preamble):

\fancyhead{}% Clear all fancy headers
\fancyhead[LE]{Title of my thesis}% Thesis title in Left Even header
\fancyhead[RO]{\leftmark}% Chapter mark in Right Odd header