梅威瑟:
\documentclass[oneside,listof=leveldown]{scrbook}
\usepackage[newfloat]{minted}
\begin{document}
\listoflistings
\listoffigures
\listoftables
\chapter*{Introduction}
%
\begin{listing}
\caption{My first listing.}
\end{listing}
%
\begin{figure}
\caption{My first figure.}
\end{figure}
%
\begin{table}
\caption{My first table.}
\end{table}
\chapter{Another chapter}
%
\begin{listing}
\caption{My second listing.}
\end{listing}
%
\begin{figure}
\caption{My second figure.}
\end{figure}
%
\begin{table}
\caption{My second table.}
\end{table}
\end{document}
我怎样才能在1中对图表和表格进行编号1
等?2
\chapter*
1.1
1.2
\chapter
加载minted
该选项时newfloat
,列表会按需要编号。加载不带newfloat
该选项的列表也会像图表和表格一样运行。
答案1
可能这对您来说不是一个好的解决方案,因为我进行了更改\documentclass
,但看起来它有效(如果它没用,将会被删除):
\documentclass[oneside,listof=leveldown]{report}
\usepackage{listings}
\usepackage[newfloat]{minted}
\begin{document}
\let\LaTeXStandardClearpage\clearpage
\let\clearpage\relax % Do nothing when a \clearpage command appears
\listoffigures
\listoftables
\lstlistoflistings
\let\clearpage\LaTeXStandardClearpage % Return to the old definition
\chapter*{Introduction}
%
\begin{listing}
\caption{My first listing.}
\end{listing}
%
\begin{figure}
\caption{My first figure.}
\end{figure}
%
\begin{table}
\caption{My first table.}
\end{table}
\chapter{Another chapter}
%
\begin{listing}
\caption{My second listing.}
\end{listing}
%
\begin{figure}
\caption{My second figure.}
\end{figure}
%
\begin{table}
\caption{My second table.}
\end{table}
\end{document}