如何删除图表列表(LoF)中不需要的缩进

如何删除图表列表(LoF)中不需要的缩进

问题:

正如您在下文中看到的,在图 2.3 的内容之前我有一个不必要的缩进。

意图问题

细节:

我认为这是标题中的多行引起的,因为在单行的情况下它消失了。我使用伊斯坦布尔理工大学的一些人自愿提供的课程来满足学院的论文模板。下面给出了这门课的链接。

论文_itu.cls

此外,本课程还提供了与 LoF 相关的具体部分,以便于理解。

\newlength{\LoFparskip}     %% List of Figure parskip 08-05-2006
\setlength{\LoFparskip}{0em}

\newcommand{\LoFspacing}{\setlength{\baselineskip}{1.0\defbaselineskip}}               %%\LoFspacing = 1.0*\defbaselineskip 08-05-2006

\newif\if@loflotpagebold\@loflotpageboldtrue % If LOF and LOT page numbers are bold or not - SBÖ

\def\@lofline#1#2#3#4#5{
\vskip 1\p@
\ifnum #1=\c@tocdepth \else
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
    \parindent #2\relax\@afterindenttrue
    \interlinepenalty\@M \normalsize                    % normalsize font - SBÖ
    \leavevmode %\bfseries                              % sections, subsections, subsubsections unbolded - SBÖ
    \@tempdima #3\relax
    \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
    {#4}\nobreak
    \if@ToCisDotted
    \leaders\hbox{$\m@th\hbox{.}$}                      %cleaders or xleaders is more flush than leaders - SBÖ
    %        \mkern \@dotsep mu\hbox{.} \mkern\@dotsep
    %         mu$}
    \fi
    \hfill
    %\nobreak
    %\nobreak\hb@xt@\@pnumwidth{\dotfill #5} % Removed - SBÖ \hss #5
    \hfil\nobreak\if@loflotpagebold\bfseries\fi#5 % Added to make the dots come next to the page numbers with bold page numbers - SBÖ
    \par}
\fi}

\newcommand{\firstsubcaption}[2][\empty]% #1 = short caption (optional), #2 = caption 
{%\refstepcounter{figure}
    \refstepcounter{subfigure}
    \ifx#1\empty
    \addcontentsline{lof}{figure}{\string\numberline {\thefigure\alph{subfigure}}{\ignorespaces #2 \relax}}
    \else
    \addcontentsline{lof}{figure}{\string\numberline {\thefigure\alph{subfigure}}{\ignorespaces #1 \relax}}
    \fi
    \makecaption{\figurename#1~\thefigure\alph{subfigure} :}{~\normalfont#2}}

\newcommand{\nextsubcaption}[2][\empty]% #1 = short caption (optional), #2 = caption
{\refstepcounter{subfigure}
    \ifx#1\empty
    \addcontentsline{lof}{figure}{\string\numberline {\thefigure\alph{subfigure}}{\ignorespaces #2 \relax}}
    \else
    \addcontentsline{lof}{figure}{\string\numberline {\thefigure\alph{subfigure}}{\ignorespaces #1 \relax}}
    \fi
    \makecaption{\figurename#1~\thefigure\alph{subfigure} :}{~\normalfont#2}}

\renewcommand*\l@table{\@lofline{1}{0em}{5.5em}}
\renewcommand*\l@figure{\@lofline{1}{0em}{6em}}                     % {1}{0em}{5.5em}} - SBÖ

%======================================== LOF PAGE SETTINGS =========================================== - SBÖ  
\renewcommand\listoffigures{
    %\vspace*{\ChapterUstenBosluk}              % This is not effective - SBÖ
    {\chapter*{\listfigurename}
    \vspace*{-18pt}
    \renewcommand{\ULdepth}{4pt}                % Added using ulem package for \uline command - SBÖ
    \renewcommand{\ULthickness}{1.5pt}          % Added for underline tickness change which was 0.4pt - SBÖ
    \if@Ingilizce\hfill\vspace*{0truecm}{\bf\uline{Page}}~\else~\hfill\vspace*{0truecm}{\bf\uline{Sayfa}}\fi}\\ % Instead of \underline{text} - SBÖ
%\hfill\vspace*{0.5truecm}{\bf\underline{\if@Ingilizce Page\else Sayfa\fi}}}

    \let\orig@numberline\numberline
    \@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}
    \renewcommand*{\numberline}[1]{
    \orig@numberline{\bf\figurename\ ##1}\hspace{-8pt}{\bf:}\hspace{4pt}} % Better spacing - SBÖ
    \addcontentsline{toc}{part}{\bf{\protect\listfigurenameToC}}
    \setlength{\th@oldparskip}{\parskip}
    \setlength{\parskip}{\LoFparskip}
    \@starttoc{lof}
    \setlength{\parskip}{\th@oldparskip}
    \let\numberline\orig@numberline
    }

下面的部分与有关\makecaption

\newcommand{\makecaption}[2]% #1 = caption head, #2 = caption text
{\savebox{\tempbox}{#1#2}
    \ifdim\wd\tempbox>\textwidth
    \settowidth{\tempwidth}{#1}
    \savebox{\tempbox}{\parbox{\textwidth}
        {\hangindent=\tempwidth
            \hangafter=1
            \makebox[\tempwidth][l]{#1}#2}}
    \fi
    \vskip\abovecaptionskip
    {\centering\usebox{\tempbox}\par}
    \vskip\belowcaptionskip\hbox{}}

我想做的事:

我对 LaTex 中的类不熟悉,我只创建基本文档。那么,我该如何删除这个不需要的缩进?

提前致谢。

答案1

如果您查看thesis.pdfgithub 上 İTÜ 论文模板存储库中文件的第 xvii 页,您将看到这种行为,从第一个标题跨越多行开始(表 2.3)。

在此处输入图片描述

在以或结尾%的每一行末尾附加似乎可以解决问题。{}\renewcommand\listoftables{%\renewcommand\listoffigures{%

在此处输入图片描述

相关内容