根据高度分割字幕?

根据高度分割字幕?

我有一个整页图形,比如 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}

图形广告很好,并且按照我的需要位于页面的中心。

标题被上移了,但它太长了,所以我需要把它拆分到下一页。我尝试使用 caption 包和 \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}

裁剪图表会很困难。因为这些是共享图表,这就需要保留两个版本,因为其他人需要整页图表来完成他们的工作。

此外,裁剪似乎并没有真正解决我的问题,它只是允许我去掉 (-) 垂直空间以将标题向上移动。标题对于页面来说仍然太长,需要拆分。

答案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}

相关内容