我的文档开头有奇怪的“lsttitle”

我的文档开头有奇怪的“lsttitle”

编辑:我通过以下方式解决问题删除subcaption

在我的文档的开头有一个奇怪的“lsttitle”工件:

文物照片

我正在使用 listing 包来展示一些代码。我对其进行了一些个性化设置:

% !TEX encoding = UTF-8 Unicode
\documentclass[11pt, a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[pdftex,
            pdfauthor={Qui suis-je ?},
            pdftitle={Aie-je un sous titre ?},
            pdfsubject={Titre de l'article}, pdfcreator={pdflatex}]{hyperref}

\usepackage[top = 50mm, headheight=62pt]{geometry}
\usepackage{titleps}
\usepackage{tabularx, booktabs, multirow}
\usepackage{graphicx, adjustbox, microtype}
\usepackage{lipsum}

\usepackage{amsmath}
\usepackage[linesnumbered,ruled]{algorithm2e}
\usepackage[noend]{algpseudocode}
\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
\makeatother
\SetKwRepeat{Do}{do}{while}
\def\code#1{\texttt{#1}}

\usepackage{multicol}
\usepackage{color}
\usepackage{comment}
\usepackage{tocstyle}

\nonstopmode 

\usepackage[most]{tcolorbox} 
\lstset{frame=single,numbersep=3mm, numbers=left, numberstyle=\tiny}


    \newtcblisting[auto counter]{texCode}[2][]{
     sharp corners,
     fonttitle = \bfseries,
     colframe = gray,
     listing only,
     listing options = {basicstyle = \ttfamily, language = TeX},
     title = Code Source LaTeX : \thetcbcounter: #2, #1
}

\newtcblisting[auto counter]{cppCode}[2][]{
     sharp corners,
     fonttitle = \bfseries,
     colframe = gray,
     listing only,
     listing options = {basicstyle = \ttfamily, language = C++},
     title = Code Source C++ : \thetcbcounter: #2, #1
}

\newtcblisting[auto counter]{pytCode}[2][]{
     sharp corners,
     fonttitle = \bfseries,
     colframe = gray,
     listing only,
     listing options = {basicstyle = \ttfamily, language = Python},
     title = Code Source Python : \thetcbcounter: #2, #1
}
\newtcblisting[auto counter]{javaCode}[2][]{
     sharp corners,
     fonttitle = \bfseries,
     colframe = gray,
     listing only,
     listing options = {basicstyle = \ttfamily, language = Java},
     title = Code Source Java : \thetcbcounter: #2, #1
}



\setlength{\columnseprule}{1pt}
\setlength{\columnsep}{0.5cm}
\def\columnseprulecolor{\color{black}}

\usetocstyle{standard}
\makeatletter
     \renewcommand{\thesection}{\Roman{section}.}
     \renewcommand{\thesubsection}{\Roman{section}.\arabic{subsection}.}
     \renewcommand{\thesubsubsection}{\Roman{section}.\arabic{subsection}.\alph{subsubsection}}
\makeatother

\makeatletter
     \renewcommand{\section}{\@startsection{section}{1}{\z@}%
          {-3.5ex \@plus -1ex \@minus -.2ex}%
          {2.3ex \@plus .2ex}%
          {\reset@font\Large\bfseries   }}
     \renewcommand{\subsection}{\@startsection{subsection}{1}{\z@}%
          {-3.5ex \@plus -1ex \@minus -.2ex}%
          {2.3ex \@plus .2ex}%
          {\reset@font\large\bfseries}}
     \renewcommand{\subsubsection}{\@startsection{subsubsection}{1}{\z@}%
          {-3.5ex \@plus -1ex \@minus -.2ex}%
          {2.3ex \@plus .2ex}%
          {\reset@font\large\bfseries}}
\makeatother

\usepackage{hyperref}
\hypersetup{colorlinks, citecolor=black, filecolor=black, linkcolor=black, urlcolor=black}

\usepackage{fancyhdr}
\usepackage{lastpage}
\newpagestyle{style}{
\sethead{}{%
     \begin{tabularx}{\linewidth}[b]{@{}l>{\raggedleft\arraybackslash}X@{}}
          \smash{\raisebox{-0.7\height}{\includegraphics[scale=0.5]{logo.png}}}& \today \\
          \cmidrule[2pt]{2-2}
          & \huge \bfseries Titre de l'article \\
          & Aie-je un sous titre ? \\
          \addlinespace
          \midrule[0.4pt]
     \end{tabularx}}{}
\setfoot{}{\thepage}{}
}

\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{mathtools, bm}
\usepackage{amssymb, bm}

\usepackage[french]{babel}

\pagestyle{style}

\begin{document}

\tableofcontents

\section{Chapitre 1}
\subsection{Test 1}

\begin{javaCode}{Titre du code}
public static void main (string args[]){
    system.out.print("coucou");
}
\end{javaCode}

\section{Chapitre 2}

\subsection{COUCOU}

\begin{cppCode}{Je suis un code en c++}
int main() {
    cout << "coucou" << endl;
}
\end{cppCode}

\end{document}

如何删除文档开头的“lsttitle”?

相关内容