-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpsets.sty
More file actions
191 lines (169 loc) · 6.74 KB
/
psets.sty
File metadata and controls
191 lines (169 loc) · 6.74 KB
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
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage[hang]{footmisc}
\usepackage{tikz}
\usetikzlibrary{positioning, calc, patterns}
\geometry{top=120pt,bottom=60pt,left=70pt,right=70pt,headheight=20pt,headsep=4pt}
\usepackage{xcolor}
\definecolor{darkolivegreen}{RGB}{85,107,47}
\definecolor{chocolate}{RGB}{210,105,30}
\definecolor{midnightblue}{RGB}{25,25,112}
\definecolor{maroon}{RGB}{128,0,0}
\definecolor{forestgreen}{RGB}{34,139,34}
\definecolor{mediumvioletred}{RGB}{199,21,133}
\definecolor{orangered}{RGB}{255,69,0}
\definecolor{darkmagenta}{RGB}{139,0,139}
\usepackage{tcolorbox}
\tcbuselibrary{raster,skins,breakable}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{txfonts}
\usepackage{bm}
\usepackage{datetime2}
\usepackage{empheq}
\usepackage{bussproofs}
% === 全体汎用 ===
%0埋め2桁数字に変換
\newcommand{\cnttwo}[1]{
\ifnum \value{#1}<10
0\arabic{#1}
\else
\arabic{#1}
\fi
}
% ローマ数字出力
\newcounter{num}
\newcommand{\Rnum}[1]{\setcounter{num}{#1} \hspace{-.3em}\Roman{num}}
\newcommand{\rnum}[1]{\setcounter{num}{#1} \hspace{-.3em}\roman{num}}
% 注釈
% text...\\
% \annot
% annotation...
\newcommand{\annot}{
\hrule width 6cm
\vspace{1mm}
}
% 注釈のインデント調整
\setlength{\footnotemargin}{2mm}
% === ページ設定 ===
\pagestyle{fancy}
% カウンタ設定
\newcounter{secn} % 章のカウンタ
\setcounter{secn}{-1}
\newcounter{pn}[secn] % 章ごとのページカウンタ
\setcounter{pn}{0}
\let\np\newpage
\renewcommand{\newpage}{
\np
\stepcounter{pn}
}
% 通常ページの設定
\fancypagestyle{pg}{
\newgeometry{top=100pt,bottom=60pt,left=70pt,right=70pt,headheight=20pt,headsep=4pt}
\lhead{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north)}]
\fill [black] (-9.65, -1.9) node[right] {{\Large \textbf{数学問題集}}};
\fill [black] (9.15, -1.9) node[left] {{\Large \textbf{プリント}}{\large \cnttwo{secn}}{\normalsize -\cnttwo{pn}}};
\fill [black] (-9.5,-2.8) rectangle (9, -2.2);
\fill [white] (-9.2,-2.5) node[right] {{\normalsize \textbf{制作者 : }}{\large \textbf{Anman}}};
\end{tikzpicture}
}
\lfoot{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.south)}]
\fill [black] (-9.5, 1) rectangle (9, 1.6);
\fill [white] (0, 1.3) node {\thepage};
\end{tikzpicture}
}
\cfoot{}
\renewcommand{\headrulewidth}{0pt}
}
% 章立てページのデザインを現在のページに反映
% \pgs{タイトル名前}
\newcommand{\pgs}[1]{
\fancypagestyle{pgs}{
\newgeometry{top=130pt,bottom=60pt,left=70pt,right=70pt,headheight=20pt,headsep=4pt}
\lhead{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north)}]
\fill [black] (-9.65, -1.9) node[right] {{\Large \textbf{数学問題集}}};
\fill [black] (9.15, -1.9) node[left] {{\Large \textbf{プリント}}{\large \cnttwo{secn}}{\normalsize -\cnttwo{pn}}};
\fill [black] (-9.5,-2.8) rectangle (9, -2.2);
\fill [white] (-9.2,-2.5) node[right] {{\normalsize \textbf{制作者 : }}{\large \textbf{Anman}}};
\fill [black] (0, -3.2) node {{\LARGE \textbf{#1}}};
\fill [black] (-9.5,-4) rectangle (9, -3.5);
\fill [white] (-9.2,-3.8) node[right] {{\small \textbf{更新日 : \number\day/\number\month/\number\year\ version \version}}};
\end{tikzpicture}
}
\lfoot{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.south)}]
\fill [black] (-9.5, 1) rectangle (9, 1.6);
\fill [white] (0, 1.3) node {\thepage};
\end{tikzpicture}
}
\cfoot{}
\renewcommand{\headrulewidth}{0pt}
}
\thispagestyle{pgs}
\stepcounter{secn}
\setcounter{numpb}{0}
}
% 章立てページのデザインを現在のページに反映(色も設定する)
% 以降の通常ページの色も変更
\newcommand{\pgsc}[3]{
\fancypagestyle{pgs}{
\newgeometry{top=130pt,bottom=60pt,left=70pt,right=70pt,headheight=20pt,headsep=4pt}
\lhead{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north)}]
\fill [#2] (-9.65, -1.9) node[right] {{\Large \textbf{数学問題集}}};
\fill [#2] (9.15, -1.9) node[left] {{\Large \textbf{プリント}}{\large \cnttwo{secn}}{\normalsize -\cnttwo{pn}}};
\fill [#2] (-9.5,-2.8) rectangle (9, -2.2);
\fill [white] (-9.2,-2.5) node[right] {{\normalsize \textbf{制作者 : }}{\large \textbf{Anman}}};
\fill [#2] (0, -3.2) node {{\LARGE \textbf{#1}}};
\fill [#2] (-9.5,-4) rectangle (9, -3.5);
\fill [white] (-9.2,-3.8) node[right] {{\small \textbf{更新日 : \number\day/\number\month/\number\year\ version \version}}};
\end{tikzpicture}
}
\lfoot{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.south)}]
\fill [#2] (-9.5, 1) rectangle (9, 1.6);
\fill [white] (0, 1.3) node {\thepage};
\end{tikzpicture}
}
\cfoot{}
\renewcommand{\headrulewidth}{0pt}
}
\fancypagestyle{pg}{
\newgeometry{top=100pt,bottom=60pt,left=70pt,right=70pt,headheight=20pt,headsep=4pt}
\lhead{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north)}]
\fill [#2] (-9.65, -1.9) node[right] {{\Large \textbf{数学問題集}}};
\fill [#2] (9.15, -1.9) node[left] {{\Large \textbf{プリント}}{\large \cnttwo{secn}}{\normalsize -\cnttwo{pn}}};
\fill [#2] (-9.5,-2.8) rectangle (9, -2.2);
\fill [white] (-9.2,-2.5) node[right] {{\normalsize \textbf{制作者 : }}{\large \textbf{Anman}}};
\end{tikzpicture}
}
\lfoot{
\begin{tikzpicture}[remember picture,overlay,shift={(current page.south)}]
\fill [#2] (-9.5, 1) rectangle (9, 1.6);
\fill [white] (0, 1.3) node {\thepage};
\end{tikzpicture}
}
\cfoot{}
\renewcommand{\headrulewidth}{0pt}
}
% ページスタイル設定
\pagestyle{pg}
\thispagestyle{pgs}
% たぶん \thispagestyle で ページが増えた扱いになるため, カウンタ設定はページ設定後に行う
\refstepcounter{secn}
\label{sec:#3}
\setcounter{numpb}{0}
}
% 箇条書きのインデント調整
\let\enum\enumerate
\let\endenum\endenumerate
\newenvironment{nmprob}{
\renewenvironment{enumerate}{\begin{enum}\setlength{\leftskip}{-8pt}}{\end{enum}}
}{
\newpage
}