-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpdfm.clo
216 lines (199 loc) · 8.09 KB
/
pdfm.clo
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
\NeedsTeXFormat{pLaTeX2e}
\ProvidesFile{pdfm.clo}
[2019/09/26 v1.0 (pdfm column tikz definition)]
\if@BV
% 定義奇數頁糸欄
\def\@ribonodd{%
\foreach \i in {26,61,...,412}{%
% 起始點 26+35pt。从左往右
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 23);}}% 奇數頁絲欄
% 定義偶數頁糸欄
\def\@riboneven{%
\foreach \i in {456,421,...,76}{%
% 起始點 490+35pt。从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 23);}}% 絲欄
% 定義\chapter{}的首頁糸欄有標題不畫欄線。
\def\@chribonodd{%
\foreach \i in {26,61,...,376}{%
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 23);}}% 奇數首頁絲欄
% 定義奇數頁内外邉框
\def\@kasenodd{%
\draw [line width=3pt, color=\@columncolor ] (0.7,2.5) rectangle (15.9,23.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (0.9,2.7) rectangle (15.7,23);% 內框
\draw [line width=3pt, color=\@columncolor ] (0,2.5) -- (0.7,2.5); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (0,23.2) -- (0.7,23.2); % 上栏线
}
% 定義偶數頁内外邉框
\def\@kaseneven{%
\draw [line width=3pt, color=\@columncolor ] (2.3,2.5) rectangle (17.5,23.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (2.5,2.7) rectangle (17.3,23);% 內框
\draw [line width=3pt, color=\@columncolor ] (17.5,2.5) -- (20,2.5); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (17.5,23.2) -- (20,23.2); % 上栏线
}
% 定義奇數頁魚尾、奇偶公用頁碼
\def\@fishodd{%
\draw [line width=20pt, color=\@columncolor ] (0,23.2) -- (0,19.9); % 上封线
\draw [line width=20pt, color=\@columncolor ] (0,2.5) -- (0,5); % 下封线
\node [below,] at%
(0,20) {\hbox{\tate\@tfish}};
\node [below,] at%
(0,9) {\hbox{\tate\@tfish}};
\node [below,] at%
(0,8) {\hbox{\tate\makebox[3zw]{\verthuge\gtfamily\ebseries %
\color{\@masuiro}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(0,6) {\hbox{\tate\@bfish}};
}
%
%% 定義偶數頁魚尾、奇偶公用頁碼
\def\@fisheven{%
\draw [line width=20pt, color=\@columncolor ] (18.2,23.2) -- (18.2,19.9); % 上封线
\draw [line width=20pt, color=\@columncolor ] (18.2,2.5) -- (18.2,5); % 下封线
\node [below,] at%
(18.2,20) {\hbox{\tate\@tfish}};
\node [below,] at%
(18.2,9) {\hbox{\tate\@tfish}};
\node [below,] at%
(18.2,8) {\hbox{\tate\makebox[3zw]{\verthuge\gtfamily\ebseries %
\color{kakiiro!85}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(18.2,6) {\hbox{\tate\@bfish\stepcounter{ppage}}};
}
% 定義奇數頁和偶數頁的水平頁碼,pdfm 啓用
\def\@pdfmpageodd{%
\ifthenelse{\value{page} < 1}{%
\node [right,] at%
(1.6,2.1) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}\stepcounter{szpage}};}
{\node [right,] at%
(1.6,2.1) {\hbox{\yoko\szx\mgfamily~第~\@arabic\c@page~頁\qquad\@signatureodd}};}
}
\def\@pdfmpageven{%
\ifthenelse{\value{page} < 1}{%
\node [left,] at%
(16.5,2.1) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}\stepcounter{szpage}};}
{\node [left,] at%
(16.5,2.1) {\hbox{\yoko\szx\mgfamily\@signatureven\qquad~第~\@arabic\c@page~頁}};}
}
% 定義奇數頁和偶數頁的垂直頁碼,pdfm 不啓用
\def\@ppageodd{%
\node [below,] at%
(1.1,21) {\hbox{\tate\szx\mgfamily\leftmark}}; % 章標題
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(1.1,5) {\hbox{\tate\szx\mgfamily%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(1.1,5) {\hbox{\tate\szx\mgfamily~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\def\@ppageven{%
\node [below,] at%
(17.1,21) {\hbox{\tate\szx\mgfamily\@maintitle}}; % 書名
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(17.1,5) {\hbox{\tate\szx\mgfamily%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(17.1,5) {\hbox{\tate\szx\mgfamily~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\fi % end of BV
\if@AIV
% 定義奇數頁糸欄
\def\@ribonodd{%
\foreach \i in {34,69,...,500}{%
% 起始點 26+35pt。从左往右
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 27);}}% 奇數頁絲欄
% 定義偶數頁糸欄
\def\@riboneven{%
\foreach \i in {563,528,...,76}{%
% 起始點 490+35pt。从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 27);}}% 絲欄
% 定義\chapter{}的首頁糸欄有標題不畫欄線。
\def\@chribonodd{%
\foreach \i in {34,69,...,460}{%
\draw [ color=\@riboncolor ] (\i pt, 2.7)--(\i pt, 27);}}% 奇數首頁絲欄
% 定義奇數頁内外邉框
\def\@kasenodd{%
\draw [line width=3pt, color=\@columncolor ] (1.0,2.5) rectangle (18.6,27.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (1.2,2.7) rectangle (18.4,27);% 內框
\draw [line width=3pt, color=\@columncolor ] (0,2.5) -- (1,2.5); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (0,27.2) -- (1,27.2); % 上栏线
}
% 定義偶數頁内外邉框
\def\@kaseneven{%
\draw [line width=3pt, color=\@columncolor ] (2.35,2.5) rectangle (20,27.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (2.55,2.7) rectangle (19.8,27);% 內框
\draw [line width=3pt, color=\@columncolor ] (20,2.5) -- (21,2.5); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (20,27.2) -- (21,27.2); % 上栏线
}
% 定義奇數頁魚尾、奇偶公用頁碼
\def\@fishodd{%
\draw [line width=20pt, color=\@columncolor ] (0,27.2) -- (0,23); % 上封线
\draw [line width=20pt, color=\@columncolor ] (0,2.5) -- (0,6); % 下封线
\node [below,] at%
(0,23) {\hbox{\tate\@tfish}};
\node [below,] at%
(0,10) {\hbox{\tate\@tfish}};
\node [below,] at%
(0,9) {\hbox{\tate\makebox[3zw]{\verthuge\gtfamily\ebseries %
\color{\@masuiro}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(0,7) {\hbox{\tate\@bfish}};
}
%
%% 定義偶數頁魚尾、奇偶公用頁碼
\def\@fisheven{%
\draw [line width=20pt, color=\@columncolor ] (21,27.2) -- (21,23); % 上封线
\draw [line width=20pt, color=\@columncolor ] (21,2.5) -- (21,6); % 下封线
\node [below,] at%
(21,23) {\hbox{\tate\@tfish}};
\node [below,] at%
(21,10) {\hbox{\tate\@tfish}};
\node [below,] at%
(21,9) {\hbox{\tate\makebox[3zw]{\verthuge\gtfamily\ebseries %
\color{kakiiro!85}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(21,7) {\hbox{\tate\@bfish\stepcounter{ppage}}};
}
% 定義奇數頁和偶數頁的水平頁碼,pdfm 啓用
\def\@pdfmpageodd{%
\ifthenelse{\value{page} < 1}{%
\node [right,] at%
(1.6,2.1) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}\stepcounter{szpage}};}
{\node [right,] at%
(1.6,2.1) {\hbox{\yoko\szx\mgfamily~第~\@arabic\c@page~頁\qquad\@signatureodd}};}
}
\def\@pdfmpageven{%
\ifthenelse{\value{page} < 1}{%
\node [left,] at%
(19.4,2.1) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}\stepcounter{szpage}};}
{\node [left,] at%
(19.4,2.1) {\hbox{\yoko\szx\mgfamily\@signatureven\qquad~第~\@arabic\c@page~頁}};}
}
% 定義奇數頁和偶數頁的垂直頁碼,pdfm 不啓用
\def\@ppageodd{%
\node [below,] at%
(1.2,24) {\hbox{\tate\szx\mgfamily\leftmark}}; % 章標題
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(1.2,5) {\hbox{\tate\szx\mgfamily%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(1.2,5) {\hbox{\tate\szx\mgfamily~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\def\@ppageven{%
\node [below,] at%
(19.8,24) {\hbox{\tate\szx\mgfamily\@maintitle}}; % 書名
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(19.8,5) {\hbox{\tate\szx\mgfamily%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(19.8,5) {\hbox{\tate\szx\mgfamily~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\fi
\endinput
% end of pdfm.clo