How can I set different header for different sections. In this example I am looking for replacement of \SomeCommand
\documentclass{article}
\begin{document}
\SomeCommand{Header 1 define here} %this sets header for all pages until another \SomeCommand found
This is multi-page text
\newpage
\SomeCommand{Header 2 define here} %this changes the header to new
This is multi-page text
\end{document}
My document is NOT arranged in \section
and not a book. It is just plane text.
Best Answer
If there are no special layout requirements you can use the pagestyle
myheadings
. Then\SomeCommand
has to set\markright{<text>}
or maybe better\markboth{<text>}{<text>}
. The second works also if your document istwoside
.