• No results found

The ftnxtra package

N/A
N/A
Protected

Academic year: 2021

Share "The ftnxtra package"

Copied!
3
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The ftnxtra package

Persian TeX Group 2009/10/18

This package fixes the isuue of footnote inside \caption{}, tabular environment and \section{} like (\chapter{}, \part{}, \subsection{} and etc) commands.

File I

ftnxtra implementation

1\NeedsTeXFormat{LaTeX2e}

2\ProvidesPackage{ftnxtra}%

3[2013/04/04 footnote fixes for standard LaTeX]

4\newtoks\ftnxtra@p@ftn

5\let\FN@sf@@footnote\footnote

6\def\footnote{\ifx\protect\@typeset@protect

7 \expandafter\FN@sf@@footnote

8 \else

9 \expandafter\FN@sf@gobble@opt

10 \fi

11}

12\edef\FN@sf@gobble@opt{\noexpand\protect

13 \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}

14\expandafter\def\csname FN@sf@gobble@opt \endcsname{%

15 \@ifnextchar[%]

16 \FN@sf@gobble@twobracket

17 \@gobble

18}

19\def\FN@sf@gobble@twobracket[#1]#2{}

20\let\FN@sf@@footnotemark\footnotemark

21\def\footnotemark{\ifx\protect\@typeset@protect

22 \expandafter\FN@sf@@footnotemark

23 \else

24 \expandafter\FN@sf@gobble@optonly

25 \fi

26}

27\edef\FN@sf@gobble@optonly{\noexpand\protect

28 \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname}

29\expandafter\def\csname FN@sf@gobble@optonly \endcsname{%

1

(2)

30 \@ifnextchar[%]

31 \FN@sf@gobble@bracket

32 {}%

33}

34\def\FN@sf@gobble@bracket[#1]{}

35\def\@tabular{%

36 \leavevmode \hbox \bgroup

37 \let\@footnotetext\ftnxtra@p@ftntext

38 $\let\@acol\@tabacol

39 \let\@classz\@tabclassz

40 \let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}

41\def\endtabular{\crcr\egroup

42 \egroup $\egroup

43 \the\ftnxtra@p@ftn

44 \global\ftnxtra@p@ftn{}%

45 }

46\long\def\ftnxtra@p@ftntext#1{%

47 \edef\@tempy{\the\ftnxtra@p@ftn\noexpand\footnotetext[\the\c@footnote]}%

48 \global\ftnxtra@p@ftn\expandafter{\@tempy{#1}}}%

49\def\@xfloat #1[#2]{%

50 \@nodocument

51 \def \@captype {#1}%

52 \def \@fps {#2}%

53 \@onelevel@sanitize \@fps

54 \def \reserved@b {!}%

55 \ifx \reserved@b \@fps

56 \@fpsadddefault

57 \else

58 \ifx \@fps \@empty

59 \@fpsadddefault

60 \fi

61 \fi

62 \ifhmode

63 \@bsphack

64 \@floatpenalty -\@Mii

65 \else

66 \@floatpenalty-\@Miii

67 \fi

68 \ifinner

69 \@parmoderr\@floatpenalty\z@

70 \else

71 \@next\@currbox\@freelist

72 {%

73 \@tempcnta \sixt@@n

74 \expandafter \@tfor \expandafter \reserved@a

75 \expandafter :\expandafter =\@fps

76 \do

77 {%

78 \if \reserved@a h%

79 \ifodd \@tempcnta

2

(3)

80 \else

81 \advance \@tempcnta \@ne

82 \fi

83 \fi

84 \if \reserved@a t%

85 \@setfpsbit \tw@

86 \fi

87 \if \reserved@a b%

88 \@setfpsbit 4%

89 \fi

90 \if \reserved@a p%

91 \@setfpsbit 8%

92 \fi

93 \if \reserved@a !%

94 \ifnum \@tempcnta>15

95 \advance\@tempcnta -\sixt@@n\relax

96 \fi

97 \fi

98 }%

99 \@tempcntb \csname ftype@\@captype \endcsname

100 \multiply \@tempcntb \@xxxii

101 \advance \@tempcnta \@tempcntb

102 \global \count\@currbox \@tempcnta

103 }%

104 \@fltovf

105 \fi

106 \global \setbox\@currbox

107 \color@vbox

108 \normalcolor

109 \vbox \bgroup

110 \let\@footnotetext\ftnxtra@p@ftntext

111 \hsize\columnwidth

112 \@parboxrestore

113 \@floatboxreset

114}

115\def \@endfloatbox{%

116 \par\vskip\z@skip %% \par\vskip\z@ added 15 Dec 87

117 \@minipagefalse

118 \outer@nobreak

119 \egroup %% end of vbox

120 \the\ftnxtra@p@ftn

121 \global\ftnxtra@p@ftn{}%

122 \color@endbox

123}

3

Referenties

GERELATEERDE DOCUMENTEN

This package provides commands for vectors, matrices, and tensors with different styles (arrows as the L A TEX default, underlined, and

The output of your code is saved into the file provided as the second optional argument of \iexec (the default value is iexec.tmp ):. 6 Today is \iexec[date.txt]{date +\%e-\%b-\%Y |

[r]

For example, the code point U+006E (the Latin lowercase ”n”) followed by U+0303 (the combining tilde) is defined by Unicode to be canonically equivalent to the single code point

The default values for the items in the \paperref environment are the following command punctation begin commands end commands.. \by ,

This example document has an eccentric section numbering system where the section number is prefixed by the chapter number in square brackets.. [1]1 First

With the optional parameter h-offset one can adapt the (horizontal ) distance between hand and compass (default 0pt). The 4 mandatory parameters define the cards for the

The package then stores the dates of files and packages loaded after itself including its own