在使用 documentclass 撰写论文时遇到以下问题memoir
。
具体来说,我需要使用graphicx
和subcaptions
。这会产生正确的结果并创建带有子标题的子图。
但是,图表列表现在在每个列出的项目前都显示“> 0”。为什么会发生这种情况?有人能帮我找到解决办法吗?
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
%\usepackage[final]{microtype} % Less badboxes
\usepackage[filehooks]{svn-multi}
% Layout
\usepackage{geometry}
\usepackage{pdflscape}
% No Indentation
\setlength{\parindent}{0pt}
% Interline
\usepackage{setspace}
\renewcommand{\baselinestretch}{1.1}
% general
\usepackage{csquotes}
\usepackage{multirow}
% Math
\usepackage{amssymb}
\usepackage{amsfonts}
%\usepackage{amsmath}
\usepackage{mathtools}
%\addtocounter{equation}{1}
%\numberwithin{equation}{section}
\usepackage{dsfont}
%For Chapter4
\usepackage{epsfig}
\usepackage{amsbsy}
\usepackage{verbatim}
\usepackage{color}
\usepackage{makeidx}
\usepackage{amsthm}
\usepackage{diagbox}
%%%%%
\makeatletter
\let\c@lofdepth\relax
\let\c@lotdepth\relax
\makeatother
%\usepackage{subfigure} %DEACTIVATE TO USE GRAPHICX AND SUBCAPTION BELOW
\usepackage{mathrsfs}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\diag}{Diag}
%\newtheorem{Assumption}{Assumption}[section]
% Graphics
\usepackage{rotating}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{placeins}
\usepackage{graphicx}
% theorem etc
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{corollary}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Example}
\newtheorem{remark}{Remark}
\newtheorem{algorithm}{Algorithm}
\newtheorem{problem}{Problem}
% Float
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{upgreek} % for capital greeks in bib
%\usepackage{subcaption}
\usepackage{threeparttable}
\usepackage{tabularx}
%\usepackage{float} % deactivated in order to use floatrow for figure notes
\usepackage{tablefootnote}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{rotating}
\usepackage{threeparttable}
\usepackage[capposition=top]{floatrow}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{subcaption}
%pages
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\slshape\nouppercase\rightmark}
\fancyhead[RE]{\slshape\nouppercase\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{2.5pt}
\setlength{\footskip}{0in}
\renewcommand{\footruleskip}{0pt}
\fancypagestyle{plain}{%
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
\copypagestyle{myplain}{plain}
\fancypagestyle{myplain}{%
\fancyhead[LO]{}
\renewcommand{\headrulewidth}{0.5pt}
}
% Hyperref
\settocdepth{subsubsection}
\setsecnumdepth{subsubsection}
%\setcounter{tocdepth}{4}
%\setcounter{secnumdepth}{4}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor = {black!80!black},
citecolor = {black!80!black},
urlcolor = {black!80!black},
}
\usepackage{memhfixc}
\usepackage[
citestyle=authoryear,
natbib,
doi=false,
isbn=false,
url=false,
style=authoryear,
backend=bibtex,
maxcitenames=2,
maxbibnames=99
]{biblatex}
\renewbibmacro{in:}{}
% Appendix
%\usepackage[toc, titletoc]{appendix}
% Environment
\usepackage{comment}
%Chapter4
\DeclareMathOperator*{\essinf}{ess\,inf}
\DeclareMathOperator*{\esssup}{ess\,sup}
\DeclareMathOperator*{\Argmin}{Arg\,min}
%\DeclareMathOperator{\cF}{\mathcal{F}}
%\DeclareMathOperator{\FF}{\mathbb{F}}
\makeatletter
\def \newequation#1#2{
\@definecounter{#1}
\@namedef{the#1}{\hbox{#2}}
\@namedef{#1}{$$\refstepcounter{#1}}
\@namedef{end#1}{
\eqno \csname the#1\endcsname $$\global\@ignoretrue
}
}
\makeatother
\newequation{E1}{($E_{b,\sigma,W}$)}
\makeatletter
\def \newequation#1#2{
\@definecounter{#1}
\@namedef{the#1}{\hbox{#2}}
\@namedef{#1}{$$\refstepcounter{#1}}
\@namedef{end#1}{
\eqno \csname the#1\endcsname $$\global\@ignoretrue
}
}
\makeatother
\newequation{hyp3}{($\mathcal{H}_{b,\sigma}$)}
\makeatletter
\def \newequation#1#2{
\@definecounter{#1}
\@namedef{the#1}{\hbox{#2}}
\@namedef{#1}{$$\refstepcounter{#1}}
\@namedef{end#1}{
\eqno \csname the#1\endcsname $$\global\@ignoretrue
}
}
\makeatother
\newequation{shleg}{(ShLeg)}
\makeatletter
\def \newequation#1#2{
\@definecounter{#1}
\@namedef{the#1}{\hbox{#2}}
\@namedef{#1}{$$\refstepcounter{#1}}
\@namedef{end#1}{
\eqno \csname the#1\endcsname $$\global\@ignoretrue
}
}
\makeatother
\newequation{kl}{(KL)}
\makeatletter
\def \newequation#1#2{
\@definecounter{#1}
\@namedef{the#1}{\hbox{#2}}
\@namedef{#1}{$$\refstepcounter{#1}}
\@namedef{end#1}{
\eqno \csname the#1\endcsname $$\global\@ignoretrue
}
}
\makeatother
\newequation{haar}{(Haar)}
\addtolength{\oddsidemargin}{0cm}
\addtolength{\evensidemargin}{0cm}
\documentclass[12pt,a4paper, twoside,openright, oldfontcommands]{memoir}
\let\footruleskip\undefined %undefine footruleskip
\input{preamble}
\input{MyMathSymbols}
\addbibresource{thesis_bib_all.bib} %Bib file
\begin{document}
\frontmatter
\pagestyle{empty}
\include{titlepage}
\include{Chapters/thanks}
\include{Chapters/abstract}
\include{Chapters/acknowlegement}
\tableofcontents*
\newpage
\listoffigures*
\newpage
\listoftables*
\thispagestyle{empty}
\mainmatter
\pagestyle{fancy}
\chapter[Introduction]{Introduction}
\label{chap:thesis1}
\input{./Chapters/chapter1}
\backmatter
%%% Bibliography
\printbibliography
\end{document}
答案1
memoir
已经包含一个用于子图及其标题的机制。您可以使用它来代替包subcaption
:
\documentclass{memoir}
\usepackage[T1]{fontenc}
\newsubfloat{figure}
\setcounter{lofdepth}{2}
\usepackage{graphicx}
\begin{document}
\listoffigures
\begin{figure}
\subbottom[subfigure caption]{\includegraphics{example-image}}
\caption{caption text}
\end{figure}
\end{document}