Adicionar recuos deslocados na lista de entradas de figuras em Latex

Adicionar recuos deslocados na lista de entradas de figuras em Latex

Estou escrevendo minha tese. No entanto, estou enfrentando um problema ao formatar a lista da Figura. Eu queria saber como adicionar recuos deslocados às legendas das figuras para que fiquem alinhadas à primeira linha. Estou usando a Classe Tese, que por padrão não escreve a palavra "Figura" e "Tabela" antes do Número da Figura

Saída inicial sem tocloft

Portanto, usei toclofto pacote para adicionar as palavras Figura e Tabela antes da figura e do número da tabela. Fazer isso muda a primeira linha, mas a segunda linha permanece onde estava.

Usando o pacote tocloft.

Existe alguma maneira de alinhar a primeira e a segunda linha mantendo a palavra "Figura" intacta. Forneci uma fração do código que estou usando. No entanto, incluí todos os pacotes que usei.

\documentclass[12pt, a4paper, oneside, openright]{Thesis} % Paper size, default font size and one-sided paper
\usepackage{subfigure}
\usepackage[subfigure]{tocloft}
\usepackage{notoccite}
\usepackage{wrapfig}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{amsmath, nccmath}
\usepackage{comment}
\usepackage{afterpage}
\usepackage{multirow}
\usepackage{notoccite}
\usepackage{enumitem}
\usepackage{multicol}
\usepackage{times}
\usepackage{cleveref}
\usepackage{wasysym}
\usepackage{rotating}
\usepackage[square, numbers]{natbib}


\hypersetup{urlcolor=black, colorlinks=true} % Colors hyperlinks in blue - change to black if annoyingv`    
\title{\ttitle} % Defines the thesis title 
\setlength{\parindent}{20pt}


\setlength\cftbeforefigskip{8pt}    % To add line spacing between entries in LOF
\setlength\cftbeforechapskip{8pt}   % To add line spacing between entries in LOC
\setlength\cftbeforetabskip{8pt}    % To add line spacing between entries in LOT

\begin{document}
\makeatletter
\renewcommand*{\NAT@nmfmt}[1]{\textsc{#1}}
\makeatother

\frontmatter 

\fancyhead{} % Clears all page headers and footers
\rhead{\thepage} % Sets the right side header to show the page number
\lhead{} % Clears the left side page header

\pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % New command to make the lines in the title page

% PDF meta-data
\hypersetup{pdftitle={\ttitle}}
\hypersetup{pdfsubject=\subjectname}
\hypersetup{pdfauthor=\authornames}
\hypersetup{pdfkeywords=\keywordnames}


\pagestyle{plain}

\acknowledgements{Some Random texts}
\newpage
\addtotoc{Abstract} % Add the "Abstract" page entry to the Contents
\abstract{Some random Texts for Abstract}
\newpage 

\pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them back
\addtotoc{Contents}
\lhead{\emph{Contents}} % Set the left side page header to "Contents"
\tableofcontents % Write out the Table of Contents
\newpage
\addtotoc{List of Figures}
\lhead{\emph{List of Figures}} % Set the left side page header to "List of Figures"

%Fragment of code for Writing "Figure" in front of Figure number
{
  \let\oldnumberline\numberline%
  \renewcommand{\numberline}{\figurename~\oldnumberline}%
\listoffigures % Write out the List of Figures
}
\newpage

\addtotoc{List of Tables}
\lhead{\emph{List of Tables}} % Set the left side page header to "List of Tables"
%Fragment of code for Writing "Figure" in front of Figure number
{
  \let\oldnumberline\numberline%
  \renewcommand{\numberline}{\tablename~\oldnumberline}%
\listoftables % Write out the List of Tables
}

\mainmatter % Begin numeric (1,2,3...) page numbering

\pagestyle{fancy} % Return the page headers back to the "fancy" style

% Include the chapters of the thesis as separate files from the Chapters folder
% Uncomment the lines as you write the chapters

\input{Chapters/Chapter1}
\input{Chapters/Chapter2}
\input{Chapters/Chapter3}
\input{Chapters/Chapter4}
\input{Chapters/Chapter5}

\clearpage % Start a new page
\appendix % Cue to tell LaTeX that the following 'chapters' are Appendices

% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices

\input{Appendices/AppendixA}

\backmatter

\label{References}

\lhead{\emph{References}} % Change the page header to say "Bibliography"
\renewcommand\bibname{References}
\bibliographystyle{unsrt} % Use the "custom" BibTeX style for formatting the Bibliography

\bibliography{references} % The references (bibliography) information are stored in the file named "Bibliography.bib"

\newpage
\include{LOP}
\newpage
\end{document}

Onde estou cometendo o erro???

Responder1

A maneira como você redefine \numberline:

\let\oldnumberline\numberline%
\renewcommand{\numberline}{\figurename~\oldnumberline}

Make cftfignumwidthnão leva em conta a largura de word \figurename~. Porque está fora do comando \numberline. Você não deveria redefinir \numberlineassim. Em vez disso, o pacote tocloftfornece os comandos \cftfigpresnume \cftfigaftersnumcoloca conteúdo extra antes e depois do número.

Aqui está um exemplo de como usar esses comandos para conseguir o que deseja:

\documentclass{book}
\usepackage{graphicx}
\usepackage{tocloft}

\setlength\cftbeforefigskip{8pt}
\settowidth{\cftfignumwidth}{Figure~1.100~}% set the \cftfignumwidth to certain length of text in case you have a huge numbered figure, e.g., Figure~1.100~
\renewcommand{\cftfigpresnum}{Figure~}% add the word figure and a space before the number
\renewcommand{\cftfigaftersnum}{~} % add a space after the number

\begin{document}
\listoffigures
\chapter{One}
\begin{figure}
    \centering
    \includegraphics{example-image}
    \caption{A very very very very very very very very very very very very very very very very very very very very very very long Caption}
\end{figure}
\setcounter{figure}{10}
\begin{figure}
    \centering
    \includegraphics{example-image}
    \caption{A very very very very very very very very very very very very very very very very very very very very very very long Caption}
\end{figure}
\setcounter{figure}{100}
\begin{figure}
    \centering
    \includegraphics{example-image}
    \caption{A very very very very very very very very very very very very long Caption}
\end{figure}
\end{document}

insira a descrição da imagem aqui

informação relacionada