0

I need the name of the author to appear on the even pages of the article, and the name of the article to appear on the odd pages of the article. Thats what i need.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 10 '21 at 21:28

2 Answers2

2

The first answer is for a book. For an article a possible template answering your question is this one:

\documentclass[12pt,a4paper,twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx,lipsum}
\usepackage{fancyhdr}
\setlength{\headheight}{5pt}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1pt}

\fancyhf{}

\fancyhead[LE,RO]{\thepage} \fancyhead[LO]{\small\scshape My life's adventures} \fancyhead[RE]{\small\itshape John F. Master} \fancypagestyle{plain}{% \fancyhead{} % get rid of headers \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{1pt} % and the line } \pagestyle{fancy}

\begin{document} \section{One} \lipsum[1-20] \section{Two} \lipsum[20-45] \section{Three} \lipsum[30-52] \section{Four} \lipsum[61-90] \end{document}

  • It looks really weird, as if the text shifts itself from page to page. From left to right and so on. Also i need it above the line --------------Vuk Stojiljkovic for the anem and above the line the name of the title --------------page – Vuk Stojiljkovic Nov 10 '21 at 22:30
  • @Vuk Stojiljkovic You have the lines in the heather. I changed two '0' in two '1' in my answer. In any case my answer respond to your request. If you want more style you have to work my template with sections, subsections, paragraphs, pictures, tables... – Raffaele Santoro Nov 10 '21 at 22:53
  • Thank you very much! One more question, how to get ridd of the big line on the first page. It looks really weird. Its still not centered, every page. Looks still a bit from left to right.... – Vuk Stojiljkovic Nov 10 '21 at 23:17
  • On the first page with the title there is a big line -----------above the title. Need it removed and its perfect! – Vuk Stojiljkovic Nov 10 '21 at 23:17
  • @ Vuk \fancypagestyle{plain}{% \fancyhead{} % get rid of headers \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{0pt} % <<<--- changed } \pagestyle{fancy}

    \begin{document} \thispagestyle{plain} % <<<--- added \section{One} Now you can add the green check for accepted answer.

    – Raffaele Santoro Nov 10 '21 at 23:24
1

Try this template:

\documentclass[12pt,a4paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx,lipsum}
\usepackage{fancyhdr}
\setlength{\headheight}{5pt}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}

\fancyhf{}

\fancyhead[LE,RO]{\thepage} \fancyhead[LO]{\small\itshape John F. Master} \fancyhead[RE]{\small\scshape My life's adventures} \fancypagestyle{plain}{% \fancyhead{} % get rid of headers \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{0pt} % and the line } \pagestyle{fancy}

\begin{document} \tableofcontents

\chapter{One}
\thispagestyle{plain}
\lipsum[1-20]
\chapter{Two}
\thispagestyle{plain}
\lipsum[20-45]
\chapter{Three}
\thispagestyle{plain}
\lipsum[30-52]
\chapter{Four}
\thispagestyle{plain}
\lipsum[61-90]

\end{document}