라텍스에서 헤더를 어떻게 수정합니까?

라텍스에서 헤더를 어떻게 수정합니까?

프로젝트별로 준비하기 위해 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}

여기에 이미지 설명을 입력하세요

관련 정보