Skip to content

Instantly share code, notes, and snippets.

@astronasutarou
Last active December 31, 2015 10:39
Show Gist options
  • Save astronasutarou/7974357 to your computer and use it in GitHub Desktop.
Save astronasutarou/7974357 to your computer and use it in GitHub Desktop.
deluxetable.sty で cont'd なテーブルを表目次に載せないためのハック
diff --git a/deluxetable.sty b/deluxetable.sty
index *******..******* ******
--- a/deluxetable.sty
+++ b/deluxetable.sty
@@ -127,7 +127,10 @@
\pt@ncol=#1\relax
\global\let\pt@addcol\@empty
}%
-\newcommand\tablecaption[1]{\gdef\pt@caption{#1}}%
+\newcommand\tablecaption[1]{%
+ \gdef\pt@caption{#1}
+ \gdef\pt@short@caption{#1}
+}%
\newcommand\tablehead[1]{%
\gdef\pt@head{%
\hline\hline
@@ -153,6 +156,7 @@
\newcommand\tableheadfrac[1]{\gdef\pt@headfrac{#1}}%
\AtBeginDocument{%
\let\pt@caption\@empty
+ \let\pt@short@caption\@empty
\let\pt@head\@empty
\let\pt@tail\@empty
\pt@width\textwidth
@@ -279,7 +283,7 @@
\def\start@pt@tabular{%
\@plano@float
\center
- \expandafter\caption\expandafter{\pt@caption}%
+ \expandafter\caption\expandafter[\pt@short@caption]{\pt@caption}%
\pt@typesize%AO-type sizes in deluxetable
\expandafter\@tabular\expandafter{\pt@format}%
}%
@@ -332,7 +336,8 @@
\endcenter
\end@plano@float
\clearpage
- \addtocounter{table}{\m@ne}%
+ \addtocounter{table}{\m@ne}%
+ \let\pt@short@caption\empty
\let\fnum@table=\fnum@ptablecont
\let\@makecaption\@makecaption@plano@cont
\global\pt@ncol=\pt@column% Either 0 or value of \tablecolumns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment