%===== Language =====
\RequirePackage[english]{babel} 

%===== Preamble =====
\RequirePackage{cite}
%\RequirePackage{hyperref}
\RequirePackage[colorlinks=true,linkcolor=black,citecolor=black,filecolor=blue,urlcolor=blue,unicode]{hyperref}
%The hyperref package is used to handle cross-referencing commands in LaTeX to produce hypertext links in the document. The package provides backends for the \special set defined for HyperTeX DVI processors; for embedded pdfmark commands for processing by Acrobat Distiller (dvips and Y&Y’s dvipsone); for Y&Y’s dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX’s pdf and HTML backends.
\RequirePackage{verbatim}
%The verbatim environment  simply reproduces every character you input, including all  s p a c e s!
\RequirePackage{color}
%you can set the color of the font of the text, and set the background color of the page.
\RequirePackage[dvipsnames]{xcolor}
%xecolor package is a simple package which defines about 140 different colors by XeTeX's font
\RequirePackage{array}
%The array environment is used to make a table of information, with column alignment (left, center, or right) and optional vertical lines separating the columns.
\RequirePackage{gensymb}
%Provides generic commands \degree, \celsius, \perthousand, \micro and \ohm which work both in text and maths mode.
%\RequirePackage{indentfirst}
%Make the first line of all sections etc., be indented by the usual paragraph indentation. This should work with all the standard document classes. This minimalist package is part of the "tools" bundle in the LaTeX required distribution.
\RequirePackage{algorithm}
\RequirePackage{algpseudocode}
%A suite of tools for typesetting algorithms in pseudo-code. The algorithmicx package provides many possibilities to customize the layout of algorithms. You can use one of the predefined layouts (pseudocode, pascal and c and others), with or without modifications, or you can define a completely new layout for your specific needs.
\RequirePackage{enumitem}
%Control layout of itemize, enumerate, description.  It supersedes both enumerate and mdwlist (providing well- structured replacements for all their funtionality), and in addition provides functions to compute the layout of labels, and to 'clone' the standard environments, to create new environments with counters of their own.
\RequirePackage{mfirstuc}
%\makefirstuc{〈stuff 〉} This makes the first object of 〈stuff 〉 uppercase unless 〈stuff 〉 starts with a con- trol sequence followed by a non-empty group, in which case the first object in the group is converted to uppercase.
\RequirePackage{fancyvrb}
%This package provides very sophisticated facilities for reading and writing ver- batim TEX code.
%\RequirePackage{amsfonts}
%TeX fonts from the American Mathematical Society.
\RequirePackage{ifmtarg}
%If-then-else command for processing potentially empty arguments.

\RequirePackage{lmodern}
%The Latin Modern family of fonts consists of 72 text fonts and 20 mathematics fonts, and is based on the Computer Modern fonts released into public domain by AMS (copyright © 1997 AMS).
\font\lmr="[lmroman10-regular]"

\RequirePackage{listings}
%Typeset source code listings using LaTeX.
\RequirePackage{textcomp}
%provide many text symbols (such as baht, bullet, copyright, musicalnote, onequarter, section, and yen)

\RequirePackage{numprint}
%Print numbers with separators and exponent if necessary.
\npthousandsep{,}
\npthousandthpartsep{}
\npdecimalsign{.}

\RequirePackage{multirow}
%Create tabular cells spanning multiple rows.


\RequirePackage{rotating}
%Rotation tools, including rotated full-page floats.
\RequirePackage{hhline}
%The command \hhline produces a line like \hline, or a double line like \hline\hline, except for its interaction with vertical lines. The command takes a preamble (rather like the preamble of a tabular environment), and this specifies whether there are to be one or two horizontal lines, and what happens when the horizontal line meets a vertical one. The package is part of the tools bundle in the LaTeX required distribution.
\RequirePackage{wallpaper}
%Easy addition of wallpapers (background images) to LaTeX documents, including tiling.
\RequirePackage{pdfpages}
%Include PDF documents in LaTeX.
\RequirePackage{pst-fractal,pst-exa}
% The package will draw the Julia and Mandelbrot sets, the Sierpinski triangle, Koch flake, and Apollonius Circle as well as fractal trees (which need not be balanced) with a variety of different parameters (including varying numbers of iterations).

%Define \XeTeX \XeLaTeX command
\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
 \special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
\def\XeLaTeX{\leavevmode
 \setbox0=\hbox{X\lower.5ex\hbox{\kern-.15em\reflect{E}}\kern-.08em\LaTeX}%
 \dp0=0pt\ht0=0pt\box0}
 \def\XeTeX{\leavevmode
 \setbox0=\hbox{X\lower.5ex\hbox{\kern-.15em\reflect{E}}\kern-.08em\TeX}%
 \dp0=0pt\ht0=0pt\box0}

%===== Fonts =====
\RequirePackage{amsfonts,amssymb,amsbsy,latexsym}
\RequirePackage{palatino,mathpazo,pifont}

%===== End of Fonts ===== 

%=====
\RequirePackage{amsmath,amsthm,amscd,bm}
%功能更為強大，也保留amsmath所有命令並加入許多設定、符號以及環境
\RequirePackage{mathtools,stmaryrd}%其實有mathtools，就不需要amsmath
\RequirePackage{indentfirst} % indent the first par after section
\RequirePackage{geometry,type1cm,fancyhdr,graphicx,tabularx}

%=====

\newcommand{\abs}[1]{\left|\, #1 \,\right|}
\newcommand{\dis}{\displaystyle}
%%%

\def\quotient#1#2{%
    \raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \RequirePackage[all]{xy}
% \RequirePackage{diagram}
 
 \RequirePackage{tikz}
\usetikzlibrary{matrix,arrows,decorations.pathmorphing}
\RequirePackage{tikz-cd}

%%%%%%%%%圖
%多圖並排
\RequirePackage{subfigure}%與subcaption衝突

%圖標題設定
\RequirePackage{caption}%與floatrow、chemscheme衝突
\RequirePackage{capt-of}% or 其實\RequirePackage{caption}就夠用了，一樣與floatrow、chemscheme衝突

%假如原始圖檔名稱有空格或多個點號，就需要用到這個套件
\RequirePackage{grffile}

%顯示原始指令或程式碼
\RequirePackage{verbatim}

%文繞圖
\RequirePackage{wrapfig, picinpar,cutwin}

%隨機亂文，在做範例可以用，正式論文可不用
\RequirePackage{lipsum}

\usepackage{lscape}
%\renewcommand{\baselinestretch}{1.2} 
%\renewcommand{\arraystretch}{1.3}

\usepackage[normalem]{ulem}

\usepackage{pdfpages}

\usepackage{booktabs}
\usepackage[online]{threeparttable}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\usepackage{float}

\usepackage{makecell}
\newcolumntype{"}{!{\vrule width1.5mm}}%粗線

\usepackage{pifont}%特殊符號

\usepackage{hhline}
\usepackage{setspace}
\usepackage{listings}
\usepackage{ragged2e}
\usepackage{ifthen}
\usepackage{xstring,xifthen}

%\addtolength{\parskip}{.4em}%段落間距
%\singlespacing % 單倍行距
%\onehalfspacing % 1.5倍行距
%\doublespacing % 雙倍行距
%\setstretch {1.25} % 任意行距
