Document ClassesDifferent header for odd and even pages

Information and discussion about specific document classes and how to create your own document classes.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Different header for odd and even pages

Post by Johannes_B »

It is important to make the code as minimal as possible. You can only achieve that by trial and error (or experience). In your case, babel is interfering and you need to use babels mechanism.

Code: Select all

\documentclass[12pt, twoside, a4paper]{book}
\usepackage[portuguese,english]{babel}

\addto\captionsenglish{%
\renewcommand{\bibname}{References}}
\addto\captionsportuguese{%
\renewcommand{\bibname}{something portuguese}}
\begin{document}
\begin{thebibliography}{}
\bibitem{Miller} Miller WG. The neuropsychology of head injuries. The neuropsychology handbook; behavioural and clinical perspectives. New York: Springer 1986; 347-375
\end{thebibliography}{}
\selectlanguage{portuguese}
\begin{thebibliography}{}
\bibitem{MillerB} Miller WG. The neuropsychology of head injuries. The neuropsychology handbook; behavioural and clinical perspectives. New York: Springer 1986; 347-375
\end{thebibliography}{}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Different header for odd and even pages

Post by paulosousa »

For now it worked, thanks a lot bu the document continues to have (only the word) References in a page, next page is empty and the references are in the next one ... :(
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Different header for odd and even pages

Post by Johannes_B »

This does not happen in the example i gave you! You are doing something different and it is your responsibility to find this difference. I cannot see your (complete) code. Remember, there is no reason to write \chapter*{References}!
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Different header for odd and even pages

Post by paulosousa »

Removed

Code: Select all

\chapter*{References}
thanks a lot!
Post Reply