刪除章節編號但保留短標題可選參數

刪除章節編號但保留短標題可選參數

我有一個這樣的部分:

\section[ABC]{ABC\footnote{FN1}\footnote{FN2}}

我想刪除節編號,但我必須使用\section[]{}.

所以當我嘗試時

\section*[A]{B}

我只得到

 [

這是我的範例程式碼:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{enumerate}
\usepackage[hidelinks]{hyperref}
\usepackage[stable]{footmisc}


\title{}
\date{}
\begin{document}


\section[TST 2012]{TST 2012\footnote{30 March-31 March-1 April 2013}}

\begin{enumerate}
\item 

\end{enumerate}


\section[TST 2013]{TST 2013\footnote{30 March-31 March-1 April 2013}}

\end{document}

答案1

透過 koma 腳本,您可以使用\addsec.這是一個 MWE:

\documentclass{scrartcl}
\begin{document}
\tableofcontents
\addsec{test}
\end{docum‌​ent}

答案2

如果目的是隱藏所有分段命令(零件和章節除外)的編號,同時仍將它們保留在目錄中,則可以設定計數器secnumdepth並繼續使用\section未加星號的:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{enumerate}
\usepackage[hidelinks]{hyperref}
\usepackage[stable]{footmisc}

\setcounter{secnumdepth}{0}

\title{}
\date{}
\begin{document}


\section[TST 2012]{TST 2012\footnote{30 March-31 March-1 April 2013}}

\begin{enumerate}
\item 

\end{enumerate}


\section[TST 2013]{TST 2013\footnote{30 March-31 March-1 April 2013}}

\end{document}

相關內容