summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bxcalc/bxcalc.sty
blob: d71eb2a36134b964e14c295f2c36736589ba7c67 (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
%%
%% This is file 'bxcalc.sty'.
%% 
%% Copyright (c) 2018-2019 Takayuki YATO (aka. "ZR")
%%   GitHub:   https://github.com/zr-tex8r
%%   Twitter:  @zr_tex8r
%%
%% This package is distributed under the MIT License.
%%

%% package declaration
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bxcalc}[2019/11/24 v1.0b]
\def\bxqcz@pkgname{bxcalc}

%--------------------------------------- main

%% packages
\RequirePackage{calc}[]
\RequirePackage{bxcalcize}[2017/05/21]% v1.0
\RequirePackage{bxcalcux}[2017/05/21]% v1.0

%--------------------------------------- \usepTeXunits

\ifundef{\kanjiskip}{%
  \newrobustcmd*{\usepTeXunits}{%
    \DeclareCalcUnit{Q}{\dimexpr0.25mm\relax}%
    \DeclareCalcUnit{H}{\dimexpr0.25mm\relax}%
    \DeclareCalcUnit{trueQ}{\dimexpr0.25truemm\relax}%
    \DeclareCalcUnit{trueH}{\dimexpr0.25truemm\relax}%
    \ifdef{\zw}{%
      \DeclareCalcUnit{zw}{\zw}%%
      \DeclareCalcUnit{zh}{\zw}%
    }{\ifdef{\jsZw}{%
      \DeclareCalcUnit{zw}{\jsZw}%%
      \DeclareCalcUnit{zh}{\jsZw}%
    }{}}%
    \ifdef{\zh}{%
      \DeclareCalcUnit{zh}{\zh}%
    }{}%
    \let\usepTeXunits\relax
  }%
}{%else
  \newrobustcmd*{\usepTeXunits}{}%
}

%--------------------------------------- all done
\endinput
%% EOF