我添加了很多图像,大约 100 张。因此,我像这样添加它们:
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
%\usepackage{subcaption}
\begin{document}
\begin{figure}[h!]
\ContinuedFloat
\centering
\includegraphics[scale=0.38]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PtBalance_type0.pdf}%
\includegraphics[scale=0.38]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj2_phi.pdf}
\caption{control plots 18}
\end{figure}
\end{document}
对于第一个补丁,我没有添加,\ContinuedFloat
之后我为每个补丁添加了\ContinuedFloat
。它工作正常,直到上面的 17 个类似补丁(即 34 张图片)。当我添加第 18 个补丁以包含另外两个图像时,我收到以下错误,但我无法理解发生了什么。当我谷歌搜索时,它显示这种情况发生是因为ContinuedFloat
假设标题,我添加了所有标题,即使这样它仍然不起作用。
错误:
! LaTeX Error: Too many unprocessed floats.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.147 \begin{figure}[ht!]
?
! Undefined control sequence.
\@xfloat ...@fltovf \fi \global \setbox \@currbox
\color@vbox \normalcolor \...
l.147 \begin{figure}[ht!]
?
! Missing number, treated as zero.
<to be read again>
\color@vbox
l.147 \begin{figure}[ht!]
?
<Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarCon
trolRegion_CHS_PtBalance_type0.pdf, id=43, 569.12625pt x 552.0625pt>
<use Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBa
rControlRegion_CHS_PtBalance_type0.pdf>
<Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarCon
trolRegion_CHS_PuppiAK8_jet_sj2_phi.pdf, id=44, 569.12625pt x 552.0625pt>
<use Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBa
rControlRegion_CHS_PuppiAK8_jet_sj2_phi.pdf>
! Undefined control sequence.
\@largefloatcheck ->\ifdim \ht \@currbox
>\textheight \@tempdima -\textheigh...
l.153 \end{figure}
?
! Missing number, treated as zero.
<to be read again>
>
l.153 \end{figure}
?
! Undefined control sequence.
<argument> \@currbox
l.153 \end{figure}
?
! Argument of \@xnext has an extra }.
<inserted text>
\par
l.153 \end{figure}
?
Runaway argument?
\@currbox \@currlist \ifnum \count \@currbox >\z@ \advance \@pageht \@pagedp \E
TC.
! Paragraph ended before \@xnext was complete.
<to be read again>
\par
l.153 \end{figure}
?
! Extra \else.
\end@float ...pdima \penalty \@floatpenalty \else
\vadjust {\penalty -\@Miv ...
l.153 \end{figure}
?
! You can't use `\vadjust' in vertical mode.
\end@float ...nalty \@floatpenalty \else \vadjust
{\penalty -\@Miv \vbox {}\...
l.153 \end{figure}
?
! Argument of \@xnext has an extra }.
<inserted text>
\par
l.153 \end{figure}
?
Runaway argument?
\@currbox \@currlist \ifnum \count \@currbox >\z@ \advance \@pageht \@pagedp \E
TC.
! Paragraph ended before \@xnext was complete.
<to be read again>
\par
l.153 \end{figure}
?
[2 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTB
arControlRegion_CHS_nBTagJet_medium.pdf, page is rotated 90 degrees> <./Plots/C
ontrolPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegi
on_CHS_PuppiAK8_jet_sj2_pt.pdf, page is rotated 90 degrees> <./Plots/ControlPlo
ts/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_AK
8_mass_so.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_
08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_v_mt.pdf, page is r
otated 90 degrees>]
! LaTeX Error: Float(s) lost.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.663 \end{document}
?
[3 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTB
arControlRegion_CHS_PuppiAK8_jet_sj2_q.pdf, page is rotated 90 degrees> <./Plot
s/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlR
egion_CHS_ZeppenfeldWH_new.pdf, page is rotated 90 degrees> <./Plots/ControlPlo
ts/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_AK
8_mass_pr.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_
08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj2_et
a.pdf, page is rotated 90 degrees>] [4 <./Plots/ControlPlots/TTbar/2017_12_08_0
1h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_phi_type0.pdf, page is
rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoosted
ElMuCuts13TeV_TTBarControlRegion_CHS_vbf_maxpt_j2_pt.pdf, page is rotated 90 de
grees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV
_TTBarControlRegion_CHS_deltaphi_metak8jet.pdf, page is rotated 90 degrees> <./
Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarCont
rolRegion_CHS_costheta1_type0.pdf, page is rotated 90 degrees>] [5 <./Plots/Con
trolPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion
_CHS_vbf_maxpt_jj_m.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTba
r/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_lepton_e.
pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/D
ibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj1_q.pdf, page
is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoos
tedElMuCuts13TeV_TTBarControlRegion_CHS_Puppi_AK8_jet_tau2tau1.pdf, page is rot
ated 90 degrees>] [6 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBooste
dElMuCuts13TeV_TTBarControlRegion_CHS_ZeppenfeldWL_type0_new.pdf, page is rotat
ed 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuC
uts13TeV_TTBarControlRegion_CHS_nBTagJet_loose.pdf, page is rotated 90 degrees>
<./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBar
ControlRegion_CHS_ungroomed_PuppiAK8_jet_phi.pdf, page is rotated 90 degrees> <
./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarCo
ntrolRegion_CHS_TempWWRapidity.pdf, page is rotated 90 degrees>] [7 <./Plots/Co
ntrolPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegio
n_CHS_phi1_type0.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2
017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_ZeppenfeldWH
.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/
DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj1_eta.pdf, pa
ge is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonB
oostedElMuCuts13TeV_TTBarControlRegion_CHS_lepton_eta.pdf, page is rotated 90 d
egrees>] [8 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts
13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj1_m.pdf, page is rotated 90 degrees
> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBa
rControlRegion_CHS_costheta2_type0.pdf, page is rotated 90 degrees> <./Plots/Co
ntrolPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegio
n_CHS_BDT_response.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar
/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_v_pt.pdf,
page is rotated 90 degrees>] [9 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/Di
bosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_vbf_maxpt_j1_pt.pdf, page is r
otated 90 degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedE
lMuCuts13TeV_TTBarControlRegion_CHS_VBSCentrality_type0.pdf, page is rotated 90
degrees> <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13
TeV_TTBarControlRegion_CHS_vbf_maxpt_j2_eta.pdf, page is rotated 90 degrees> <.
/Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarCon
trolRegion_CHS_ungroomed_PuppiAK8_jet_pt.pdf, page is rotated 90 degrees>]
[10 <./Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TT
BarControlRegion_CHS_ZeppenfeldWL_type0.pdf, page is rotated 90 degrees> <./Plo
ts/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControl
Region_CHS_PuppiAK8_jet_sj1_pt.pdf, page is rotated 90 degrees> <./Plots/Contro
lPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CH
S_nu_pz_type0.pdf, page is rotated 90 degrees> <./Plots/ControlPlots/TTbar/2017
_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_AK8_mass_tr.pdf
, page is rotated 90 degrees>] (./DataTex.aux) )
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifx on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)
(\end occurred when \ifnum on line 153 was incomplete)</usr/share/texmf/fonts/t
ype1/bluesky/cm/cmbx12.pfb></usr/share/texmf/fonts/type1/bluesky/cm/cmr10.pfb>
Output written on DataTex.pdf (10 pages, 1113553 bytes).
答案1
正如 @David 所说,这是旧版本 latex 的问题。但是,由于某种原因,我无法更新。但这个问题已通过使用\begin{tabular}
而不是得到解决\ContinuedFloat
。如下所示:
\begin{figure}[htbp]
\centering
\begin{tabular}{cc}
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_vbf_maxpt_jj_m.pdf}
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_lepton_e.pdf}\\
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_PuppiAK8_jet_sj1_q.pdf}
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_Puppi_AK8_jet_tau2tau1.pdf}\\
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_ZeppenfeldWL_type0_new.pdf}
\includegraphics[width=0.45\textwidth]{Plots/ControlPlots/TTbar/2017_12_08_01h14/DibosonBoostedElMuCuts13TeV_TTBarControlRegion_CHS_nBTagJet_loose.pdf}
\end{tabular}
\caption{Comparison plots between data and MC for different observables. From top to bottom:}
\label{fig:CR_1}
\end{figure}