documentclass[a4paper,12pt,twoside]{book} usepackage[english]{babel} usepackage[utf8]{inputenc} usepackage{fancyhdr,lipsum} pagestyle{fancy} fancyhf{} fancyhead[LE,RO]{Wynokane w LaTeX} fancyhead[RE,LO]{Opisy i poradniki} fancyfoot[CE,CO]{leftmark} rhead{SZTYWNY} begin{document} test newpage test newpage rhead{leftmark} chapter{Sample Chapter} section{New section} test newpage test chapter{eldo} section{na wolno} test newpage test end{document}