这是我的论文的初始部分:
\documentclass[12pt, a4paper, openright]{report}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{rotating}
\usepackage{subfigure}
\usepackage{eucal}
\usepackage{booktabs} % To thicken table lines
%\usepackage[algo2e,ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{setspace}
\usepackage{morefloats}
%\usepackage{algorithm2e}
\usepackage{algpseudocode}
\usepackage{varwidth}
\usepackage{float}
\usepackage{amsfonts}
\usepackage{ragged2e}
\usepackage{color}
\usepackage{mdwtab}
\usepackage{bm}
\usepackage[nottoc]{tocbibind}
\newcommand{\todo}[1]{{\color{blue} #1}}
\selectlanguage{english}
\setcounter{secnumdepth}{5}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{assumption}{Assumption}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{oss}{Observation}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{algorithm}{Algorithm}[section]
\newtheorem{dataset}{Dataset}[section]
\newtheorem{ex}{Example}[section]
\floatstyle{boxed}
\newfloat{Pseudocode}{hbtp}{lop}[section]
\floatname{Pseudocode}{Pseudocode}
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\kdist{\mathit{k}-distance}
\title{Computational Intelligence for Data Analysis with OES Data in Semiconductor Manufacturing}
\author{Luca Puggini}
\date{\today}
\begin{document}
\maketitle
\begin{titlepage}
Luca Puggini
\end{titlepage}
\clearpage
\pagestyle{empty}
\clearpage
\pagestyle{plain}
\pagenumbering{roman}
\chapter*{Acknowledgements}
\thispagestyle{empty}
Thesis
\tableofcontents % indice
\listoffigures
\listoftables
\listof{Pseudocode}{List of Pseudocodes}
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
%\begin{titlepage}
%\maketitle
%\end{titlepage}
\pagestyle{plain}
\pagenumbering{roman}
%\tableofcontents % indice
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}}
\parindent 0pt
\chapter*{Practical Information}
....
一切正常,但我的内容中只有\listoffigures
\listoftables
被引用,而
\listof{Pseudocode}{List of Pseudocodes}
没有。
如何\listof{Pseudocode}{List of Pseudocodes}
在目录中添加对的引用?
编辑:答案部分有效。伪代码列表现在位于目录中,但伪代码列表页面的布局很糟糕,与表格不同。
编辑2:这是一个重现问题的例子:
\documentclass[12pt, a4paper, openright]{report}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{rotating}
\usepackage{subfigure}
\usepackage{eucal}
\usepackage{booktabs} % To thicken table lines
%\usepackage[algo2e,ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{setspace}
\usepackage{morefloats}
%\usepackage{algorithm2e}
\usepackage{algpseudocode}
\usepackage{varwidth}
\usepackage{float}
\usepackage{amsfonts}
\usepackage{ragged2e}
\usepackage{color}
\usepackage{mdwtab}
\usepackage{bm}
\usepackage[nottoc]{tocbibind}
\newcommand{\todo}[1]{{\color{blue} #1}}
\selectlanguage{english}
\setcounter{secnumdepth}{5}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{assumption}{Assumption}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{oss}{Observation}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{algorithm}{Algorithm}[section]
\newtheorem{dataset}{Dataset}[section]
\newtheorem{ex}{Example}[section]
\floatstyle{boxed}
\newfloat{Pseudocode}{hbtp}{lop}[section]
\floatname{Pseudocode}{Pseudocode}
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\kdist{\mathit{k}-distance}
\newcommand{\listofpseudocodes}{
\tocfile{List of Pseudocodes}{lop}
\listof{Pseudocode}{List of Pseudocodes}
}
\title{Title}
\author{author}
\date{\today}
\begin{document}
\maketitle
\begin{titlepage}
title
\end{titlepage}
\clearpage
\pagestyle{empty}
\clearpage
\pagestyle{plain}
\pagenumbering{roman}
\chapter*{Acknowledgements}
\thispagestyle{empty}
Thesis
\tableofcontents % indice
\listoffigures
\listoftables
%\listof{Pseudocode}{List of Pseudocodes}
\listofpseudocodes
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
%\begin{titlepage}
%\maketitle
%\end{titlepage}
\pagestyle{plain}
\pagenumbering{roman}
%\tableofcontents % indice
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}}
\parindent 0pt
\chapter{Ch 1}
\begin{table}
\caption{table 1 }
\end{table}
\section{Sec 1}
\chapter{Ch 2}
\begin{Pseudocode}
\caption{pseudocode 1}
\end{Pseudocode}
\begin{table}
\caption{table2}
\end{table}
\begin{Pseudocode}
\caption{pseudocode 2}
\end{Pseudocode}
\end{document}
答案1
此\listof
功能float
不会向目录中添加条目。可以通过将命令包装在此命令周围来更改此设置,该命令会自动将内容行添加到目录中`;
\newcommand{\listofpseudocodes}{%
\phantomsection
\listof{Pseudocode}{List of Pseudocodes}
\addcontentsline{toc}{chapter}{List of Pseudocodes}
}
以下是 OP 的“MWE”
\documentclass[12pt, a4paper, openright]{report}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\usepackage{fancyhdr}
\usepackage{color}
\usepackage{rotating}
\usepackage{subfigure}
\usepackage{eucal}
\usepackage{booktabs} % To thicken table lines
%\usepackage[algo2e,ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{setspace}
\usepackage{morefloats}
%\usepackage{algorithm2e}
\usepackage{algpseudocode}
\usepackage{varwidth}
\usepackage{float}
\usepackage{amsfonts}
\usepackage{ragged2e}
\usepackage{color}
\usepackage{mdwtab}
\usepackage{bm}
\usepackage[nottoc]{tocbibind}
\newcommand{\todo}[1]{{\color{blue} #1}}
\selectlanguage{english}
\setcounter{secnumdepth}{5}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{assumption}{Assumption}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{oss}{Observation}[section]
\newtheorem{cor}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{algorithm}{Algorithm}[section]
\newtheorem{dataset}{Dataset}[section]
\newtheorem{ex}{Example}[section]
\floatstyle{boxed}
\newfloat{Pseudocode}{hbtp}{lop}[section]
\floatname{Pseudocode}{Pseudocode}
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\kdist{\mathit{k}-distance}
\newcommand{\listofpseudocodes}{%
\phantomsection
\listof{Pseudocode}{List of Pseudocodes}
\addcontentsline{toc}{chapter}{List of Pseudocodes}
}
\title{Title}
\author{author}
\date{\today}
\begin{document}
\maketitle
\begin{titlepage}
title
\end{titlepage}
\clearpage
\pagestyle{empty}
\clearpage
\pagestyle{plain}
\pagenumbering{roman}
\chapter*{Acknowledgements}
\thispagestyle{empty}
Thesis
\tableofcontents % indice
\listoffigures
\listoftables
%\listof{Pseudocode}{List of Pseudocodes}
\listofpseudocodes
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
%\begin{titlepage}
%\maketitle
%\end{titlepage}
\pagestyle{plain}
\pagenumbering{roman}
%\tableofcontents % indice
\clearpage
\pagestyle{plain}
\pagenumbering{arabic}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}}
\parindent 0pt
\chapter{Ch 1}
\begin{table}
\caption{table 1 }
\end{table}
\section{Sec 1}
\chapter{Ch 2}
\begin{Pseudocode}
\caption{pseudocode 1}
\end{Pseudocode}
\begin{table}
\caption{table2}
\end{table}
\begin{Pseudocode}
\caption{pseudocode 2}
\end{Pseudocode}
\end{document}