LyXHow to "add all three header styles" in lyx 2.2.0

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

I am fairly new to lyx and want to define a custom header. I read the User Guide and found section 6.11 Customized Page Headers and Footers. I easily followed the initial two steps to enable custom headers:
set the Page style to Fancy in the Document->Settings dialog under Page Layout
and
add in the menu Document->Settings->Modules the module “Custom Header/Footerlines”
. After that, I'm lost.

Section 6.11.1 Definition starts with
To define your header line, add all three header styles.
It goes on to describe what sort of information to put in after adding them, but incredibly, never explains how to add the header styles. Apparently, the header styles are usually added at the beginning of the document, but can go anywhere in it.

I expected Section 6.11.4 This example to actually demonstrate how to define the header, but it didn't do that. Here's the full text of that example:
This example demonstrates what can be done with custom header/footers. Don't use it for your document as it is just an example. This example consists of the following definition:

Left Header \rightmark, empty optional argument

Center Header empty, empty optional argument

Right Header empty, \leftmark in the optional argument

Left Footer empty, \thepage in the optional argument

Center Footer LyX's user guide, “Magic code:\Upsilon=\frac{\sqrt[3]{\aleph}}{\spadesuit}” in the optional argument

Right Footer \Roman{page}, empty optional argument

\headrulewidth set to 2 pt

In principle you can use almost everything in headers/footers, except floats. For more specialized features, for example, thumb-indexes, see the manual of the fancyhdr package, [15].
I don't understand how to implement this example. I've scoured all the menus and submenus and dialogues, but can't find anything about headers other than simply choosing the submodule.

How do I
add all three header styles
as the User Guide says I should?

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

colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

Well, now I see it at the bottom of the style drop-down box. That drop-down box is the first item on the toolbar just under the menus. I thought I checked there before, but for some reason, the Header/Footer options weren't there. Now I see how to do it, but the documentation could use some improvement. I wasted hours on this.

In addition, the User Guide says it's necessary to add code to the preamble to change the header height, completely ignoring the Head height and Head sep settings in the Document -> Settings, Page Margins dialog. I couldn't find instructions for those settings and spent way too long figuring out that the Top margin needs to be big enough to include the Head height and Head sep lengths. So, for example, if you have a huge 3 cm header and want to separate it from the body text by 0.4cm, and need another 1.6cm space above the header, the top margin has to be set to 3.0+0.4+1.6 cm = 5 cm.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

How to "add all three header styles" in lyx 2.2.0

Post by scottkosty »

colinkeenan wrote:Well, now I see it at the bottom of the style drop-down box. That drop-down box is the first item on the toolbar just under the menus. I thought I checked there before, but for some reason, the Header/Footer options weren't there. Now I see how to do it, but the documentation could use some improvement. I wasted hours on this.

In addition, the User Guide says it's necessary to add code to the preamble to change the header height, completely ignoring the Head height and Head sep settings in the Document -> Settings, Page Margins dialog. I couldn't find instructions for those settings and spent way too long figuring out that the Top margin needs to be big enough to include the Head height and Head sep lengths. So, for example, if you have a huge 3 cm header and want to separate it from the body text by 0.4cm, and need another 1.6cm space above the header, the top margin has to be set to 3.0+0.4+1.6 cm = 5 cm.
Sorry for your wasted hours. Do you want to volunteer to help us improve the documentation so we can prevent further people from wasting time on the same issue? If so, please see the following for instructions on how to join our lyx-docs mailing list:
https://www.lyx.org/MailingLists

I hope you are willing to help. We could really use it because as you've realized a lot of the documentation could be improved.

And I'm glad you figure out the problem!

Scott
colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

Re: How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

I would enjoy improving the documentation. However, is it necessary for me to subscribe to the lyx-docs mailing list, or can I get away with just sending messages to it?

Better yet, is there a way for me to directly edit the documentation myself?
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

How to "add all three header styles" in lyx 2.2.0

Post by scottkosty »

colinkeenan wrote:I would enjoy improving the documentation.
Great!
colinkeenan wrote: However, is it necessary for me to subscribe to the lyx-docs mailing list, or can I get away with just sending messages to it?
I think you can get away with sending directly to it. You should mention in your email something like "I'm not subscribed so please CC me". Note that the list is very low volume---the average seems to be about 1 message per day (source: http://marc.info/?l=lyx-docs) so if you felt like it you could subscribe and then use a filter to redirect the messages to a special folder. But I understand if you don't want to go to that trouble.
colinkeenan wrote: Better yet, is there a way for me to directly edit the documentation myself?
Yes, but this involves getting the newest version. Are you familiar with Git? Can you compile LyX from source?
colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

Yes, I am familiar with git and have already started editing the User Guide to include those changes I mentioned in my answer above. I will email the diff file to the developer list when done, and ask them to cc me.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

How to "add all three header styles" in lyx 2.2.0

Post by scottkosty »

colinkeenan wrote:Yes, I am familiar with git and have already started editing the User Guide to include those changes I mentioned in my answer above. I will email the diff file to the developer list when done, and ask them to cc me.
Great, thanks for helping with this! Future LyX users will appreciate your work.
colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

I had emailed the diff file just minutes after my previous post, but I am worried because it doesn't really show just the lines I changed. I guess because I used LyX 2.2.0 and the previous version was written in LyX 2.0.0, it shows every single line of the file has been modified. With on the order of 10,000 changes showing, I have my doubts about how quickly this patch will be adopted. I actually only added a few sentences.
colinkeenan
Posts: 6
Joined: Mon Jun 20, 2016 5:08 am

Re: How to "add all three header styles" in lyx 2.2.0

Post by colinkeenan »

It was my mistake when I followed these instructions: http://www.lyx.org/HowToUseGIT, I followed them blindly, and patched branch 2.0.x instead of 2.2.x. Now, I've sent the patch against the correct branch, but they had responded to the first patch asking for the modified document using change tracking to indicate where I made changes. Is change tracking a feature of LyX?
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Re: How to "add all three header styles" in lyx 2.2.0

Post by scottkosty »

yes, you can turn change tracking on with ctrl + shift + e or Document > Change Tracking > Track Changes.

You might want to ask if 2.2.x is the correct branch. There are several development branches.
Post Reply