我有一系列图表,根据边距设置,这些图表的标题行有几十行被拆分,只有这一行除外。如果我在图表标题中添加一个单词,该行就会被正确拆分,问题就解决了,因此,相对于我的整体边距设置,该特定图表标题中的文本长度似乎处于“边界线”状态。还有其他方法可以拆分该单个标题行,而无需添加单词或更改边距设置吗?
这里是所需的 MWE:
\documentclass[11pt,oneside,english,singlespacing,headsepline]{MastersDoctoralThesis} % The class file specifying the document structure
\usepackage[cp1252]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[none]{hyphenat} % Hyphenation control
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
%------------------------------------------------------------------
% MARGIN SETTINGS
%------------------------------------------------------------------
\geometry{
paper=a4paper, % Change to letterpaper for US letter
inner=2.5cm, % Inner margin (original: 2.5cm)
outer=3.8cm, % Outer margin (original: 3.8cm)
bindingoffset=.5cm, % Binding offset
top=2.0cm, % Top margin (original: 1.5cm)
bottom=1.0cm, % Bottom margin (original: 1.5cm)
%showframe, % Uncomment to show how the type block is set on the page
}
\usepackage{tocloft} % manipulation of lists of contents, figures, and tables
% larger indentation for lists of contents, figures, and tables
\renewcommand{\cftchapindent}{0 em}
\renewcommand{\cftchapnumwidth}{1.5 em}
\renewcommand{\cftsecindent}{1.5 em}
\renewcommand{\cftsecnumwidth}{2.3 em}
\renewcommand{\cftsubsecindent}{3.8 em}
\renewcommand{\cftsubsecnumwidth}{3.2 em}
\renewcommand{\cftsubsubsecindent}{7.0 em}
\renewcommand{\cftsubsubsecnumwidth}{4.1 em}
\renewcommand{\cftfigindent}{1.5 em}
\renewcommand{\cftfignumwidth}{3.2 em} %3.2em instead of original 2.3em
\renewcommand{\cfttabindent}{1.5 em}
\renewcommand{\cfttabnumwidth}{3.2 em} %3.2em instead of original 2.3em
%---------------------------------------------------------------------
% THESIS INFORMATION
%---------------------------------------------------------------------
\thesistitle{Thesis Title} % Your thesis title, this is used in the title and abstract, print it elsewhere with \ttitle
\author{John \textsc{Smith}} % Your name, this is used in the title page and abstract, print it elsewhere with \authorname
\keywords{} % Keywords for your thesis, this is not currently used anywhere in the template, print it elsewhere with \keywordnames
%-------------------------------------------------------------------------
% HYPERLINKS, BOOKMARKS, ETC.
%-------------------------------------------------------------------------
\usepackage{hyperref}
\usepackage{cleveref}
\AtBeginDocument{
\hypersetup{pdftitle=\ttitle} % Set the PDF's title to your title
\hypersetup{pdfauthor=\authorname} % Set the PDF's author to your name
\hypersetup{pdfkeywords=\keywordnames} % Set the PDF's keywords to your keywords
\hypersetup{allcolors=blue,colorlinks=true,linktocpage,bookmarksopen,bookmarksnumbered} % SOFTCOVER/ SOFTCOPY (all hyperlinks in blue)
}
\usepackage{bookmark}
\begin{document}
\sloppy
\pdfbookmark[0]{TITLE}{title}
\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages
\pagestyle{thesis} % Default to the plain heading style until the thesis style is called for the body content
\begin{titlepage}
\centerline{\Large{\textsc{Doctoral dissertation}}}
\noindent
\begin{center}
\large \textbf{TITLE}
\end{center}
\vspace*{0.1cm}\par
\noindent
\end{titlepage}
\cleardoublepage % for alternating margins
\pagenumbering{roman} % for unnumbered title and first blank page
\setstretch{1.25} % Line spacing of 1.25
%---------------------------------------------------------------------------
% LIST OF CONTENTS/FIGURES/TABLES PAGES
%---------------------------------------------------------------------------
%\phantomsection
\pdfbookmark[0]{\contentsname}{toc}
\tableofcontents % Prints the main table of contents
%\clearpage % Start a new page
\cleardoublepage % for alternating margins
%\phantomsection
\pdfbookmark[0]{List of Figures}{lof}
%\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures % Prints the list of figures
%\clearpage % Start a new page
\cleardoublepage % for alternating margins
%\phantomsection
\pdfbookmark[0]{List of Tables}{lot}
%\addcontentsline{toc}{chapter}{List of Tables}
\listoftables % Prints the list of tables
%\clearpage % Start a new page
%\cleardoublepage % for alternating margins
\mainmatter % Begin numeric (1,2,3...) page numbering
\begin{figure}[H] %[htbp] %[H]
\centering
\caption{This is an example of a figure caption that behaves normally with regard to the left and right margins, line breaks, etc.\label{fig:1}}
\end{figure}
\begin{figure}[H] %[htbp]
\centering
\caption{This is another example of a figure caption that behaves normally with regard to the left and right margins, line breaks, etc.\label{fig:2}}
\end{figure}
\begin{figure}[H] %[htbp]
\centering
\caption{This is yet another example of a figure caption that behaves normally with regard to the left and right margins, line breaks, etc.\label{fig:3}}
\end{figure}
\begin{figure}[H] %[htbp]
\centering
\caption{This is an example of a figure caption that misbehaves so to say with regard to the left and right margins, line breaks, etc., unlike all others\label{fig:2}}
\end{figure}
\fussy
\end{document}