\ProvidesPackage{GEEexam}[2017/09/27 v1.0 Non-standard LaTeX package]

%% =====添加一些数学环境的宏包==================================
\RequirePackage{amsmath,amssymb}%
\def\dif{\mathop{}\!\mathrm{d}}
\DeclareMathOperator{\rank}{rank}
\RequirePackage{bm}
\RequirePackage{pifont}
\RequirePackage{extarrows} %长等号
\RequirePackage{scalerel}%缩放公式大小
\RequirePackage{array}%m{3em}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
%% ===========================================================

%% =====设置A3试卷纸张的页边距==================================
\RequirePackage{geometry,calc}
\geometry{a3paper,twocolumn,landscape,hmargin={3.5cm,1.3cm},
vmargin={1.5cm,1.5cm},footskip=0.75cm,headsep=0.25cm}
%% ===========================================================

%% =====页眉页脚设置===========================================
% \def\lastfox@putlabel{%
% 	\immediate\write\@auxout{%
% 		\string\newlabel{LastFox}{{\@arabic\c@foo}{}{}{}{}}}}
% \AtEndDocument{\lastfox@putlabel}
\newcounter{foo}
\newcounter{fox}
\addtocounter{foo}{1}
\RequirePackage{tikz}
\RequirePackage{lastpage}
\newcommand{\defen}[2][1cm]{\hspace*{\fill}\raisebox{-1.1ex}{\tikz\draw[line width=1pt,dash pattern=on 1pt off 2.5pt on 1pt off 2.5pt] (0pt,0pt)--(#1 ,0pt)node[right=-1mm]{(#2~分)};}\newline}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\columnseprule}{0.4pt}
\setlength{\columnsep}{1.8cm}
% \fancyfoot[C]{\kaishu{}理科数学试题\quad 第\refstepcounter{fox}\thefoo\refstepcounter{foo}页 \quad (共~\ref{LastFox}~页)\hspace*{13cm}
%                            理科数学试题\quad 第\refstepcounter{fox}\thefoo\refstepcounter{foo}页 \quad (共~\ref{LastFox}~页)}

\fancyfoot[C]{\kaishu{}理科数学试题\quad 第\thepage  页 \refstepcounter{page}\quad (共~\pageref{LastPage}~页)\hspace*{13cm} 理科数学试题\quad 第\thepage  页 \quad (共~\pageref{LastPage}~页)}
\renewcommand{\headrulewidth}{0pt}
%% ===========================================================

%% =====页眉【绝密*启用前】================================
\RequirePackage{color,xcolor}
\RequirePackage{enumitem}
\def\juemi{\noindent{\heiti\zihao{-4} 绝密$\bigstar$启用前}}
\def\biaoti#1{\begin{center}{\zihao{3} #1}\end{center}}
\def\fubiaoti#1{\begin{center}{\zihao{2}\heiti #1}\end{center}}
%% ===========================================================

%% =====设置数学字体为新罗马字体================================
\RequirePackage[T1]{fontenc}
\RequirePackage{mathptmx}
\newfontfamily\TNRBI{Times New Roman Bold Italic} 
\newcommand{\bfit}[1]{\text{\TNRBI #1}} 
%% ===========================================================

%% =====设置大题标题格式=======================================
\ctexset{section = {name = {,、\hspace*{-5mm}},
number = \chinese{section},
format = {\zihao{5}\heiti\raggedright}}}
\ctexset{subsection = {name = {\hspace{5mm},\hspace*{-1mm}},
number = (\chinese{subsection}),
format = {\zihao{5}\heiti\raggedright}}}
\RequirePackage{titlesec}
\titlespacing*{\section}{0pt}{9pt}{4pt}

%% =====选择题选项格式设置====================================
\usepackage{tasks}%选择题宏包，tasks环境
% \settasks{counter-format={tsk[A].},
% 	          label-offset={0.4em},
%                 label-align=left,
%                 column-sep={2pt},
%                 item-indent={1pt},
%                 before-skip={-0.7em},
%                 after-skip={-0.7em}}
%                 \usepackage{tasks}%选择题宏包，tasks环境
% texlive 2021 用以下设置
%=====================================
\settasks{                           %
    label=\Alph*.,                   %
    label-offset={0.4em},            %
    label-align=left,                %
    column-sep={10pt},               %
    label-width=2ex,                 %
    item-indent={40pt},              %
    before-skip={-0.7em},            %
    after-skip={-0.7em}              %
    }                                %
%=====================================
% 选择题示例 
%\begin{tasks}(4)
%	\task 
%	\task 
%	\task 
%	\task 
%\end{tasks}
%------------------------------ 选择题 ----------------------------------%
%\setcounter{enumi}{12}

\def\tiankongdaan#1{\makebox[3em][c]{#1}}
\newcommand{\blank}[1]{\underline{\tiankongdaan{\qquad~}}}
\DeclareOption{ans}{\renewcommand{\blank}[1]{\,\underline{#1}\,
}}
\ProcessOptions
\endinput

%------------------------------ 填空题 ----------------------------------%
\ExplSyntaxOn
\NewDocumentCommand \sh{g}
  {\IfNoValueTF {#1}{\,\underline{\hbox to 0.8cm{}}\,}{\,\underline{\hbox to 0.8cm{\hfill#1\hfill}}\,}}%-------加短横线
\ExplSyntaxOff 

\ExplSyntaxOn
\NewDocumentCommand \hh{g}
  {\IfNoValueTF {#1}{\,\underline{\hbox to 1cm{}}\,}{\nolinebreak\textcolor[rgb]{1.00,0.00,0.00}{【#1】}}}%-------短横线
\ExplSyntaxOff

\ExplSyntaxOn
\NewDocumentCommand \hhh{g}
  {\IfNoValueTF {#1}{\,\underline{\hbox to 2.5cm{}}\,}{\nolinebreak\hfill\textcolor[rgb]{1.00,0.00,0.00}{【#1】}}}
\ExplSyntaxOff
%  用法：\hhh输出_______ ；\hhh{增}输出______增_______；\hhh{\raisebox{.8ex}{$[\frac{\pi}{12},\frac{5\pi}{12}]$}}

\ExplSyntaxOn
\NewDocumentCommand \hhhh{g}
  {\IfNoValueTF {#1}{\,\underline{\hbox to 5cm{}}\,}{\nolinebreak\hfill\textcolor[rgb]{1.00,0.00,0.00}{【#1】}}}%-------加长横线
\ExplSyntaxOff 
%% =====自定义数学命令=========================================
% 阿拉伯数字转罗马数字\rmnum{ }\Rmnum{ }
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother

% 带圈数字2 \circnum{1} 项目编号：[\label=\circnum{\arabic*}]
\newcommand{\circled}[2][]{\tikz[baseline=(char.base)]
    {\node[shape = circle, draw, inner sep = -1pt]%圈大小
    (char) {\phantom{\ifblank{#1}{#2}{#1}}};%
    \node at (char.center) {\makebox[0pt][c]{#2}};}}
\robustify{\circled}
\newcommand{\circnum}[1]{\circled[00]{\footnotesize#1}}%数大小

% 正体数学符号
\newcommand{\R}{\mathrm{\mathbf{R}}}
\newcommand{\N}{\mathrm{\mathbf{N}}}
\newcommand{\Q}{\mathrm{\mathbf{Q}}}
\newcommand{\Z}{\mathrm{\mathbf{Z}}}
\newcommand{\dt}{\,\symup{d} t}
\newcommand{\dx}{\,\symup{d} x}
\newcommand{\dy}{\,\symup{d} y}

%圆弧\wideparen{ }
\DeclareSymbolFont{ugmL}{OMX}{mdugm}{m}{n}
\SetSymbolFont{ugmL}{bold}{OMX}{mdugm}{b}{n}
\DeclareMathAccent{\wideparen}{\mathord}{ugmL}{"F3}

%平行四边形\parallelogram
\newcommand*\parallelogram{%
  \mathord{\text{%
    \tikz[baseline]
      \draw (0,.1ex) -- (.8em,.1ex) -- (1em,1.4ex) -- (.2em,1.4ex) -- cycle;}}}

%平行且相等\paralleleq
\usepackage{pict2e}
\newcommand\paralleleq{%
  \begingroup
  \setlength\unitlength{0.1em}%
  \linethickness{0.5\unitlength}%
  \roundcap
  \mathrel{\begin{picture}(6,7)
    \Line(0,-1)(6,-1)
    \Line(0,0.5)(6,0.5)
    \Line(1.5,1.5)(3.5,7)
    \Line(3.5,1.5)(5.5,7)
  \end{picture}}
  \endgroup}

%全等\congruent
\newcommand*\congruent{%
    \mathrel{\text{%
    \tikz \draw[baseline] (-.22em,-.4ex) arc (-90:-285:0.4ex) (-.22em,-.4ex) .. controls (0,-.4ex) and (0,.4ex) .. (.22em,.4ex) arc (90:-105:0.4ex) (-.4em,-.75ex) -- (.4em,-.75ex) (-.4em,-1.1ex) -- (.4em,-1.1ex);%
}}}

%绝对值\abs{ }
\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
\let\abs=\envert

%列举法表示集合\set
\newcommand\set[1]{\left\{\rule{0cm}{1.7ex} {#1} \right\}}

%描述法表示集合\Set
\newcommand\Set[2]{\left\{\rule{0cm}{1.7ex}\, {#1} \, \middle\vert \, {#2} \,\right\}}