This repository was archived by the owner on May 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sty
151 lines (110 loc) · 3.79 KB
/
main.sty
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
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{indentfirst}
\usepackage{url}
\usepackage[final]{pdfpages}
%\usepackage[autosize]{dot2texi}
%\usepackage{tikz}
%\usetikzlibrary{shapes,arrows}
%\usetikzlibrary{mindmap,trees}
\usepackage{tikz}
\usetikzlibrary{trees}
%\usetikzlibrary{shapes,arrows}
\usepackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}
%\usepackage{hyperref}
%\chapterfont{\centering}
%\chaptertitlefont{\centering}
\renewcommand\contentsname{สารบัญ}
\renewcommand\chaptername{บทที่}
\renewcommand\appendixname{ภาคผนวก}
\def\listoftablesname{รายการตาราง}
\def\listoftables{\chapter*{\listoftablesname\markboth
{\listoftablesname}{\listoftablesname}}\@starttoc{lot}}
\def\tablename{ตาราง }
\def\fnum@table{\tablename\thetable}
\def\listoffiguresname{รายการภาพประกอบ}
\def\listoffigures{\chapter*{\listoffiguresname\markboth
{\listoffiguresname}{\listoffiguresname}}\@starttoc{lof}}
\def\figurename{ภาพประกอบ }
\def\fnum@figure{\figurename\thefigure}
%\renewcommand{\thechapter}{}
%\renewcommand{\thesection}{}
\usepackage{fontspec,xltxtra,xunicode}
\XeTeXlinebreaklocale “th_TH”
\sloppy
\defaultfontfeatures{Mapping=tex-text,Scale=1.3}
%\defaultfontfeatures{Mapping=tex-text,Scale=1.4}
\setromanfont[Mapping=tex-text]{TH SarabunPSK}
%\setromanfont[Mapping=tex-text]{Angsana New}
%\setromanfont[Mapping=tex-text]{Browallia New}
%\defaultfontfeatures{Mapping=tex-text,Scale=1}
%\setromanfont[Mapping=tex-text]{Kinnari}
%\setromanfont[Mapping=tex-text]{Garuda}
\newfontfamily{\ltcaps}[Scale=0.95]{Latin Modern Roman Caps}
%\newcommand{\ltc}[1]{\ltcaps{#1}\rmfamily}
\usepackage{sectsty}
\sectionfont{\normalsize}
\subsectionfont{\normalsize}
%\usepackage{fontspec}
%\usepackage{xunicode}
%\usepackage{xltxtra}
%
%\XeTeXlinebreaklocale “th”
%\defaultfontfeatures{Scale=1.23}
%
%\begin{document}
%\setmonofont[Scale=0.8]{Tahoma:script=thai}
%
%\fontspec[
%ItalicFont={Angsana New Italic:script=thai},
%BoldFont={Angsana New Bold:script=thai},
%BoldItalicFont={Angsana New Bold Italic:script=thai},
%]{Angsana New:script=thai}
%%= Control align and space for chapter names
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\centering\normalfont\Large\bfseries}{\chaptertitlename\ \thechapter}{10pt}{\Large}
\titlespacing*{\chapter}{0pt}{0pt}{30pt}
\titlespacing*{\section}{0pt}{1em}{0pt}
\titlespacing*{\subsection}{0.65in}{1em}{0pt}
\titlespacing*{\subsubsection}{1in}{1em}{0pt}
%%= Set paragraph indentation to 1 inch
\setlength{\parindent}{1in}
%%= Document geometry
\usepackage{geometry}
\geometry{a4paper,top=1in, bottom=1in, left=1.5in, right=1in}
%%= Show page number in top-right corner
\usepackage{fancyhdr}
%\pagestyle{fancy}
\fancyhf{}
\rhead{\thepage}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{15pt}
%%= Show page number on the bottom-right corner for chapter pages
%\fancypagestyle{plain}{
%\fancyhead{}
%\fancyfoot[R]{\thepage}
%}
%%= Page style for TOC
\fancypagestyle{toc}{
\fancyhead{}
\fancyfoot[R]{(\thepage)}
}
\newcommand{\frontchapterstyle}{\fancypagestyle{plain}{\fancyhead{}\fancyfoot[R]{(\thepage)}}}
\newcommand{\mainchapterstyle}{\fancypagestyle{plain}{\fancyhead{}\fancyfoot[R]{\thepage}}}
\linespread{1.1}
\renewcommand{\labelenumii}{(\arabic{enumii})}
\renewcommand{\labelenumiii}{\arabic{enumiii}.}
\usepackage{enumitem}
\setlist[1]{leftmargin=0em}
\setlist{listparindent=\parindent,itemindent=1.2in}
\setdescription{leftmargin=0em,labelindent=\parindent}
%\setcounter{secnumdepth}{0}
\setcounter{tocdepth}{1}
\renewcommand{\thesubsection}{\arabic{subsection}.}
%\usepackage{enumitem}
%\setlist{itemsep=0pt}
%\setlist{nolistsep}