LyXFancy Header in Lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Joe2718
Posts: 4
Joined: Mon Mar 27, 2017 6:22 pm

Fancy Header in Lyx

Post by Joe2718 »

I have a master lyx file with two children as a simple test situation to help my understanding of Lyx.
When I view the master as a pdf it displays OK.
I decided to add the fancy header package by doing in my master document "Document Settings->Page Layout->fancy.
In the preamble I wrote the single line \lhead{Joe}.
The master document would not display as a pdf, I got the error:Class scrbook Error: undefined old font command \se.

I would appreciate your help.
Thank you,
Joe

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Fancy Header in Lyx

Post by Johannes_B »

fancyhdr used to use font commands that are deprecated for over 20 years. It has been fixed in 2016.

To avoid the message, you have to update package fancyhdr or give the global option enabledeprecatedfontcommands.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Joe2718
Posts: 4
Joined: Mon Mar 27, 2017 6:22 pm

Fancy Header in Lyx

Post by Joe2718 »

I added \enabledeprecatedfontcommands to the preamble and I get the error "Undefined Control Sequence"
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Fancy Header in Lyx

Post by Johannes_B »

Global option, no command.
I don't know how to do this with LyX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Fancy Header in Lyx

Post by torbjorn t. »

Go to Document --> Settings --> Document Class: add enabledeprecatedfontcommands in the text field marked Custom.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Fancy Header in Lyx

Post by Johannes_B »

As Ulrike just pointed out, A simple \renewcommand\sf{\normalfont\sffamily} or \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} should work too.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Joe2718
Posts: 4
Joined: Mon Mar 27, 2017 6:22 pm

Fancy Header in Lyx

Post by Joe2718 »

Thanks, it worked.
It should have been mention in section 3.4 of the additional features doc.
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Fancy Header in Lyx

Post by scottkosty »

Joe2718 wrote:Thanks, it worked.
It should have been mention in section 3.4 of the additional features doc.
If you have any suggestions for improving the documentation, please write to lyx-docs@lists.lyx.org. If you are interested in volunteering to implement the changes yourself, we would appreciate the help! Please get in touch (at that email address) before spending time though.

Note that we've made several improvements related to these font commands for the future LyX 2.3.0 release. If you post a minimal .lyx example file, I can let you know whether this particular issue has been fixed.
Post Reply