-
Notifications
You must be signed in to change notification settings - Fork 2
/
dsalg.tex
65 lines (49 loc) · 1.89 KB
/
dsalg.tex
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
\documentclass[11pt,a4,oneside]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fullpage}
\usepackage[thai]{babel}
\usepackage{thswitch}
\usepackage{epsfig}
\usepackage{framed}
\usepackage{listings}
%\usepackage{courier}
\usepackage[utf8x]{inputenc}
\usepackage{fonts-tlwg}
\usepackage{calc}
\usepackage{wrapfig}
\lstset{basicstyle=\ttfamily,frame=tlrb}
\newcommand{\ct}{\latintext\tt}
\newcounter{quizctr}[chapter] \setcounter{quizctr}{0}
\renewcommand\thequizctr{\arabic{chapter}.\arabic{quizctr}}
\newenvironment{quiz}[1]{
\refstepcounter{quizctr}
\vspace{0.1in}\noindent$\vartriangleright$ {\bf คำถาม \thequizctr} \ \ #1\\}{\hfill$\triangleleft$\vspace{0.15in}}
\newenvironment{quizans}[0]{\framed\noindent{\bf เฉลย:}\\}{\endframed}
\newcounter{algtctr}[chapter] \setcounter{algtctr}{0}
\renewcommand\thealgtctr{{\latintext\sf A\arabic{chapter}.\arabic{algtctr}}}
\newenvironment{algt}{
\refstepcounter{algtctr}
\setlength{\intextsep}{0pt}
\framed\begin{wrapfigure}{r}{0in}{\latintext (\thealgtctr)}\end{wrapfigure}
}{\endframed}
\newlength{\algbackindent}
\newcounter{probctr}[chapter] \setcounter{probctr}{0}
\renewcommand\theprobctr{\arabic{chapter}.\arabic{probctr}}
\newenvironment{prob}[1]{
\refstepcounter{probctr}
\noindent\hrulefill\\
{\bf โจทย์{\wbr}ปัญหา \theprobctr} \ \ #1\\}{\hrulefill\vspace{0.05in}}
%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\lstlistingname}{\thaitext โปรแกรม{\wbr}ที่\latintext}
\lstnewenvironment{codelist}[2]{\lstset{lineskip=-4pt,language=#1,#2}}{}
\newtheorem{theorem}{ทฤษฎีบท}
\newtheorem{lemma}{ทฤษฎีบท{\wbr}ย่อย}
\newenvironment{proof}{{\bf บทพิสูจน์:}}{\hfill\rule{1.5mm}{3mm}\vspace{0.1in}}
\begin{document}
\include{arrays-pointers}
\include{asymptotic-analysis}
\include{abstraction}
\include{recursion}
%\include{queues-stacks}
\end{document}