1

I modified the list of figures and list of tables with help that I got here

The problem is that the summary, the list of figures and the list of tables do not follow the same formatting of the chapters. Without the modifications to the list of figures and list of tables the problem does not occur

\documentclass{book}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage[top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry}
\usepackage{graphicx}
\usepackage{float}    
%%%%%%    CHAPTER           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
    \vspace*{10\p@}%
    {\parindent \z@ \centering \reset@font
        \thickhrulefill\quad
        \scshape \@chapapp{} \thechapter %Original \bfseries no lugar de \scshape
        \quad \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
        \vskip 70\p@ % 100
}}
\def\@makeschapterhead#1{%
    \vspace*{10\p@}%
    {\parindent \z@ \centering \reset@font
        \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge {\scshape #1}\par\nobreak %original bfseries
        \par
        \vspace*{10\p@}%
        \hrule
        \vskip 50\p@ % 70
}}    
% LIST OF FIGURE
\usepackage{calc}
\usepackage{tocloft} 
\renewcommand*{\cftfigname}{\figurename\space} 
\renewcommand*{\cftfigaftersnum}{~\textendash\hfill}
\renewcommand{\cftfigpresnum}{\cftfigname}
\setlength{\cftfigindent}{0pt}
\setlength{\cftfignumwidth}{\widthof{\cftfigname 00~\textendash0~}}
\addto\captionsbrazil{\renewcommand{\listfigurename}{Lista de ilustra\c{c}\~{o}es}}   
% LIST OF TABLES
\renewcommand*{\cfttabname}{\tablename\space} 
\renewcommand*{\cfttabaftersnum}{~\textendash\hfill}
\renewcommand{\cfttabpresnum}{\cfttabname}
\setlength{\cfttabindent}{0pt}
\setlength{\cfttabnumwidth}{\widthof{\cfttabname 00~\textendash0~}}

\begin{document}    
\tableofcontents    
\listoffigures   
\listoftables    
\chapter{Some chapter}    
\begin{figure}[H]
    \centering
    \includegraphics[width=0.7\linewidth]{example-image}
    \caption{Any things}
\end{figure}

\begin{table}[H]\centering
\begin{tabular}{cc}
    \hline 
    a & b \\ 
    \hline 
    c & d \\ 
    \hline 
\end{tabular} 
\caption{Any table}
\end{table}    

\end{document}
2

enter image description here

The tocloft package has its own views about typesetting the chapter headers of \tableofcontents, \listoffigures etc.

Use \usepackage[titles]{tocloft} to switch back to regular behavior, i.e. getting control back as is done for \@makechapterhead and \@makeschapterhead.

\documentclass{book}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage[top=3cm, bottom=2cm, left=3cm, right=2cm]{geometry}
\usepackage{graphicx}
\usepackage{float}    
%%%%%%    CHAPTER           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
    \vspace*{10\p@}%
    {\parindent \z@ \centering \reset@font
        \thickhrulefill\quad
        \scshape \@chapapp{} \thechapter %Original \bfseries no lugar de \scshape
        \quad \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
        \hrule
        \vskip 70\p@ % 100
}}
\def\@makeschapterhead#1{%
    \vspace*{10\p@}%
    {\parindent \z@ \centering \reset@font
        \thickhrulefill
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge {\scshape #1}\par\nobreak %original bfseries
        \par
        \vspace*{10\p@}%
        \hrule
        \vskip 50\p@ % 70
}}    
% LIST OF FIGURE
\usepackage{calc}
\usepackage[titles]{tocloft} 
\renewcommand*{\cftfigname}{\figurename\space} 
\renewcommand*{\cftfigaftersnum}{~\textendash\hfill}
\renewcommand{\cftfigpresnum}{\cftfigname}
\setlength{\cftfigindent}{0pt}
\setlength{\cftfignumwidth}{\widthof{\cftfigname 00~\textendash0~}}
\addto\captionsbrazil{\renewcommand{\listfigurename}{Lista de ilustra\c{c}\~{o}es}}   
% LIST OF TABLES
\renewcommand*{\cfttabname}{\tablename\space} 
\renewcommand*{\cfttabaftersnum}{~\textendash\hfill}
\renewcommand{\cfttabpresnum}{\cfttabname}
\setlength{\cfttabindent}{0pt}
\setlength{\cfttabnumwidth}{\widthof{\cfttabname 00~\textendash0~}}

\begin{document}    
\tableofcontents    
\listoffigures   
\listoftables    
\chapter{Some chapter}    
\begin{figure}[H]
    \centering
    \includegraphics[width=0.7\linewidth]{example-image}
    \caption{Any things}
\end{figure}

\begin{table}[H]\centering
\begin{tabular}{cc}
    \hline 
    a & b \\ 
    \hline 
    c & d \\ 
    \hline 
\end{tabular} 
\caption{Any table}
\end{table}    

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.