0

I need the page number in top right but I do not want the section show in header.. is there another way to do that?

enter image description here

1
  • On TeX.SX you will almost always get solutions that are really easy to deal with when using normal LaTeX, but harder to implement in the complex LyX environment. You will get LyX-specific suggestions on the mailing list [email protected]
    – Johannes_B
    Apr 4, 2016 at 7:44

1 Answer 1

2

Change the pagestyle in your preamble with either fncyhdr or titleps. Example with titleps:

\usepackage{titleps}
\renewpagestyle{plain}{%
\headrule %% if you want a rule
\sethead[\thepage][][]{}{}{\thepage}
\setfoot{}{}{}
}%
\pagestyle{plain}
6
  • how to use these packages? I'm a new user of lyx..please help me so I just copy it and paste it in preamble..I tried to paste this example but it did not work
    – Jeje Zzz
    Mar 31, 2016 at 17:42
  • Could you post a minimal (non-)working example?
    – Bernard
    Mar 31, 2016 at 18:13
  • @JejeZzz note that in LyX, you can go to Document > Settings > Page Layout and set "Page style" to "fancy" in order to load the fancyhdr package. After you set that, copy the rest (i.e. everything except the first line) of Bernard's proposed code into Document > Settings > LaTeX Preamble. LyX does not have built-in support for the "titleps" package, but this can of course be loaded manually in the preamble.
    – scottkosty
    Mar 31, 2016 at 22:18
  • nothing did work
    – Jeje Zzz
    Apr 2, 2016 at 21:48
  • I had forgotten a pair of braces in pagestyle{plain}. Also, check if the code doesn't load fancyhdr` in addition to titleps – this would result in a conflict.
    – Bernard
    Apr 2, 2016 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .