表のキャプションには脚注があるが、表のリストにはない

表のキャプションには脚注があるが、表のリストにはない

次の問題があります: 私の表は でフォーマットされていますcaption[title]{long description...}。次の例のように、キャプションに脚注としてソースを追加する必要があります。

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

私はこれを試しました:図の\captionで\footnoteを使用するしかし、問題は、脚注が文書の先頭にある表のリストにも表示されることです。

「The red fox - attribute」は であり[title]、テキストの残りの部分は であり{long description}、ここでは次のように使用されていることに注意してください。scrreprt クラスのキャプションから表のタイトルを追加する

また、すべてのキャプションに脚注を使用しているわけではないので、脚注を追加するオプション(必須ではない)を提供するという点で、ソリューションは柔軟である必要があります。

上記の形式は可能ですか?

望ましくない結果を招くことなく安全に機能するソリューションを探しています。

MWE:

\documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}
\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,singlelinecheck=false,format=plain, parindent=1em]{caption}
\newlength\myindention
\setlength\myindention{1em} 
\usepackage{chngcntr}
\counterwithout{table}{chapter}

\let\oldcaption\caption
\renewcommand*\caption[2][]{%
\oldcaption[#1]{#1\\\hspace*{\myindention}#2}%
}

\begin{document}

\listoftables

\chapter{Introduction}
\begin{table}[h]
\caption[title table 1]{description table 1}
\fbox{content}
\end{table}

\end{document} 

ありがとう。

答え1

もし、のみ違いは、\footnotemarkタイトルの最後に が必要な場合があり、+それを追加するトグル (星印の付いたマクロの一般化) を定義できることです。

\documentclass{scrreprt}

\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,
    singlelinecheck=false,format=plain, parindent=1em]{caption}


\usepackage{xparse}

\newlength\myindention
\setlength\myindention{1em} 

\let\oldcaption\caption
\RenewDocumentCommand { \caption } { t{+} O{} m } {%
    \oldcaption[#2]{%
        #2%
        \IfBooleanT{#1}{\footnotemark}
        \\%
        \hspace*{\myindention}#3
    }%
}

\begin{document}

\listoftables

\chapter{Introduction}
\begin{table}[h]
\caption[title table 1]{description table 1}
\fbox{content}
\end{table}

\begin{table}[h]
\caption+[title table 2]{description table 2}
\fbox{content}
\end{table}
\footnotetext{Source.}

\end{document}

その後、\captionMWE と\caption+同じように動作しますが、\footnotemarkタイトルの末尾 (つまり\IfBooleanT行) に追加します。明確にするために:

  • ソース付きの表:\caption+[title]{description}その後\footnotetext
  • ソースのない表:\caption[title]{description}のみ

答え2

あまりエレガントではありませんが、機能しているようです:

\documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}
\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,singlelinecheck=false,format=plain, parindent=1em]{caption}
\newlength\myindention
\setlength\myindention{1em}
\usepackage{chngcntr}
\counterwithout{table}{chapter}
\usepackage{xparse}

\let\oldcaption\caption
\RenewDocumentCommand\caption{D [] {} D [] {} m}{%
  \def\tempa{}%
  \def\tempb{#1}%
  \def\tempc{#2}%
  \ifx\tempa\tempb\def\tempb{#3}\fi%
  \ifx\tempa\tempc\let\tempc\tempb\fi%
  \oldcaption[\tempb]{\tempc\\\hspace*{\myindention}#3}%
  }

\begin{document}

\listoftables

\chapter{Introduction}
\begin{table}[h]
\caption[title table 1][title table 1\footnotemark]{description table 1}
\fbox{content}
\end{table}

Anywhere on the same page where the float appears\footnotetext{blah}
but at least before the next footnote\footnote{the nextone}

\end{document}

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

ただし、他の誰かがもっと良い提案をしてくれるだろうと思うので、時間が重要な場合にのみこれをお勧めします。

関連情報