章节风格

章节风格

我在别人的帮助下修改了图表列表和表格列表这里

问题在于摘要、图片列表和表格列表不遵循章节的相同格式。如果不修改图片列表和表格列表,则不会出现此问题

\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}

答案1

在此处输入图片描述

tocloft包对于章节标题的排版等有自己的看法\tableofcontents\listoffigures

使用\usepackage[titles]{tocloft}切换回常规行为,即像对\@makechapterhead和所做的那样重新获得控制权\@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}

相关内容