如何使图表列表和表格列表的标题在文本中大写,在目录中小写?

如何使图表列表和表格列表的标题在文本中大写,在目录中小写?

如何使文本中的图列表和表列表的标题大写,而内容表中的标题小写?这是我的配置文件:

\documentclass[a4paper, twoside, 10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{tocloft}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{sectsty}
\usepackage{indentfirst}
\usepackage{url}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\usepackage{graphicx}
\graphicspath{ {img/} }
\usepackage{subcaption}
\usepackage{textcomp}
\usepackage{color}
\usepackage[export]{adjustbox}
\usepackage{siunitx}
\usepackage{enumitem}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}
\usepackage{courier}
\usepackage{multirow}
\usepackage{array}
\usepackage{slashbox}
\usepackage{tabularx}
\usepackage{amssymb}
\usepackage{textcase}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{xcolor,listings}
\usepackage[font=small,labelfont=bf]{caption}

\titleformat
{\section} % command
[hang] % shape
{\bfseries\Large} % format
{\thesection. } % label
{0pt} % sep
{\MakeTextUppercase} % before-code
[] % after-code
\titlespacing*{\section}{0pt}{12pt}{6pt}

\titleformat
{\subsection} % command
[hang] % shape
{\large\bfseries\itshape} % format
{\thesubsection. } % label
{0em} % sep
{} % before-code
[] % after-code
\titlespacing*{\subsection}{0pt}{12pt}{6pt}

\titleformat
{\subsubsection} % command
[hang] % shape
{\large\itshape} % format
{\thesubsubsection. } % label
{0em} % sep
{} % before-code
[] % after-code
\titlespacing*{\subsubsection}{0pt}{12pt}{6pt}

\titleformat
{\chapter} % command
[hang] % shape
{\bfseries\Large} % format
{\thechapter. } % label
{0pt} % sep
{\MakeTextUppercase} % before-code
[] % after-code
\titlespacing*{\chapter}{0pt}{12pt}{6pt}

\usepackage[]{algorithmic}

\floatname{algorithm}{Procedure}
\renewcommand{\algorithmicrequire}{\textbf{Wejście:}}
\renewcommand{\algorithmicensure}{\textbf{Wyjście:}}

\captionsetup[table]{justification=justified,singlelinecheck=false, format=hang}

\usepackage{etoolbox}
\apptocmd{\thebibliography}{\raggedright}{}{}

\usepackage[utf8]{inputenc}
\usepackage[left=3.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}

\usepackage{indentfirst}
\setlength{\parindent}{1.25cm}
\frenchspacing

\usepackage[justification=centering]{caption}

\usepackage{uarial}
\renewcommand{\familydefault}{\sfdefault}

\setcounter{secnumdepth}{4}  
\setlength{\parskip}{6pt}

\let\stdsection\section
\renewcommand\section{\newpage\stdsection}


\usepackage{polski}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

\renewcommand{\cftdotsep}{2} 

\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}


\sisetup{output-decimal-marker = {,}}

\usepackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{} 
\fancyfoot[C]{\sffamily\fontsize{9pt}{9pt}\selectfont\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}

\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage[nottoc]{tocbibind}

\titlecontents{section}
[0em]             % left margin
{\vspace{0 pt }}                   % above code
{%                  % numbered format
{\thecontentslabel. }%
}%
{}         % unnumbered format
{\enspace\titlerule*{.} \contentspage}         % filler-page-format, e.g dots

% indented subsection (in toc)
\titlecontents{subsection}
[1em]             % left margin
{\vspace{0 pt }}                   % above code
{%                  % numbered format
{\thecontentslabel. }%
}%
{}         % unnumbered format
{ \enspace\titlerule*{.}\contentspage}         % filler-page-format

% indented subsection (in toc)
\titlecontents{subsubsection}
[3em]             % left margin
{\vspace{0 pt }}                   % above code
{%                  % numbered format
{\thecontentslabel. }%
}%
{}         % unnumbered format
{ \enspace\titlerule*{.}\contentspage}         % filler-page-format

\pagestyle{plain}

我正在使用 Overleaf 来编译这个,这是我的项目链接: https://www.overleaf.com/5613989qpysrv#/18155123/

答案1

您可以使用以下选项更改章节在目录中的显示方式:

\chapter[toc version]{doc version}

您还可以定义一个名称,然后使用以下方法将其变为大写\MakeUppercase

相关内容