セクションを 0.0 から始めるにはどうすればよいでしょうか?

セクションを 0.0 から始めるにはどうすればよいでしょうか?

「短い序文」セクションを追加するにはどうすればよいでしょうか。\section*{0.0 A Short Preface}おそらく問題ないと思いますが、TeX は素晴らしいので、もっと良い方法があるはずです。

これは私が探していたものです(Google ドキュメントで作成しました):

ここに画像の説明を入力してください

ありがとう!

答え1

最も単純な場合、セクション カウンタを に設定すると、-1次のセクションは になります0

\documentclass{book}
\begin{document}
\setcounter{section}{-1}
\section{text}
\end{document}

セクションの外観を変更するには、たとえば、デフォルトでサブセクション番号を追加するには、\thesectionも再定義する必要があります。

\documentclass{article}
\usepackage{lipsum}
\renewcommand\thesection{\arabic{section}.\arabic{subsection}}
\begin{document}
\setcounter{section}{-1}
\section{A Short Preface}
\lipsum[1]
\section{Introduction}
\lipsum[2]
\end{document}

ここに画像の説明を入力してください

答え2

編集: 更新xassocnt v.0.8 より-- カウンターのカスケード停止の使用。つまり、カウンター リセット リスト内のすべてのカウンターが停止されます。

\documentclass{book}

\usepackage{xassoccnt}
\usepackage{blindtext}


\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents
\listoffigures
\listoftables


\CascadeSuspendCounters{chapter}
\chapter{The first chapter}
\section{Foo}


\begin{figure}

\caption{A foo figure}
\end{figure}

\begin{table}
\caption{A foo table}
\end{table}



\subsection{My First subsection}
\blindtext
\section{Foobar}
\subsection{Foobar subsection}
\blindtext
\subsubsection{Foobar Again}
\blindtext


\ResumeAllSuspendedCounters

\chapter{Another chapter}


\begin{figure}
\caption{Another figure}
\end{figure}



\SuspendCounters{chapter,section}

\chapter{Yet another chapter}

\section{Foo section in yet another chapter}

\begin{figure}
\caption{Another figure}
\end{figure}



\end{document}

\SuspendCountersfrom を使用してxassoccntカウンターを固定し、後で再開します。

\documentclass{article}

\usepackage{xassoccnt}
\usepackage{blindtext}
\begin{document}

\SuspendCounters{section}
\SuspendCounters{subsection}
\section{Foo}
\subsection{My First subsection}
\blindtext
\ResumeSuspendedCounters{section}
\ResumeSuspendedCounters{subsection}
\section{Foobar}
\blindtext
\end{document}

ここに画像の説明を入力してください

関連情報