依高度分割字幕?

依高度分割字幕?

我有一個完整的頁面圖,例如 8.5x11 完整的,而不僅僅是全文區域。

我透過執行以下操作來新增該圖:

\begin{figure}[p]
    \vspace*{-1.0in}

    \makebox[\textwidth]{\includegraphics{../02_Figures/IntroductionChapter/Fig01.pdf}}
    \vspace*{-2.0in}
    \caption{Long long caption here. }

\end{figure}

該圖廣告很好,並且根據我的需要位於頁面中央。

標題向上移動,但它很長,所以我需要將其拆分到下一頁。我嘗試使用標題包和 \ContinuedFloat

\begin{figure}[b]\ContinuedFloat
    \caption{More of long caption here}
\end{figure}

1)這需要我手動分割標題,這有點乏味,因為我有近100個圖。有什麼方法可以設定“標題高度”,以便它根據我給出的參數自動在第一個標題和後續標題之間分割?就像 3 行分割後一樣?或者在 0.75 英吋之後,拆分到下一個繼續浮動?

2)我可以讓連續浮動中的第二個標題在其上方有一條小線,就像使用 \footnote{} 時發生的情況一樣嗎?

編輯

我相信我有一個 MWE 來指示正在發生的事情。

\documentclass[12pt]{report}
\usepackage{blindtext}
\usepackage{graphicx}

%   Page Captioning
    \usepackage[font=footnotesize]{caption}
    \DeclareCaptionLabelFormat{continued}{#1 ˜#2 (cont.)} % Define a 'continued' label. Then what the label should look like
    \captionsetup[ContinuedFloat]{labelformat=continued} % Now use that label format for captions of continued floats

%
%   Page Margins and Page Layout
%
    \usepackage[letterpaper]{geometry}

    % Make new variables for what the margins will be.
    \newcommand{\pageMargin}{1.0in}
    \newcommand{\pageMarginLeft}{1.5in}

    %For now, figure vertical offsets just match \pageMargin. And each figure needs to make it's own margin. This could be adjusted to something else though
    \newcommand{\fullFigVOffset}{\pageMargin} 

    % Define page geometry
    \geometry{margin=\pageMargin}

%   Page Spacing
    \usepackage{setspace}
    \doublespacing

\begin{document}

\chapter{Introduction}  

\blindtext[5]
        \begin{figure}[p]
    \vspace*{-\fullFigVOffset} % Note the negative

    \makebox[\textwidth]{\includegraphics[height=11in]{example-image}}

    \vspace*{-\fullFigVOffset} % 
    \vspace*{-\fullFigVOffset} % 

    \caption{\blindtext[3]}

    \label{GInt_01} % Label must come after figure Caption to reference correctly

\end{figure}

\begin{figure}[b]\ContinuedFloat
    \caption{I want the caption above to split at the 'regular' page margins to here.}
\end{figure}

\blindtext[6]

\end{document}

縮小這個數字將會很困難。由於這些是共享的圖形,這需要保留兩個版本,因為其他人將需要完整的頁面圖形來完成他們的工作。

另外,無論如何,裁剪似乎並不能真正解決我的問題,它只是允許我擺脫(-)vspace來將標題向上移動。標題對於頁面來說仍然太長,需要拆分。

答案1

標題本身不能被破壞,所以我改為分割內容。這意味著圖1.1圖 1.1(續)必須與內容放在單獨的行上。我調整了長度以包括這條線 和\abovecaptionskip

\documentclass[12pt]{report}
\usepackage{blindtext}
\usepackage{graphicx}

%   Page Captioning
    \usepackage[font=footnotesize,labelsep=newline]{caption}
    \DeclareCaptionLabelFormat{continued}{#1 ˜#2 (cont.)} % Define a 'continued' label. Then what the label should look like
    \captionsetup[ContinuedFloat]{labelformat=continued} % Now use that label format for captions of continued floats

\renewcommand{\bottomfraction}{0.7}% for VERY large bottom floats

\newsavebox{\splitbox}
\newsavebox{\contbox}

\newcommand{\splitcaption}[3][\empty]% #1 = short caption (optional), #2 = caption, #3 = length before split
{\bgroup
  \footnotesize 
  \setbox0=\vbox{#2}%
  \dimen0=#3\relax
  \advance\dimen0 by -\baselineskip
  \advance\dimen0 by -\abovecaptionskip
  \setbox1=\vsplit0 to \dimen0
  \global\setbox\splitbox=\box1
  \global\setbox\contbox=\box0
\egroup
\ifx\empty#1\relax
  \caption[#2]{\usebox\splitbox}%
\else 
  \caption[#1]{\usebox\splitbox}%
\fi}

\newcommand{\contcaption}{\ifdim\ht\contbox>0pt
  \begin{figure}[b]\ContinuedFloat
    \footnoterule
    \caption[]{\usebox\contbox}% no entry in LOF
  \end{figure}
\fi}

%
%   Page Margins and Page Layout
%
    \usepackage[letterpaper]{geometry}

    % Make new variables for what the margins will be.
    \newcommand{\pageMargin}{1.0in}
    \newcommand{\pageMarginLeft}{1.5in}

    %For now, figure vertical offsets just match \pageMargin. And each figure needs to make it's own margin. This could be adjusted to something else though
    \newcommand{\fullFigVOffset}{\pageMargin} 

    % Define page geometry
    \geometry{margin=\pageMargin}

%   Page Spacing
    \usepackage{setspace}
    \doublespacing

\begin{document}
\listoffigures

\ref{GInt_01}

\chapter{Introduction}  

\blindtext[5]
        \begin{figure}[p]
    \vspace*{-\fullFigVOffset} % Note the negative

    \makebox[\textwidth]{\includegraphics[height=11in]{example-image}}

    \vspace*{-\fullFigVOffset} % 
    \vspace*{-\fullFigVOffset} % 

    \splitcaption[short caption]{\blindtext[3]}{1in}
    \label{GInt_01}% Label must come after figure Caption to reference correctly
\end{figure}
\contcaption

\blindtext[6]

\end{document}

相關內容