LoginSignup
10
5

More than 3 years have passed since last update.

TeX の表中の脚注を表の直下につける

Last updated at Posted at 2019-10-31

この記事を読むとできるようになること
TeXで,表中につけた脚注をページ下ではなく表のすぐ下に書ける

  • 環境
    • macOS mojave 10.14.6
    • TeXshop 4.44

TeXで表を書いていたら,こんな感じに表中に脚注をつけたくなりました.
スクリーンショット 2019-10-31 15.05.04.png

これを出力したくて,以下のように書いてみました.

table_sample.tex
¥begin{table}[h]
¥begin{center}
¥caption{member list}
¥label{tab:menber}
¥begin{tabular}{ccc}¥hline
Name &age &nicname¥¥¥hline¥hline
Satoshi &34¥footnote{Emikoさんに聞いた} &doraemon¥¥
Taro    &24¥footnote{Takeshi君に聞いた} &Tarorian¥¥
Shinichi &21 &Conan¥¥
Jiro    &30 &Ramen¥¥¥hline
¥end{tabular}
¥end{center}
¥end{table}

これをタイプセットしてみると… あれれ〜?
スクリーンショット 2019-10-31 15.20.53.png

脚注が出力されません.

Table.1 のように脚注をつけるには,threeparttable パッケージを使うとよいです.

table_sample2.tex

%プリアンブルに以下を記述
¥usepackage{threeparttable}
%...(省略)...

¥begin{center}
¥begin{threeparttable}[h]
¥caption{member list}
¥label{tab:menber}
¥begin{tabular}{ccc}¥hline
Name &age &nickname¥¥¥hline¥hline
Satoshi &34¥tnote{a} &doraemon¥¥
Taro    &24¥tnote{b} &Tarorian¥¥
Shinichi &21 &Conan¥¥
Jiro    &30 &Ramen¥¥¥hline
¥end{tabular}
¥begin{tablenotes}
¥item[a] Emikoさんに聞いた.
¥item[b] Tekeshi君に聞いた.
¥end{tablenotes}
¥end{threeparttable}
¥end{center}

表中の脚注をつけたいところに \tnote{a} などと書きます.
\tnote{1} とか,\tnote{*} でも大丈夫です.

脚注の中身は ¥begin{tablenotes} 以下に書きます.
ここも,\item[1] とかでも大丈夫です.

普通の脚注 \footnote と違うのは,
\tnote\item がリンクしていないことです(したがって,ハイパーリンク機能を使っていても適用されません).

10
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
5