In some classes fancyhdr is not the solution. However we can expect
the layouts to provide the right environments already. In this case
they can be made incompatible with the
new module, can't they?

fancyhdr can be used with all document classes. See for example my example file that uses KOMA-script article. To my knowledge there are only 2 document classes providing their own commands to set headers/footers. Therefore the module is at least useful for all other classes.

Moreover, my example file demonstrates that fancyhdr doesn't interfer with KOMA-scripts own commands. I use there e.g. KOMA-scripts \markboth command as argument of \lhead.

I did a lot of testing today and haven't found a case where loading the module makes documents uncompilable although this can in general happen with every module we have. Attached is a slightly improved version of the module file.


---------
Richard asked:

> Finally, there can be issues about the header or footer getting too
> tall, if I remember right. Is that correct? If so, should we do
> something to help people there?

There is nothing we can do about this - people have to take care of this. I have seen files where they are only using a center header and put there a logo that spans most of the whole page width. There is no way to guide the user because everything is allowed here and it depends on the user what he likes.

regards Uwe
#\DeclareLyXModule[fancyhdr.sty]{Custom Header/Footerlines}
#DescriptionBegin
#Adds 6 commands to be able to define header and footer lines
#NOTE: To use this mudule you must set the "Headings style" in 
#      the menu Document Settings -> Page Layout to "fancy"!
#DescriptionEnd

Format 28

Style "Left Header"
  Category              FrontMatter
  Margin                First_Dynamic
  LatexType             command
  LabelType             Static
  LabelSep              xx
  LatexName             lhead
  LabelString           "Left Header:"
  OptionalArgs          1
  KeepEmpty             1
  ParSkip               0
  TopSep                0
  BottomSep             0
  ParSep                0
  LabelFont
          Color         Green
  EndFont
End

Style "Center Header"
  CopyStyle             "Left Header"
  LatexName             chead
  LabelString           "Center Header:"
End


Style "Right Header"
  CopyStyle             "Left Header"
  LatexName             rhead
  LabelString           "Right Header:"
End


Style "Left Footer"
  CopyStyle             "Left Header"
  LatexName             lfoot
  LabelString           "Left Footer:"
End


Style "Center Footer"
  CopyStyle             "Left Header"
  LatexName             cfoot
  LabelString           "Center Footer:"
End


Style "Right Footer"
  CopyStyle             "Left Header"
  LatexName             rfoot
  LabelString           "Right Footer:"
End

Reply via email to