
Я использую LaTeX для подготовки к проекту. Я использую\documentclass{report}
Так как мне нужна первая глава «Введение», без номера главы, я использовал
\newcommand{\mychapter}[2]{
\setcounter{chapter}{#1}
\setcounter{section}{0}
\chapter*{#2}
\addcontentsline{toc}{chapter}{#2}
}
в преамбуле.
Так как мне нужен список цифр перед введением, после этого \begin{document}
я добавил следующие комментарии
\listoffigures
\mychapter{0}{Introduction}
In Chapter 1, we give the basic ideas and facts.....
и в выходных данных Заголовок введения главы - Список рисунков. (См. рисунок). Может кто-нибудь помочь оправиться от этой проблемы.
решение1
Вы можете использовать лучшее определение для \mychapter
:
\documentclass{report}
\usepackage{kantlipsum} % for mock text
\pagestyle{headings} % to get headers
\newcounter{savedsecnumdepth}
\newcommand{\mychapter}[1]{%
\setcounter{savedsecnumdepth}{\value{secnumdepth}}%
\setcounter{secnumdepth}{-1000}%
\chapter{#1}%
\setcounter{secnumdepth}{\value{savedsecnumdepth}}%
\refstepcounter{chapter}%
}
\setcounter{chapter}{-1}% first should be Chapter 0
\begin{document}
\tableofcontents
\mychapter{Introduction}
\section{Ghijk}
\kant[1-30]
\end{document}