我用这在 KOMA 脚本中获取标题的方法,其行为类似于 caption 包的 caption*。因为我使用此命令来解释表格和图形,所以我不希望在 listoftables 中出现条目。我该如何摆脱它?
\documentclass[12pt,DIV=11,oneside,appendixprefix,numbers=noenddot]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\makeatletter
\newcommand\WLcaption[1]{%
\renewcommand*{\figureformat}{}
\renewcommand*{\tableformat}{}
\renewcommand*{\captionformat}{}
\addtocounter{\@captype}{-1}
\caption{#1}}
\makeatother
%\usepackage{caption}
\begin{document}
\listoftables
\begin{table}
\centering
\captionabove{Reform threshold as a function of the degree of risk aversion}
\begin{tabular}{| c c| c c | p{5cm} |}
\hline
\textbf{Risk aversion \(\gamma\)} & \textbf{Reform threshold \(\tau\)} \\ \hline
0 & 48.3 \\ \hline
1 & 55.2 \\ \hline
2 & 61.0 \\ \hline
3 & 65.9 \\ \hline
4 & 69.9 \\ \hline
\end{tabular}
\WLcaption{\textit{Note:} Some Note without number but unfortunately with an entrance in the list of tables}
\end{table}
\end{document}
答案1
我只需将注释放在表格下方:
\documentclass[12pt,DIV=11,oneside,numbers=noenddot]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\makeatletter
\newcommand\WLcaption[1]{%
\begin{minipage}{\textwidth}
\vspace*{\baselineskip}
#1
\end{minipage}
}
\makeatother
%\usepackage{caption}
\begin{document}
\listoftables
\begin{table}
\centering
\captionabove{Reform threshold as a function of the degree of risk aversion}
\begin{tabular}{| c c| c c | p{5cm} |}
\hline
\textbf{Risk aversion \(\gamma\)} & \textbf{Reform threshold \(\tau\)} \\ \hline
0 & 48.3 \\ \hline
1 & 55.2 \\ \hline
2 & 61.0 \\ \hline
3 & 65.9 \\ \hline
4 & 69.9 \\ \hline
\end{tabular}
\WLcaption{\textit{Note:} Some Note without number but unfortunately with an entrance in the list of tables}
\end{table}
\end{document}