0

Edited

I am very new to LaTeX and I have just compiled my thesis using twoside (it had been oneside previously). On a few random horizontal pages the Chapter header (which has been shortened using \chaptermark{}) is offset and runs off the side.

enter image description here

Here is some compilable code and the image I use is attached:

\documentclass[12pt,twoside]{book} %,PageStyleII,times,numbering,print,custombib \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. \geometry{a4paper} % ... or a4paper or a5paper or ... \usepackage{floatrow} \usepackage{setspace} \usepackage{caption} \usepackage{subcaption} \usepackage{graphicx} \usepackage{lscape} %\usepackage{float} \usepackage{booktabs} \captionsetup[figure]{font={small}, skip=1pt, singlelinecheck=false} \captionsetup[subfigure]{font={small}, skip=1pt, singlelinecheck=false} \captionsetup{labelfont=bf} \captionsetup[table]{font={small}, skip=1pt, singlelinecheck=false} \raggedbottom \usepackage{lineno} \usepackage{mathtools} \usepackage[all]{nowidow} \usepackage{tocloft} \usepackage{xpatch} \usepackage{enumitem} %\usepackage{amssymb} \usepackage{cite} \usepackage{natbib} \renewcommand\bibname{References} \usepackage[nottoc]{tocbibind} \usepackage{appendix} \usepackage{chngcntr} \usepackage{longtable} \usepackage{color, colortbl} \definecolor{lightgray}{gray}{0.9} \floatsetup[table]{capposition=top} \usepackage{makecell} \begin{document} % ******************************** Main Matter ********************************* \mainmatter \chapter{Assessing the evidence for microenvironments in craters} \label{chap:micro} \chaptermark{Microenvironments in craters} %********************************** %5th Section ************************************** \section{The environment at Kaiser crater} Blah blah blah \subsection{Surface temperature} The blah blah blah \newpage blah blah \newpage \begin{landscape} \begin{figure}[H] \begin{center} \includegraphics[width=0.95\hsize]{Micro/windsx4_Kaiser_ls110.png} \caption{one page horizontal which plots ok.} \label{fig:ktsurf} \end{center} \end{figure} \newpage \begin{figure}[H] \begin{center} \begin{subfigure}{0.95\hsize} \subcaption{\bf SH mid-summer} \label{fig:ktsurf_110} \includegraphics[width=0.95\hsize]{Micro/windsx4_Kaiser_ls110.png} \end{subfigure} \caption{This plots chapter header offset.} \label{fig:ktsurf_winds} \end{center} \end{figure} \begin{figure}[H]\ContinuedFloat \begin{center} \begin{subfigure}{0.95\hsize} \subcaption{\bf SH late autumn} \label{fig:ktsurf_230} \includegraphics[width=0.95\hsize]{Micro/windsx4_Kaiser_ls110.png} \end{subfigure} \captionsetup{justification=centering} \caption[]{This plots OK} \end{center} \end{figure} \begin{figure}[H]\ContinuedFloat \begin{center} \begin{subfigure}{0.95\hsize} \subcaption{\bf SH early spring} \label{fig:ktsurf_350} \includegraphics[width=0.95\hsize]{Micro/windsx4_Kaiser_ls110.png} \end{subfigure} \captionsetup{justification=centering} \caption[]{This plots OK} \end{center} \end{figure} \end{landscape} \end{document} 

This only happens when the second horizontal page is on the right hand side / is an even page number. When I compiled it and the first horizontal page was on the right hand side, the rest was all fine.

Thanks enter image description here

5
  • 1
    As you said, it only appears in "apparently random places". So it would be vastly helpful if you can provide a compilable document that reproduces your issue. Commented Sep 15, 2023 at 8:39
  • 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. Commented Sep 15, 2023 at 8:41
  • Thanks, Willie. I have updated the code and included the image. Commented Sep 15, 2023 at 10:30
  • Do not make a single landscape environment, but one for each figure. Commented Sep 16, 2023 at 5:18
  • Worked perfectly! Thanks very much, Fran. Commented Sep 16, 2023 at 6:30

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.