TeX - LaTeX Asked by NLing on May 1, 2021
I have read through http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/caption/subcaption.pdf and could not find an answer. There are several questions with similar titles on here, but none of them seem to refer to the problem I am having.
I have three subfigures that I have split across a page, with (a) on page 6 and (b) and (c) on page 7. However, in the toc, it says (a) is on 6, but that (b) and (c) are on 8, which is not the case.
Update: I have edited the code below to include my entire preamble. However, I was able accidentally fix the problem, as I ended up needing to add an additional paragraph before this section that pushed them perfectly onto one page. However, I still have no idea how I would fix the problem should it occur again, so I am leaving it open to find out. Thank you all for your help!
documentclass[12pt, letterpaper]{article}
usepackage{fontspec}
setmainfont{Times New Roman}
usepackage{multicol}
usepackage{geometry}
usepackage{float}
usepackage{caption}
usepackage{subcaption}
DeclareCaptionListFormat{myfmt}{#1.#2}
usepackage[list=true,listformat=myfmt]{subcaption}
usepackage{graphicx}
graphicspath{ {./Figures/} }
usepackage{pgfplots}
pgfplotsset{width=10cm,compat=1.9}
usepackage[section]{placeins}
usepackage[labelfont=bf]{caption}
title{Phonotactic Effects on the Duration of Word-Initial Aspiration in English}
author{Large Noah M. Coen[.4cm]{Professor: Dr. Dylan Herrick}[.4cm]{Linguistics 3133: Phonetic Field Methods}}
date{October 8th, 2020}
usepackage[backend=biber,
style=authoryear]{biblatex}
addbibresource{HW5Latex.bib}
usepackage{libertine}
usepackage{hyperref}
usepackage[nottoc]{tocbibind}
begin{document}
addcontentsline{toc}{section}{Table of Contents}
tableofcontents
listoffigures
listoftables
maketitle
begin{figure}[H]
centering
caption{textbf{Waveform Analysis}}
label{psmethodss}
begin{flushleft}
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS1}
caption{Three Consecutive Utterances}
label{pstcu}
end{subfigure}
end{flushleft}
end{figure}
begin{figure}[H]ContinuedFloat
begin{flushleft}
centering
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS2}
caption{Single Utterance Selection}
label{psnsu}
end{subfigure}
linebreak
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS3}
caption{Measurement of Aspiration}
label{psmad}
end{subfigure}
end{flushleft}
end{figure}
FloatBarrier
end{document}
Thank you in advance for the help!!
Like in Wrong pagenumber in LoF for subfigures added via input either a "blank" caption or a phantomcaption
seems to help here:
documentclass[12pt, letterpaper, demo]{article}
%usepackage{fontspec}
%setmainfont{Times New Roman}
usepackage{multicol}
usepackage{geometry}
usepackage{float}
usepackage{caption}
usepackage{subcaption}
DeclareCaptionListFormat{myfmt}{#1.#2}
usepackage[list=true,listformat=myfmt]{subcaption}
usepackage{graphicx}
graphicspath{ {./Figures/} }
usepackage{pgfplots}
pgfplotsset{width=10cm,compat=1.9}
usepackage[section]{placeins}
usepackage[labelfont=bf]{caption}
title{Phonotactic Effects on the Duration of Word-Initial Aspiration in English}
author{Large Noah M. Coen[.4cm]{Professor: Dr. Dylan Herrick}[.4cm]{Linguistics 3133: Phonetic Field Methods}}
date{October 8th, 2020}
usepackage[backend=biber,
style=authoryear]{biblatex}
addbibresource{HW5Latex.bib}
usepackage{libertine}
usepackage{hyperref}
usepackage[nottoc]{tocbibind}
begin{document}
addcontentsline{toc}{section}{Table of Contents}
tableofcontents
listoffigures
listoftables
maketitle
begin{figure}[H]
centering
caption{textbf{Waveform Analysis}}
label{psmethodss}
begin{flushleft}
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS1}
caption{Three Consecutive Utterances}
label{pstcu}
end{subfigure}
end{flushleft}
end{figure}
begin{figure}[H]ContinuedFloat
phantomcaption % <----- This line added
begin{flushleft}
centering
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS2}
caption{Single Utterance Selection}
label{psnsu}
end{subfigure}
linebreak
begin{subfigure}[!h]{textwidth}
centering
includegraphics[scale=.5]{PSSS3}
caption{Measurement of Aspiration}
label{psmad}
end{subfigure}
end{flushleft}
end{figure}
clearpage
begin{figure}
caption{Whatever}
end{figure}
end{document}
Without the phantomcaption
the page numbers for the subfigures (b) and (c) are 4 (incorrect), but with phantomcaption
the page numbers are 3 (correct).
Correct answer by user205700 on May 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP