blob: 7e72abe4d67fb8ded704165075aeb925676a4e0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
%%
%% This is file `tabfigures.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% tabfigures.dtx (with options: `package')
%%
%% Copyright (c) 2007 by Andreas Buehmann
%% Copyright (c) 2011 by Michael Ummels <michael.ummels@rwth-aachen.de>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Michael Ummels.
%%
%% This work consists of the files tabfigures.dtx, tabfigures.ins and
%% the derived files tabfigures.sty and tabfigures.pdf.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tabfigures}[2011/09/17 v1.0 Patches for using tabular figures]
\newcommand*\tabfig@@[1]{tabfig@@\expandafter\@cdr\string #1\@nil}
\newcommand*\tabfig@[1]{\csname \tabfig@@{#1}\endcsname}
\newcommand*\tabfig@name{}
\newcommand*\tabfig@save[1]{%
\edef\tabfig@name{\expandafter\expandafter\expandafter
\noexpand\tabfig@{#1}}%
\expandafter\newcommand\tabfig@name{}%
\expandafter\let\tabfig@name #1%
}
\newcommand*\tabfig@def[1]{%
\tabfig@save{#1}%
\def#1%
}
\newcommand*\tabfig@pname{}
\newcommand*\tabfig@patch@l[1]{%
\@ifundefined{l@#1}{}{%
\edef\tabfig@pname{\expandafter\noexpand\csname l@#1\endcsname}%
\expandafter\tabfig@save\tabfig@pname
\expandafter\edef\tabfig@pname##1##2{%
\noexpand\tabfig@
\expandafter\noexpand\tabfig@pname
{##1}{\noexpand\tabfig@font ##2}%
}%
}%
}
\newif\iftabfig@debug \tabfig@debugfalse
\DeclareOption{debug}{\tabfig@debugtrue}
\DeclareOption{eqno}{%
\AtBeginDocument{%
\@ifpackageloaded{amsmath}{%
\tabfig@def\maketag@@@#1{\tabfig@\maketag@@@{\tabfig@font #1}}%
}{%
\CheckCommand*\@eqnnum{{\normalfont \normalcolor (\theequation)}}%
\def\@eqnnum{{\normalfont \tabfig@font \normalcolor (\theequation)}}%
}%
}%
}
\DeclareOption{toc}{%
\AtBeginDocument{%
\tabfig@def\@dottedtocline#1#2#3#4#5{%
\tabfig@\@dottedtocline{#1}{#2}{#3}{#4}{\tabfig@font #5}%
}%
\tabfig@def\numberline#1{%
\tabfig@\numberline{\tabfig@font #1}%
}%
\tabfig@patch@l{part}%
\tabfig@patch@l{chapter}%
\tabfig@patch@l{section}%
\tabfig@patch@l{subsection}%
\tabfig@patch@l{subsubsection}%
\tabfig@patch@l{paragraph}%
\tabfig@patch@l{subparagraph}%
\tabfig@patch@l{figure}%
\tabfig@patch@l{table}%
\@ifclassloaded{memoir}{%
\tabfig@def\cftchapterpresnum{\tabfig@font \tabfig@\cftchapterpresnum}%
\tabfig@def\cftpartpresnum{\tabfig@font \tabfig@\cftpartpresnum}%
}{}%
}%
}
\DeclareOption{enum}{%
\AtBeginDocument{%
\tabfig@def\labelenumi{\tabfig@font \tabfig@\labelenumi}%
\tabfig@def\labelenumii{\tabfig@font \tabfig@\labelenumii}%
\tabfig@def\labelenumiii{\tabfig@font \tabfig@\labelenumiii}%
\tabfig@def\labelenumiv{\tabfig@font \tabfig@\labelenumiv}%
}%
}
\DeclareOption{bib}{%
\AtBeginDocument{%
\tabfig@def\@biblabel{\tabfig@font \tabfig@\@biblabel}%
\@ifpackageloaded{biblatex}{%
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{\tabfig@font #1}}%
\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{\tabfig@font #1}}%
}{}%
}%
}
\DeclareOption{lineno}{%
\AtBeginDocument{%
\@ifpackageloaded{doc}{%
\CheckCommand*\theCodelineNo{%
\reset@font\scriptsize\arabic{CodelineNo}}%
\def\theCodelineNo{%
\reset@font\tabfig@font\scriptsize\arabic{CodelineNo}}%
}{}%
}%
}
\ProcessOptions\relax
\newcommand*\tabfig@font{\tbfigures}
\iftabfig@debug
\RequirePackage{xcolor}%
\colorlet{tabfig@debug}{green!50!black}%
\renewcommand\tabfig@font{\tbfigures\color{tabfig@debug}}%
\fi
\AtBeginDocument{%
\@ifundefined{tbfigures}{%
\PackageWarning{tabfigures}{There is no command
\string\tbfigures\space to support tabular figures}%
\let\tabfig@font\@empty
}{}%
}
%%
%%
%% End of file `tabfigures.sty'.
|