summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/jpnedumathsymbols/jpnedumathsymbols.sty
blob: f22aa76b812b699c06395048253bcc88c6e14cf7 (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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
%%
%% jpnedumathsymbols.sty
%% for making handouts in Japanese Education
%%
%% Copyright (C) 2022 Yukoh KUSAKABE (screen-name)
%%   https://www.metaphysica.info/
%%   https://twitter.com/metaphysicainfo
%%
%% This file released under
%% [GNU GPL v3 or newer](http://www.gnu.org/licenses/gpl-3.0.html).
%%
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jpnedumathsymbols}[2022/06/29 v1.0]
%
%% [nofrac]
\newif\if@jpnedu@symbol@nofrac
\@jpnedu@symbol@nofracfalse
\DeclareOption{nofrac}{\@jpnedu@symbol@nofractrue}%
%
%% [nosqrt]
\newif\if@jpnedu@symbol@nosqrt
\@jpnedu@symbol@nosqrtfalse
\DeclareOption{nosqrt}{\@jpnedu@symbol@nosqrttrue}%
%
%% [nolim]
\newif\if@jpnedu@symbol@nolim
\@jpnedu@symbol@nolimfalse
\DeclareOption{nolim}{\@jpnedu@symbol@nolimtrue}%
%
%% [novec]
\newif\if@jpnedu@symbol@novec
\@jpnedu@symbol@novecfalse
\DeclareOption{novec}{\@jpnedu@symbol@novectrue}%
%
%% [nopointroman]
\newif\if@jpnedu@symbol@nopointroman
\@jpnedu@symbol@nopointromanfalse
\DeclareOption{nopointroman}{\@jpnedu@symbol@nopointromantrue}%
%
%% [nocurriculum]
\newif\if@jpnedu@symbol@nocurriculum
\@jpnedu@symbol@nocurriculumfalse
\DeclareOption{nocurriculum}{\@jpnedu@symbol@nocurriculumtrue}%
%
%% [mathbb]
\newif\if@jpnedu@symbol@mathbb
\@jpnedu@symbol@mathbbfalse
\DeclareOption{mathbb}{\@jpnedu@symbol@mathbbtrue}
%
%% [setcolon]
\newif\if@jpnedu@symbol@setcolon
\@jpnedu@symbol@setcolonfalse
\DeclareOption{setcolon}{\@jpnedu@symbol@setcolontrue}
%
%% [rvecbracket]
\newif\if@jpnedu@symbol@rvecbracket%
\@jpnedu@symbol@rvecbracketfalse
\DeclareOption{rvecbracket}{\@jpnedu@symbol@rvecbrackettrue}

%% [cvecbracket]
\newif\if@jpnedu@symbol@cvecbracket%
\@jpnedu@symbol@cvecbracketfalse
\DeclareOption{cvecbracket}{\@jpnedu@symbol@cvecbrackettrue}

%% [innerproductbracket]
\newif\if@jpnedu@symbol@innerproductbracket%
\@jpnedu@symbol@innerproductbracketfalse
\DeclareOption{innerproductbracket}{\@jpnedu@symbol@innerproductbrackettrue}
%
\ExecuteOptions{}
\ProcessOptions\relax
%
% for \begin{bmatrix}
%     \begin{cmatrix}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
%
% for \NewDocumentEnvironment
\RequirePackage{xparse}
%
% for \begin{empheq}
\RequirePackage{empheq}
%
%%%
%% FRAC
%%%
%
\if@jpnedu@symbol@nofrac
\else
%
%% \originalfrac
\let\originalfrac\frac
%
%% \frac
\renewcommand{\frac}[2]{\mathchoice%
{{\displaystyle\originalfrac{\raisebox{-0.42ex}{$\,#1\,$}}{\raisebox{0.1ex}{$\,#2\,$}}}}%
{{\displaystyle\originalfrac{\raisebox{-0.42ex}{$\,#1\,$}}{\raisebox{0.1ex}{$\,#2\,$}}}}%
{\originalfrac{#1}{#2}}%
{\originalfrac{#1}{#2}}%
}%
%
\fi
%
%%%
%% SQRT
%%%
%
\if@jpnedu@symbol@nosqrt
\else
%
%% \originalsqrt
\let\originalsqrt\sqrt
%
%% \sqrt
\renewcommand{\sqrt}[2][\phantom{1}]{\mathchoice%
{\!\originalsqrt[\leftroot{-1}\uproot{0}#1]{\vphantom{(}#2\hspace{1pt}}}%
{\!\originalsqrt[\leftroot{-1}\uproot{0}#1]{\vphantom{(}#2\hspace{1pt}}}%
{\originalsqrt[#1]{#2}}%
{\originalsqrt[#1]{#2}}}
%
\fi
%
%%%
%% LIM
%%%
%
\if@jpnedu@symbol@nolim
\else
%
%% \originallim
\let\originallim\lim
%
%% \lim
\renewcommand{\lim}{\originallim\limits}
%
\fi
%
%%%
%% VEC
%%%
%
\if@jpnedu@symbol@novec
\else
%
%% \originalvec
\let\originalvec\vec
%
%% \vec
\DeclareRobustCommand{\vec}[1]%
{\hspace{-1pt}\overrightarrow{\hspace{1pt}\vphantom{T}#1\hspace{1pt}}\hspace{-1pt}}
%{\overrightarrow{\hspace{1pt}\vphantom{T}#1\hspace{1pt}}}
%
\fi
%
%%%
%% POINTROMAN
%%%
%
\if@jpnedu@symbol@nopointroman
\else
%
%% \angstrom
\let\angstrom\AA
%
%% \capitaleszett
\let\capitaleszett\SS
%
%% \AA -- \ZZ
\DeclareRobustCommand\AA{\mathrm{A}}
\DeclareRobustCommand\BB{\mathrm{B}}
\DeclareRobustCommand\CC{\mathrm{C}}
\DeclareRobustCommand\DD{\mathrm{D}}
\DeclareRobustCommand\EE{\mathrm{E}}
\DeclareRobustCommand\FF{\mathrm{F}}
\DeclareRobustCommand\GG{\mathrm{G}}
\DeclareRobustCommand\HH{\mathrm{H}}
\DeclareRobustCommand\II{\mathrm{I}}
\DeclareRobustCommand\JJ{\mathrm{J}}
\DeclareRobustCommand\KK{\mathrm{K}}
\DeclareRobustCommand\LL{\mathrm{L}}
\DeclareRobustCommand\MM{\mathrm{M}}
\DeclareRobustCommand\NN{\mathrm{N}}
\DeclareRobustCommand\OO{\mathrm{O}}
\DeclareRobustCommand\PP{\mathrm{P}}
\DeclareRobustCommand\QQ{\mathrm{Q}}
\DeclareRobustCommand\RR{\mathrm{R}}
\DeclareRobustCommand\SS{\mathrm{S}}
\DeclareRobustCommand\TT{\mathrm{T}}
\DeclareRobustCommand\UU{\mathrm{U}}
\DeclareRobustCommand\VV{\mathrm{V}}
\DeclareRobustCommand\WW{\mathrm{W}}
\DeclareRobustCommand\XX{\mathrm{X}}
\DeclareRobustCommand\YY{\mathrm{Y}}
\DeclareRobustCommand\ZZ{\mathrm{Z}}
%
\fi
%
%%%
%% CURRICULUM
%%%
%
\if@jpnedu@symbol@nocurriculum
\else
%
% for \ajroman
\RequirePackage{otf}
%
%% \mathI \mathA \mathIA etc.
\DeclareRobustCommand{\currI}{\ajRoman{1}}
\DeclareRobustCommand{\currII}{\ajRoman{2}}
\DeclareRobustCommand{\currIII}{\ajRoman{3}}
\DeclareRobustCommand{\currA}{A}
\DeclareRobustCommand{\currB}{B}
\DeclareRobustCommand{\currC}{C}
\DeclareRobustCommand{\currD}{D}
\DeclareRobustCommand{\currE}{E}
\DeclareRobustCommand{\currF}{F}
\DeclareRobustCommand{\currG}{G}
\DeclareRobustCommand{\currH}{H}
\DeclareRobustCommand{\currI}{I}
\DeclareRobustCommand{\currJ}{J}
\DeclareRobustCommand{\currK}{K}
\DeclareRobustCommand{\currL}{L}
\DeclareRobustCommand{\currM}{M}
\DeclareRobustCommand{\currN}{N}
\DeclareRobustCommand{\currO}{O}
\DeclareRobustCommand{\currP}{P}
\DeclareRobustCommand{\currQ}{Q}
\DeclareRobustCommand{\currR}{R}
\DeclareRobustCommand{\currS}{S}
\DeclareRobustCommand{\currT}{T}
\DeclareRobustCommand{\currU}{U}
\DeclareRobustCommand{\currV}{V}
\DeclareRobustCommand{\currW}{W}
\DeclareRobustCommand{\currX}{X}
\DeclareRobustCommand{\currY}{Y}
\DeclareRobustCommand{\currZ}{Z}
\DeclareRobustCommand{\curra}{a}
\DeclareRobustCommand{\currb}{b}
\DeclareRobustCommand{\currc}{c}
\DeclareRobustCommand{\currd}{d}
\DeclareRobustCommand{\curre}{e}
\DeclareRobustCommand{\currf}{f}
\DeclareRobustCommand{\currg}{g}
\DeclareRobustCommand{\currh}{h}
\DeclareRobustCommand{\curri}{i}
\DeclareRobustCommand{\currj}{j}
\DeclareRobustCommand{\currk}{k}
\DeclareRobustCommand{\currl}{l}
\DeclareRobustCommand{\currm}{m}
\DeclareRobustCommand{\currn}{n}
\DeclareRobustCommand{\curro}{o}
\DeclareRobustCommand{\currp}{p}
\DeclareRobustCommand{\currq}{q}
\DeclareRobustCommand{\currr}{r}
\DeclareRobustCommand{\currs}{s}
\DeclareRobustCommand{\currt}{t}
\DeclareRobustCommand{\curru}{u}
\DeclareRobustCommand{\currv}{v}
\DeclareRobustCommand{\currw}{w}
\DeclareRobustCommand{\currx}{x}
\DeclareRobustCommand{\curry}{y}
\DeclareRobustCommand{\currz}{z}
\DeclareRobustCommand{\curralpha}{α}
\DeclareRobustCommand{\currbeta}{β}
\DeclareRobustCommand{\currgamma}{γ}
\DeclareRobustCommand{\currdelta}{δ}
\DeclareRobustCommand{\currepsilon}{ε}
\DeclareRobustCommand{\currzeta}{ζ}
\DeclareRobustCommand{\curreta}{η}
\DeclareRobustCommand{\currtheta}{θ}
\DeclareRobustCommand{\curriota}{ι}
\DeclareRobustCommand{\currkappa}{κ}
\DeclareRobustCommand{\currlambda}{λ}
\DeclareRobustCommand{\currmu}{μ}
\DeclareRobustCommand{\currnu}{ν}
\DeclareRobustCommand{\currxi}{ξ}
\DeclareRobustCommand{\curromicron}{ο}
\DeclareRobustCommand{\currpai}{π}
\DeclareRobustCommand{\currrho}{ρ}
\DeclareRobustCommand{\currsigma}{σ}
\DeclareRobustCommand{\currtau}{τ}
\DeclareRobustCommand{\currupsilon}{υ}
\DeclareRobustCommand{\currphi}{φ}
\DeclareRobustCommand{\currchi}{χ}
\DeclareRobustCommand{\currpsi}{ψ}
\DeclareRobustCommand{\curromega}{ω}
\DeclareRobustCommand{\currIA}{\@ifstar{\@jpnedu@symbol@currIA@star}{\@jpnedu@symbol@currIA@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@currIA@star}{\ajRoman{1}+A}
\DeclareRobustCommand{\@jpnedu@symbol@currIA@nostar}{\ajRoman{1}A}
\DeclareRobustCommand{\currIIB}{\@ifstar{\@jpnedu@symbol@currIIB@star}{\@jpnedu@symbol@currIIB@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@currIIB@star}{\ajRoman{2}+B}
\DeclareRobustCommand{\@jpnedu@symbol@currIIB@nostar}{\ajRoman{2}B}
\DeclareRobustCommand{\currIIBC}{\@ifstar{\@jpnedu@symbol@currIIBC@star}{\@jpnedu@symbol@currIIBC@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@currIIBC@star}{\ajRoman{2}+B+C}
\DeclareRobustCommand{\@jpnedu@symbol@currIIBC@nostar}{\ajRoman{2}BC}
\DeclareRobustCommand{\currIIIC}{\@ifstar{\@jpnedu@symbol@currIIIC@star}{\@jpnedu@symbol@currIIIC@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@currIIIC@star}{\ajRoman{3}+C}
\DeclareRobustCommand{\@jpnedu@symbol@currIIIC@nostar}{\ajRoman{3}C}
\fi
%
%% \phantomheight
\DeclareRobustCommand{\phantomheight}[1][\frac{1}{2}]{\vphantom{\raisebox{4pt}{\ensuremath{#1}}}\vphantom{\raisebox{-3pt}{\ensuremath{#1}}}}
%
%% \comma
\DeclareRobustCommand{\comma}{\@ifstar{\@jpnedu@symbol@comma@star}{\@jpnedu@symbol@comma@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@comma@nostar}{,\,}
\DeclareRobustCommand{\@jpnedu@symbol@comma@star}{\,,\,}
%% \period
\DeclareRobustCommand{\period}{\@ifstar{\@jpnedu@symbol@period@star}{\@jpnedu@symbol@period@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@period@nostar}{\text{。}\quad}
\DeclareRobustCommand{\@jpnedu@symbol@period@star}{\,\text{。}\quad}
%
%% \pair{}{}           \pair*{}{}
%% \triplet{}{}{}      \triplet*{}{}
%% \quadruplet{}{}{}{} \quadruplet*{}{}{}
\DeclareRobustCommand{\pair}
{\@ifstar{\@jpnedu@symbol@pair@star}{\@jpnedu@symbol@pair@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@pair@star}[2]{(#1,\,#2)}
\DeclareRobustCommand{\@jpnedu@symbol@pair@nostar}[2]{\left(#1,\,#2\right)}
\DeclareRobustCommand{\triplet}
{\@ifstar{\@jpnedu@symbol@triplet@star}{\@jpnedu@symbol@triplet@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@triplet@star}[3]{(#1,\,#2,\,#3)}
\DeclareRobustCommand{\@jpnedu@symbol@triplet@nostar}[3]{\left(#1,\,#2,\,#3\right)}
\DeclareRobustCommand{\quadruplet}
{\@ifstar{\@jpnedu@symbol@quadruplet@star}{\@jpnedu@symbol@quadruplet@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@quadruplet@star}[4]{(#1,\,#2,\,#3,\,#4)}
\DeclareRobustCommand{\@jpnedu@symbol@quadruplet@nostar}[4]{\left(#1,\,#2,\,#3,\,#4\right)}
%
%% \intersection
%% \union
\DeclareRobustCommand{\intersection}{\cap}
\DeclareRobustCommand{\union}{\cup}
%
%% \complement{}
\let\originalcmpl\cmpl
\DeclareRobustCommand{\complement}[1]{\overline{\vphantom{T}#1}}
\let\cmpl\complement
%
%% \tand
%% \tor
\DeclareRobustCommand{\tand}{\ensuremath{\mathbin{\text{かつ}}}}
\DeclareRobustCommand{\tor}{\ensuremath{\mathbin{\text{または}}}}
%% \eand
%% \eor
\DeclareRobustCommand{\eand}{\ensuremath{\mathbin{\text{and}}}}
\DeclareRobustCommand{\eor}{\ensuremath{\mathbin{\text{or}}}}
%
%% \lto
%% \lfrom
%% \iff
%% \plto
%% \plfrom
%% \piff
\let\originaliff\iff
\DeclareRobustCommand{\lto}{\ensuremath{\mathrel{\Longrightarrow}}}
\DeclareRobustCommand{\lfrom}{\ensuremath{\mathrel{\Longleftarrow}}}
\DeclareRobustCommand{\iff}{\ensuremath{\mathrel{\Longleftrightarrow}}}
\DeclareRobustCommand{\plto}{\ensuremath{\mathrel{\phantom{\Longrightarrow}}}}
\DeclareRobustCommand{\plfrom}{\ensuremath{\mathrel{\phantom{\Longlrftarrow}}}}
\DeclareRobustCommand{\piff}{\ensuremath{\mathrel{\phantom{\Longleftrightarrow}}}}
%
%% \peq
\DeclareRobustCommand{\peq}{\mathrel{\phantom{=}}}
%
%% \set{}{}
%% ([setcolon])
\if@jpnedu@symbol@setcolon
\DeclareRobustCommand{\set}[2]{\left\{\,#1\,;\,#2\,\right\}}
\else
\DeclareRobustCommand{\set}[2]{\left\{\,#1\,\middle|\,#2\,\right\}}
\fi
%
%% \N \NZ \NP \Z \Q \R \C
%% ([mathbb])
\if@jpnedu@symbol@mathbb
\DeclareRobustCommand{\N}{\ensuremath{\mathbb{N}}}
\DeclareRobustCommand{\NZ}{\ensuremath{\mathbb{N}_{0}}}
\DeclareRobustCommand{\NP}{\ensuremath{\mathbb{N}_{+}}}
\DeclareRobustCommand{\Z}{\ensuremath{\mathbb{Z}}}
\DeclareRobustCommand{\Q}{\ensuremath{\mathbb{Q}}}
\DeclareRobustCommand{\R}{\ensuremath{\mathbb{R}}}
\DeclareRobustCommand{\C}{\ensuremath{\mathbb{C}}}
\else
\DeclareRobustCommand{\N}{\ensuremath{\mathbf{N}}}
\DeclareRobustCommand{\NZ}{\ensuremath{\mathbf{N}_{0}}}
\DeclareRobustCommand{\NP}{\ensuremath{\mathbf{N}_{+}}}
\DeclareRobustCommand{\Z}{\ensuremath{\mathbf{Z}}}
\DeclareRobustCommand{\Q}{\ensuremath{\mathbf{Q}}}
\DeclareRobustCommand{\R}{\ensuremath{\mathbf{R}}}
\DeclareRobustCommand{\C}{\ensuremath{\mathbf{C}}}
\fi
%
%% \inverse{<function>}
\DeclareRobustCommand{\inverse}[1]{#1^{-1}}
%
%% \abs{} \abs*{}
\let\originalabs\abs
\DeclareRobustCommand{\abs}
{\@ifstar{\@jpnedu@symbol@abs@star}{\@jpnedu@symbol@abs@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@abs@star}[1]{\lvert#1\rvert}
\DeclareRobustCommand{\@jpnedu@symbol@abs@nostar}[1]{\left\lvert#1\right\rvert}
%
%% \begin{cases}
\DeclareDocumentEnvironment{ecases}{O{align*} m b}%
{\vspace{0.25\baselineskip}\begin{empheq}[left={#2=\empheqlbrace\,}]{#1}{#3}\end{empheq}}%
{\par\vspace{0.25\baselineskip}\noindent}
%
%% \begin{simul}{<style>}
\DeclareDocumentEnvironment{simul}{O{gather*} b}%
{\vspace{0.25\baselineskip}\begin{empheq}[left=\empheqlbrace\,]{#1}{#2}\end{empheq}}%
{\par\vspace{0.25\baselineskip}\noindent}
%
%% \begin{signchart}{<columns>}
\newenvironment{signchart}[1]%
{\vspace{0.25\baselineskip}\begin{equation*}\begin{array}{c|*#1{c}}\hline}%
{\\\hline\end{array}\end{equation*}\par\vspace{0.25\baselineskip}\noindent}
%
%% \neconcave
%% \seconcave
%% \seconvex
%% \neconvex
% http://www.math.kobe-u.ac.jp/HOME/kodama/tips-latex-bend-arrow.html
% (GNU/GPL)
\DeclareRobustCommand{\seconvex}{{\begin{picture}(10,10)%
\put(10,10){\oval(20,20)[lb]}\put(10,0){\vector(1,0){2}}\end{picture}}}
\DeclareRobustCommand{\neconcave}{{\begin{picture}(10,10)%
\put(10,0){\oval(20,20)[lt]}\put(10,10){\vector(1,0){2}}\end{picture}}}
\DeclareRobustCommand{\neconvex}{{\begin{picture}(10,10)%
\put(0,10){\oval(20,20)[rb]}\put(10,10){\vector(0,1){2}}\end{picture}}}
\DeclareRobustCommand{\seconcave}{{\begin{picture}(10,10)%
\put(0,0){\oval(20,20)[rt]}\put(10,0){\vector(0,-1){2}}\end{picture}}}
%
%% \dint
\DeclareRobustCommand{\dint}{{\displaystyle\int}}
%
%% \dr \ds \dt \du \dx \dy \dz \dtheta
\DeclareRobustCommand{\dr}{\,dr}
\DeclareRobustCommand{\ds}{\,ds}
\DeclareRobustCommand{\dt}{\,dt}
\DeclareRobustCommand{\du}{\,du}
\DeclareRobustCommand{\dx}{\,dx}
\DeclareRobustCommand{\dy}{\,dy}
\DeclareRobustCommand{\dz}{\,dz}
\DeclareRobustCommand{\dtheta}{\,d\theta}
%
%% \const
\DeclareRobustCommand{\const}{\mathrm{const.}}
%
%% \defint{<from>}{<to>}{<function>}
\DeclareRobustCommand{\defint}[3]{\left[\vphantom{\frac{1}{2}}#3\right]_{#1}^{#2}}
%
%% \transformvariable{<variable1>}{<from1>}{<to1>}{variable2}{<from2>}{<to2>}
\DeclareRobustCommand{\transformvariable}[6]{\begin{tabular}{c|ccc}
$#1$&$#2$&$\to$&$#3$\\\hline
$#4$&$#5$&$\to$&$#6$
\end{tabular}}
%
%% \rvec{}{}
%% \rvec*{}{}{}
%% ([rvecbracket])
\if@jpnedu@symbol@rvecbracket%
\DeclareRobustCommand{\rvec}
{\@ifstar{\@jpnedu@symbol@rvec@star}{\@jpnedu@symbol@rvec@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@rvec@star}[3]{\left[#1,\,#2,\,#3\right]}
\DeclareRobustCommand{\@jpnedu@symbol@rvec@nostar}[2]{\left[#1,\,#2\right]}
\else%
\DeclareRobustCommand{\rvec}
{\@ifstar{\@jpnedu@symbol@rvec@star}{\@jpnedu@symbol@rvec@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@rvec@star}[3]{\left(#1,\,#2,\,#3\right)}
\DeclareRobustCommand{\@jpnedu@symbol@rvec@nostar}[2]{\left(#1,\,#2\right)}
\fi%
%
%% \cvec{}{}
%% \cvec*{}{}{}
%% ([cvecbracket])
\if@jpnedu@symbol@cvecbracket%
\DeclareRobustCommand{\cvec}
{\@ifstar{\@jpnedu@symbol@cvec@star}{\@jpnedu@symbol@cvec@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@cvec@star}[3]{\begin{bmatrix}\,#1\,\\\,#2\,\\\,#3\,\end{bmatrix}}
\DeclareRobustCommand{\@jpnedu@symbol@cvec@nostar}[2]{\begin{bmatrix}\,#1\,\\\,#2\,\end{bmatrix}}
\else%
\DeclareRobustCommand{\cvec}
{\@ifstar{\@jpnedu@symbol@cvec@star}{\@jpnedu@symbol@cvec@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@cvec@star}[3]{\begin{pmatrix}\,#1\,\\\,#2\,\\\,#3\,\end{pmatrix}}
\DeclareRobustCommand{\@jpnedu@symbol@cvec@nostar}[2]{\begin{pmatrix}\,#1\,\\\,#2\,\end{pmatrix}}
\fi%
%
%% \innerproduct{}{} \inp{}{}
\let\originalinp\inp
\if@jpnedu@symbol@innerproductbracket
\DeclareRobustCommand{\innerproduct}
{\@ifstar{\@jpnedu@symbol@innerproduct@star}{\@jpnedu@symbol@innerproduct@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@innerproduct@star}[2]{\langle #1\relax,#2\rangle}
\DeclareRobustCommand{\@jpnedu@symbol@innerproduct@nostar}[2]{\left\langle #1\relax,#2\right\rangle}
\else%
\DeclareRobustCommand{\innerproduct}
{\@ifstar{\@jpnedu@symbol@innerproduct@star}{\@jpnedu@symbol@innerproduct@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@innerproduct@star}[2]{#1\cdot #2\relax}
\DeclareRobustCommand{\@jpnedu@symbol@innerproduct@nostar}[2]{#1\cdot #2\relax}
\fi%
\let\inp\innerproduct
%
%% \sequence{} \seq{}
\let\originalseq\seq
\DeclareRobustCommand{\sequence}[1]{\ensuremath{\left\{#1\right\}}}
\let\seq\sequence
%
%% \sum*
\let\originalsum\sum
\DeclareRobustCommand{\sum}
{\@ifstar{\@jpnedu@symbol@sum@star}{\@jpnedu@symbol@sum@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@sum@star}{\textstyle\sum}
\DeclareRobustCommand{\@jpnedu@symbol@sum@nostar}{\originalsum}
%
%% \GCD
%% \LCM
\DeclareRobustCommand{\GCD}{\mathop{\mathrm{GCD}}\nolimits}
\DeclareRobustCommand{\LCM}{\mathop{\mathrm{LCM}}\nolimits}
%
%% \degree
\let\originaldegree\degree
\DeclareRobustCommand{\degree}{^{\circ}}
%
%% \arc{}
% http://www.artsci.kyushu-u.ac.jp/~ssaito/jpn/tex/tips/misc.html#arc
\let\originalarc\arc
\DeclareRobustCommand{\arc}[1]{%
\settowidth{\dimen0}{\ensuremath{#1}}%
\divide\dimen0 by 2%
\overset{\rotatebox{-90}{\ensuremath{\left(\rule{0pt}{\dimen0}\right.\!}}}{#1}%
}
%
%% \parallel
% https://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/8814.html
\let\originalparallel\parallel
\DeclareRobustCommand{\parallel}{%
\mathrel{\raise.3ex\hbox{\scalebox{.7}{%
\rotatebox[origin=c]{-7}{/}\kern-.35em\rotatebox[origin=c]{-7}{/}}}}}%
\DeclareRobustCommand{\notparallel}
{\mathrel{\raise.3ex\hbox{\scalebox{.7}{%
\ooalign{\rotatebox[origin=c]{-7}{/}\kern-.35em\rotatebox[origin=c]{-7}{/}\crcr%
\hfil\raisebox{.2ex}{$\backslash$}\hfil}}}}}%
%
%% \similar
\let\originalsimilar\similar
\DeclareRobustCommand{\similar}{\mathrel{\lower.2ex\hbox{\scalebox{1.3}{∽}}}}
%
%% \permutation{}{}
%% \combination{}{}
%% \repeatedpermutation{}{}
%% \homogeneous{}{} \repeatedcombination{}{}
\DeclareRobustCommand{\permutation}[2]{\ensuremath{{}_{#1}\mathrm{P}_{#2}}}
\DeclareRobustCommand{\combination}[2]{\ensuremath{{}_{#1}\mathrm{C}_{#2}}}
\DeclareRobustCommand{\repeatedpermutation}[2]{\ensuremath{{}_{#1}\mathrm{\Pi}_{#2}}}
\DeclareRobustCommand{\homogeneous}[2]{\ensuremath{{}_{#1}\mathrm{H}_{#2}}}
\let\repeatedcombination\homogeneous
%
%% \expectedvalue{}
%% ([mathbb])
\if@jpnedu@symbol@mathbb
\DeclareRobustCommand{\expectedvalue}[1]{\mathbb{E}\left(#1\right)}
\else
\DeclareRobustCommand{\expectedvalue}[1]{\mathbf{E}\left(#1\right)}
\fi
%
%% \Re
%% \Im
\let\originalRe\Re
\let\originalIm\Im
\DeclareRobustCommand{\Re}{\mathrm{Re}\,}
\DeclareRobustCommand{\Im}{\mathrm{Im}\,}
%
%% \conjugate{}
%% \conj{}
\let\originalconjugate\conjugate
\let\originalconj\conj
\DeclareRobustCommand{\conjugate}[1]{\overline{\mathstrut #1}}
\let\conj\conjugate
%
%% \parentext{<text>}
%% \squaretext{<text>}
%% \whitesquaretext{<text>}
\DeclareRobustCommand{\parentext}[1]{\text{(#1)}}
\DeclareRobustCommand{\squaretext}[1]{\text{「#1」}}
\DeclareRobustCommand{\whitesquaretext}[1]{\text{『#1』}}
%
%% \ltext{<text>}
%% \lltext{<text>}
\DeclareRobustCommand{\ltext}{\squaretext}
\DeclareRobustCommand{\lltext}{\whitesquaretext}
\DeclareRobustCommand{\ltextbegin}{\text{「}}
\DeclareRobustCommand{\lltextbegin}{\text{『}}
\DeclareRobustCommand{\ltextend}{\text{」}}
\DeclareRobustCommand{\lltextend}{\text{』}}
%
%% \nomination{}
\DeclareRobustCommand{\nomination}{\parentext}
%
%% \condition
\DeclareRobustCommand{\condition}{\@ifstar{\@jpnedu@symbol@condition@star}{\@jpnedu@symbol@condition@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@condition@star}[1]{\quad\parentext{#1}}
\DeclareRobustCommand{\@jpnedu@symbol@condition@nostar}[1]{\parentext{#1}}
%
%% \explanation{}
\DeclareRobustCommand{\explanation}{\@ifstar{\@jpnedu@symbol@explanation@star}{\@jpnedu@symbol@explanation@nostar}}
\DeclareRobustCommand{\@jpnedu@symbol@explanation@nostar}[1]{\parentext{\raisebox{1.5pt}{$\because$\ }#1}}
\DeclareRobustCommand{\@jpnedu@symbol@explanation@star}[1]{\parentext{#1}}
%
%% \quantify
\DeclareRobustCommand{\quantify}[1]{\text{#1}\ }
%
%% \equationunit
\DeclareRobustCommand{\equationunit}[1]{\parentext{#1}}
%
%% \texttherefore
%% \textbecause
\DeclareRobustCommand{\texttherefore}{\ensuremath{\raisebox{1.5pt}{$\therefore$}}}
\DeclareRobustCommand{\textbecause}{\ensuremath{\raisebox{1.5pt}{$\because$}}}
%
%% \QED
\DeclareRobustCommand{\QED}{■}
%
%% EOF