LyXPage header overlapped with page text

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

Page header overlapped with page text

Post by drmCA »

After output to DVI from a document of class 'book' the text on the pages overlaps the lower half of the page header (both chapter and page number). What am I doing wrong?

The page layout section in preamble looks like this with the recommended change as per below:

% Page layout (geometry)
\setlength{\voffset}{-1in}
\setlength{\hoffset}{-1in}
\setlength{\topmargin}{0.7874in}
\setlength{\oddsidemargin}{0.7874in}
\setlength{\textheight}{8.985in}
\setlength{\textwidth}{6.9251995in}
\setlength{\footskip}{0.4402in}
\setlength{\headheight}{20pt}
\setlength{\headsep}{0cm}


Are those appropriate values for a book?
Last edited by drmCA on Mon Aug 13, 2012 7:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Page header overlapped with page text

Post by Stefan Kottwitz »

Hi,

welcome to the board!

I guess the head height is too small. You can change it this way, in your document preamble:

Code: Select all

\setlength{\headheight}{20pt}% adjust the value
Stefan
LaTeX.org admin
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

Re: Page header overlapped with page text

Post by drmCA »

Am I supposed to have access to that document setting in LyX?
I tried changing page margins to no avail.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Page header overlapped with page text

Post by Stefan Kottwitz »

You already use that setting \headheight. Just change the value. Add such a \setlength command to your LyX document preamble. I don't recommend to use 20 pt. I just recommended to use the command, the value depends on your document, i.e. on the content of the header.

For values appropriate for a book, I would use the typearea package, which calculates a good layout.

Stefan
LaTeX.org admin
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

Re: Page header overlapped with page text

Post by drmCA »

That kind of defeats the purpose of using LyX.
I am just an author who has to quickly publish a book. That does not mean that I am looking to master the tex language in its entirety. On the contrary, LyX advertises itself as a WYSIWYG tool and I am inquiring on how to use it just because I have no desire to write tex.

As LyX provides document settings and there is a tab for page margins, I am wondering whether that works and how? Changing the margins in document settings does not seem to do anything to the heading height.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Page header overlapped with page text

Post by Stefan Kottwitz »

Sure, LyX gives easy access. On top of that, using TeX sometimes gives you more control and finer customization.

If you would like to have pure LyX style answers (click here, choose that, enter the menu, click, enter value, press ok, ...) then I recommend that you ask at the LyX mailing list. This place here, the forum, is especially good in giving you LaTeX code which you could directly copy into your preamble (LyX menu: Document, Settings, preamble) and it works. Not much words and clicking around, which is often hard to describe.

Regarding page layout: I would use a class with best layout support. This could be memoir or scrbook. The latter would be my choice, which would mean for LyX, I choose "book (KOMA-Script)" as the class. Furthermore, I let this class calculate the layout, by adding the class option DIV=10 in the LyX dialog for class options. To get narrover margins, I use a value higher than 10. The layout is well calculated then, by page division. It's described in the link I gave above, there's a whole chapter about page design.

Stefan
LaTeX.org admin
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

Re: Page header overlapped with page text

Post by drmCA »

I thought I was posting in LyX forum.

For some reason LyX does not allow me to change class from book.
Once I tried, the preamble is gone, but the class is still book.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Page header overlapped with page text

Post by Stefan Kottwitz »

drmCA wrote:I thought I was posting in LyX forum.
That'a correct, it's the LyX subforum of a general LaTeX site. Sometimes experienced LyX users write here, sometimes you will find mostly LaTeX users here. Who can give great help, but with LaTeX code for LyX.
drmCA wrote:For some reason LyX does not allow me to change class from book.
Once I tried, the preamble is gone, but the class is still book.
Perhaps the koma-script bundle is not installed on your PC, you could check it with the TeX package manager.

Stefan
LaTeX.org admin
drmCA
Posts: 31
Joined: Mon Aug 13, 2012 12:18 am

Re: Page header overlapped with page text

Post by drmCA »

What is the program name of tex package manager?

I am in Fedora 14 if that matters. There is no KOMA package in Yum.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Re: Page header overlapped with page text

Post by Stefan Kottwitz »

If you installed TeX with yum, you need to use yum. Perhaps it's called texlive-koma-script, a search could tell you that. Unfortunately I don't use Fedora. I use Ubuntu and Debian, besides Windows.

As Linux native TeX versions are often pretty old, I prefer installation from tug.org/texlive, over the internet, which gives me the most current TeX version. Then, the package manager is called tlmgr (TeX Live Manager).

Stefan
LaTeX.org admin
Post Reply