| 1 |
% \iffalse |
| 2 |
%<*internal> |
| 3 |
\iffalse |
| 4 |
%</internal> |
| 5 |
%<*readme> |
| 6 |
_________________ |
| 7 |
The ftnxtra package |
| 8 |
v0.1 |
| 9 |
|
| 10 |
This package fixes the issue of footnote inside \caption{}, |
| 11 |
tabular environment and \section{} like (\chapter{}, \part{}, \subsection{} and etc) commands. |
| 12 |
|
| 13 |
If you want to report any bugs or typos and corrections in the documentation, |
| 14 |
or ask for any new features, or suggest any improvements, or ask any questions |
| 15 |
about the package, then please do not send any direct emails to us; we will not |
| 16 |
answer any direct emails. Instead please use the issue tracker: |
| 17 |
<https://github.com/persian-tex/ftnxtra/issues> |
| 18 |
In doing so, please always explain your issue well enough, always include |
| 19 |
a minimal working examples showing the issue, and always choose the appropriate |
| 20 |
label for your query (i.e. if you are reporting any bugs, choose `bug' label). |
| 21 |
|
| 22 |
Current version release date: 2013/04/04 |
| 23 |
______________ |
| 24 |
Persian TeX Group |
| 25 |
[email protected] |
| 26 |
|
| 27 |
Copyright 2009–2013 |
| 28 |
Distributed under the LaTeX Project Public License |
| 29 |
%</readme> |
| 30 |
%<*internal> |
| 31 |
\fi |
| 32 |
\begingroup |
| 33 |
%</internal> |
| 34 |
%<*batchfile> |
| 35 |
\input docstrip.tex |
| 36 |
\keepsilent |
| 37 |
\preamble |
| 38 |
|
| 39 |
__________________________________ |
| 40 |
Copyright (C) 2009–2013 Persian TeX Group |
| 41 |
|
| 42 |
License information appended. |
| 43 |
|
| 44 |
|
| 45 |
\endpreamble |
| 46 |
\postamble |
| 47 |
|
| 48 |
Copyright (C) 2009–2013 by Persian TeX Group <[email protected]> |
| 49 |
|
| 50 |
Distributable under the LaTeX Project Public License, |
| 51 |
version 1.3c or higher (your choice). The latest version of |
| 52 |
this license is at: http://www.latex-project.org/lppl.txt |
| 53 |
|
| 54 |
This work is "maintained" (as per LPPL maintenance status) |
| 55 |
by Persian TeX Group. |
| 56 |
|
| 57 |
This work consists of the file ftnxtra.dtx |
| 58 |
and the derived files ftnxtra.sty, |
| 59 |
ftnxtra.ins, and |
| 60 |
ftnxtra.pdf. |
| 61 |
|
| 62 |
\endpostamble |
| 63 |
\askforoverwritefalse |
| 64 |
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} |
| 65 |
%</batchfile> |
| 66 |
%<batchfile>\endbatchfile |
| 67 |
%<*internal> |
| 68 |
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} |
| 69 |
\nopreamble\nopostamble |
| 70 |
\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} |
| 71 |
\endgroup |
| 72 |
\immediate\write18{mv README.txt README} |
| 73 |
\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx} |
| 74 |
\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo} |
| 75 |
%</internal> |
| 76 |
% |
| 77 |
%<*driver> |
| 78 |
\documentclass{ltxdoc} |
| 79 |
\EnableCrossrefs |
| 80 |
\CodelineIndex |
| 81 |
\RecordChanges |
| 82 |
\OnlyDescription |
| 83 |
\begin{document} |
| 84 |
\DocInput{\jobname.dtx} |
| 85 |
\end{document} |
| 86 |
%</driver> |
| 87 |
% |
| 88 |
% |
| 89 |
% \fi |
| 90 |
% |
| 91 |
% \GetFileInfo{\jobname.sty} |
| 92 |
% \CheckSum{0} |
| 93 |
% \makeatletter |
| 94 |
% |
| 95 |
% \title{The \textsf{ftnxtra} package} |
| 96 |
% \author{Persian TeX Group} |
| 97 |
% |
| 98 |
% |
| 99 |
% \StopEventually{} |
| 100 |
% |
| 101 |
% \part{\textsf{\jobname} implementation} |
| 102 |
%\iffalse |
| 103 |
%<*package> |
| 104 |
%\fi |
| 105 |
% \begin{macrocode} |
| 106 |
\NeedsTeXFormat{LaTeX2e} |
| 107 |
\ProvidesPackage{ftnxtra}% |
| 108 |
[2013/04/04 footnote fixes for standard LaTeX] |
| 109 |
\newtoks\ftnxtra@p@ftn |
| 110 |
\let\FN@sf@@footnote\footnote |
| 111 |
\def\footnote{\ifx\protect\@typeset@protect |
| 112 |
\expandafter\FN@sf@@footnote |
| 113 |
\else |
| 114 |
\expandafter\FN@sf@gobble@opt |
| 115 |
\fi |
| 116 |
} |
| 117 |
\edef\FN@sf@gobble@opt{\noexpand\protect |
| 118 |
\expandafter\noexpand\csname FN@sf@gobble@opt \endcsname} |
| 119 |
\expandafter\def\csname FN@sf@gobble@opt \endcsname{% |
| 120 |
\@ifnextchar[%] |
| 121 |
\FN@sf@gobble@twobracket |
| 122 |
\@gobble |
| 123 |
} |
| 124 |
\def\FN@sf@gobble@twobracket[#1]#2{} |
| 125 |
\let\FN@sf@@footnotemark\footnotemark |
| 126 |
\def\footnotemark{\ifx\protect\@typeset@protect |
| 127 |
\expandafter\FN@sf@@footnotemark |
| 128 |
\else |
| 129 |
\expandafter\FN@sf@gobble@optonly |
| 130 |
\fi |
| 131 |
} |
| 132 |
\edef\FN@sf@gobble@optonly{\noexpand\protect |
| 133 |
\expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname} |
| 134 |
\expandafter\def\csname FN@sf@gobble@optonly \endcsname{% |
| 135 |
\@ifnextchar[%] |
| 136 |
\FN@sf@gobble@bracket |
| 137 |
{}% |
| 138 |
} |
| 139 |
\def\FN@sf@gobble@bracket[#1]{} |
| 140 |
\def\@tabular{% |
| 141 |
\leavevmode \hbox \bgroup |
| 142 |
\let\@footnotetext\ftnxtra@p@ftntext |
| 143 |
$\let\@acol\@tabacol |
| 144 |
\let\@classz\@tabclassz |
| 145 |
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray} |
| 146 |
\def\endtabular{\crcr\egroup |
| 147 |
\egroup $\egroup |
| 148 |
\the\ftnxtra@p@ftn |
| 149 |
\global\ftnxtra@p@ftn{}% |
| 150 |
} |
| 151 |
\long\def\ftnxtra@p@ftntext#1{% |
| 152 |
\edef\@tempy{\the\ftnxtra@p@ftn\noexpand\footnotetext[\the\c@footnote]}% |
| 153 |
\global\ftnxtra@p@ftn\expandafter{\@tempy{#1}}}% |
| 154 |
\def\@xfloat #1[#2]{% |
| 155 |
\@nodocument |
| 156 |
\def \@captype {#1}% |
| 157 |
\def \@fps {#2}% |
| 158 |
\@onelevel@sanitize \@fps |
| 159 |
\def \reserved@b {!}% |
| 160 |
\ifx \reserved@b \@fps |
| 161 |
\@fpsadddefault |
| 162 |
\else |
| 163 |
\ifx \@fps \@empty |
| 164 |
\@fpsadddefault |
| 165 |
\fi |
| 166 |
\fi |
| 167 |
\ifhmode |
| 168 |
\@bsphack |
| 169 |
\@floatpenalty -\@Mii |
| 170 |
\else |
| 171 |
\@floatpenalty-\@Miii |
| 172 |
\fi |
| 173 |
\ifinner |
| 174 |
\@parmoderr\@floatpenalty\z@ |
| 175 |
\else |
| 176 |
\@next\@currbox\@freelist |
| 177 |
{% |
| 178 |
\@tempcnta \sixt@@n |
| 179 |
\expandafter \@tfor \expandafter \reserved@a |
| 180 |
\expandafter :\expandafter =\@fps |
| 181 |
\do |
| 182 |
{% |
| 183 |
\if \reserved@a h% |
| 184 |
\ifodd \@tempcnta |
| 185 |
\else |
| 186 |
\advance \@tempcnta \@ne |
| 187 |
\fi |
| 188 |
\fi |
| 189 |
\if \reserved@a t% |
| 190 |
\@setfpsbit \tw@ |
| 191 |
\fi |
| 192 |
\if \reserved@a b% |
| 193 |
\@setfpsbit 4% |
| 194 |
\fi |
| 195 |
\if \reserved@a p% |
| 196 |
\@setfpsbit 8% |
| 197 |
\fi |
| 198 |
\if \reserved@a !% |
| 199 |
\ifnum \@tempcnta>15 |
| 200 |
\advance\@tempcnta -\sixt@@n\relax |
| 201 |
\fi |
| 202 |
\fi |
| 203 |
}% |
| 204 |
\@tempcntb \csname ftype@\@captype \endcsname |
| 205 |
\multiply \@tempcntb \@xxxii |
| 206 |
\advance \@tempcnta \@tempcntb |
| 207 |
\global \count\@currbox \@tempcnta |
| 208 |
}% |
| 209 |
\@fltovf |
| 210 |
\fi |
| 211 |
\global \setbox\@currbox |
| 212 |
\color@vbox |
| 213 |
\normalcolor |
| 214 |
\vbox \bgroup |
| 215 |
\let\@footnotetext\ftnxtra@p@ftntext |
| 216 |
\hsize\columnwidth |
| 217 |
\@parboxrestore |
| 218 |
\@floatboxreset |
| 219 |
} |
| 220 |
\def \@endfloatbox{% |
| 221 |
\par\vskip\z@skip %% \par\vskip\z@ added 15 Dec 87 |
| 222 |
\@minipagefalse |
| 223 |
\outer@nobreak |
| 224 |
\egroup %% end of vbox |
| 225 |
\the\ftnxtra@p@ftn |
| 226 |
\global\ftnxtra@p@ftn{}% |
| 227 |
\color@endbox |
| 228 |
} |
| 229 |
% \end{macrocode} |
| 230 |
%\iffalse |
| 231 |
%</package> |
| 232 |
%\fi |
| 233 |
% |
| 234 |
% \typeout{*************************************************************} |
| 235 |
% \typeout{*} |
| 236 |
% \typeout{* To finish the installation you have to move the following} |
| 237 |
% \typeout{* file into a directory searched by TeX:} |
| 238 |
% \typeout{*} |
| 239 |
% \typeout{* \space\space\space ftnxtra.sty} |
| 240 |
% \typeout{*} |
| 241 |
% \typeout{*************************************************************} |
| 242 |
% |
| 243 |
\endinput |