-
Notifications
You must be signed in to change notification settings - Fork 5
/
b5pdfm.clo
108 lines (99 loc) · 3.75 KB
/
b5pdfm.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
\NeedsTeXFormat{pLaTeX2e}
\ProvidesFile{b5pdfm.clo}
[2019/09/27 v1.0 (page size option)]
% B5 定義
% 定義奇數頁糸欄
\def\@ribonodd{%
\foreach \i in {443,391,...,60}{%
% 起始點 416+25.5pt。起始点 + 52pt 每栏 从右往左
\draw [ color=\@riboncolor ] (\i pt, 3.2)--(\i pt, 22);}}% 奇數頁絲欄
% 定義偶數頁糸欄
\def\@riboneven{%
\foreach \i in {442,390,...,80}{%
% 起始點 416+25.5pt。起始点 + 52pt 每栏 从右往左
\draw [ color=\@riboncolor ] (\i pt, 3.2)--(\i pt, 22);}}% 絲欄
% 定義奇數頁内外邉框
\def\@kasenodd{%
\draw [line width=3pt, color=\@columncolor ] (0.7,3.0) rectangle (15.8,22.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (0.9,3.2) rectangle (15.6,22);% 內框
\draw [line width=3pt, color=\@columncolor ] (0,3.0) -- (0.7,3.0); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (0,22.2) -- (0.7,22.2); % 上栏线
}
% 定義偶數頁内外邉框
\def\@kaseneven{%
\draw [line width=3pt, color=\@columncolor ] (2.5,3.0) rectangle (17.5,22.2);% 外框
\draw [line width=1pt, color=\@riboncolor ] (2.7,3.2) rectangle (17.3,22);% 內框
\draw [line width=3pt, color=\@columncolor ] (17.5,3.0) -- (20,3.0); % 下栏线
\draw [line width=3pt, color=\@columncolor ] (17.5,22.2) -- (20,22.2); % 上栏线
}
% 定義奇數頁魚尾、奇偶公用頁碼
\def\@fishodd{%
\draw [line width=20pt, color=\@columncolor ] (0,22.2) -- (0,20); % 上封线
\draw [line width=20pt, color=\@columncolor ] (0,3.0) -- (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,22.2) -- (18.2,20); % 上封线
\draw [line width=20pt, color=\@columncolor ] (18.2,3.0) -- (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{\@masuiro}\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%
(0.6,2.6) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}%
\stepcounter{szpage}};}
{\node [right,] at%
(0.6,2.6) {\hbox{\yoko\szx\mgfamily~第~\@arabic\c@page~頁}};}
}
\def\@pdfmpageven{%
\ifthenelse{\value{page} < 1}{%
\node [left,] at%
(17.5,2.6) {\hbox{\yoko\szx\mgfamily~(第~\zhnumber{\@arabic\c@szpage}~頁)}%
\stepcounter{szpage}};}
{\node [left,] at%
(17.5,2.6) {\hbox{\yoko\szx\mgfamily~第~\@arabic\c@page~頁}%
};}
}
% 定義奇數頁和偶數頁的垂直頁碼,pdfm 不啓用
\def\@ppageodd{%
\node [below,] at%
(1.2,19) {\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%
(17.0,19) {\hbox{\tate\szx\mgfamily\@maintitle}}; % 書名
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(17.0,5) {\hbox{\tate\szx\mgfamily%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(17.0,5) {\hbox{\tate\szx\mgfamily~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\endinput
% end of b5pdfm.clo