Professional Documents
Culture Documents
0 NH DNG
CC LOI THI V BI TP
Nguyn Hu in
Khoa Ton - C - Tin hc
HKHTN H Ni, HQGHN
Mc lc
GII THIU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. i hi gi lnh km theo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4. Li cm n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5. Hn ch ca gi lnh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6. Phn m u ca tp loi ny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7. Mt cu hi v li gii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.1. Cu hi t lun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
11
12
15
8.5. Cu hi in ch trng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
8.6. Cu hi ng sai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
18
9.1. Cc tp cu hi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
19
20
22
23
http://nhdien.wordpress.com - Nguyn Hu in
24
11.1. t lun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
25
11.3. in ch v ng sai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
27
11.5. c th thit k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
28
29
29
30
30
30
30
31
31
32
32
33
33
15.1. Cu hi gch di . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
15.2. Cu hi in vo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
15.3. Cu hi ng sai . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
15.4. Cu hi tng ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
16. Tng hp cu hi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
37
37
37
39
17.3. t cc tp hnh vo mt th mc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
40
40
42
43
43
44
46
http://nhdien.wordpress.com - Nguyn Hu in
A. Gi lnh ifthen.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
B. Gi lnh picinpar.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
C. Gi lnh enumitem.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
D. Gi lnh shortlst.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
E. Gi lnh float.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
E.1. To ra mt mi trng ng mi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
52
53
F. Gi lnh nonfloat.sty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
55
56
http://nhdien.wordpress.com - Nguyn Hu in
GII THIU
Trc y ti c vit ra gi lnh dethi.sty v lamdethi.sty to ra trc nghim v mt s loi
thi vi s so trn c cu hi ln phng n tr li. Mi gi lnh c nhng mnh v yu ring.
Ln ny ti kt hp c hai gi lnh v dng chung tp c s cu hi vn gi l gi lnh dethi.sty
phin bn 3.0. Do vy dng gi lnh vi ty chn:
1. \usepackage[baithi]{dethi} vi cu trc lm bi thi trong lp vieexamdesign.cls c
th so trn thi cu hi v cc phng n.
2. \usepackage[baitap]{dethi} vi cu trc lm bi thi hoc bi tp trong lp
article.cls, book.cls,... c th nhng cu hi vo bt c lp no ca LaTeX.
C hai ty chn u c kh nng dng ring cc cu hi trc tip, nhng dng chung tp cu
hi v li gii.Ti liu ny son dng \usepackage[baitap]{dethi} v cc cu hi minh ha chy
trc tip t d liu trong tp km theo gi lnh.
2. i hi gi lnh km theo
vn hnh tt gi lnh mi cn thit c cc gi lnh sau thc hin cc lnh:
ifthen gi lnh lp trnh iu khin.
http://nhdien.wordpress.com - Nguyn Hu in
http://nhdien.wordpress.com - Nguyn Hu in
vidu02-tracnghiemdv-f1.tex
vidu02-tracnghiemdv-f2.tex
vidu02-tracnghiemdv.tex
vidu02-tracnghiemgd-f1.tex
vidu02-tracnghiemgd-f2.tex
vidu02-tracnghiemgd.tex
vidu05-tracnghiemds-f1.tex
vidu05-tracnghiemds-f2.tex
vidu05-tracnghiemds.tex
vidu06-tonghop-f1.tex
vidu06-tonghop-f2.tex
vidu06-tonghop.tex
01cauhoi-toan-1dung.tex
01cauhoi-toan-2017.tex
01de-mh-toan-k17-f1.tex
01de-mh-toan-k17-f2.tex
01de-mh-toan-k17.tex
08cauhoi-tienganh-2009.tex
08de-mh-anh-k17.tex
08de-tienganh-2009-f1.tex
08de-tienganh-2009-f2.tex
centerpage.sty
lastpage.sty
shortlst.sty
titledot.sty
multicol.sty
Lm in vo ty chn [baithi].
Lm in vo ty chn [baitap].
Lm in vo khng cn tp.
Lm gach di ty chn [baithi]
Lm gach di ty chn [baitap]
Lm gach di khng tp.
Lm ng sai [baithi]
Lm ng sai [baitap]
Lm ng sai trc tip
Lm tng hp vi [baithi] trong tp cu hi.
Lm tng hp vi [baitap] trong tp cu hi.
Lm tng hp khng tp cu hi.
Cu hi ch c phng n A ng
Cu hi Ton thi minh ha 2017
Lm ty chn [baithi] c tp cu hi
Lm ty chn [baitap] c tp cu hi
Lm ty chn [baitap] khng dng tp cu hi
Cu hi ting Anh
Lm trc tip t cu hi
Lm vi tp ty chn [baithi]
Lm vi tp ty chn [baitap]
Gi lnh quy tm trang vn bn
Gi lnh ly trang cui cng
Gi lnh sp th t hng ngang
Gi ln cho chm s tiu
Gi lnh lm ct vn bn
4. Li cm n
Trong qu trnh lm gi lnh ti nhn c nhiu gp v xut nhng chc nng hon
thin cho ngi dng. Nhn y ti gi li cm n chn thnh ti cc bn trao i trn trang web:
http://nhdien.wordpress.com v trao i trc tip qua Email: nvvietex@gmail.com.
Chc cc bn may mn!
Mt k nim ngy 20 thng 11 nm 2016.
5. Hn ch ca gi lnh
1. Ty chn [baitap] cha lm p kt qu in ra.
2. S trang bi thi trong ty chn [baithi] cha vt ht kh nng t ng.
3. Ty chn [baithi] vi trn 40 bn bi thi tr ln chy hi b chm.
4. Ty chn [baitap] cha c nghin cu k vi cc dng cu hi khc nhau.
http://nhdien.wordpress.com - Nguyn Hu in
6. Phn m u ca tp loi ny
Khi dng gi lnh \usepackage[baitap]{dethi}, ty chn c cc kh nng
\documentclass[12pt]{article}
\usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}
\usepackage{graphicx}
\usepackage{picinpar}
\usepackage[utf8]{vietnam}
\usepackage{longtable}%
\usepackage{multicol}%
\usepackage{color}
\usepackage{mathptmx}
\usepackage[baitap]{dethi}
% \usepackage{mathpazo}
\voffset=-3cm
% \hoffset=-2cm
\textheight 24truecm
\textwidth 19truecm
\madethi{103}
\def\tentruong{\small H KHTN H NI}
\def\tenkhoa{Khoa Ton - C -Tin hc}
\def\loaidethi{( thi chnh thc)}
\def\tenkythi{ THI HC K 2009-2010}
\def\tenmonhoc{Mn thi: Ton trc nghim}
\def\thoigian{Thi gian lm bi: 60 pht}
\usepackage{fancybox}
\cornersize*{3.6mm}
% \daungoac{\Ovalbox}{} %khoan ch phng n
\khoanh{\Ovalbox} %khoanh quan p n
%\daungoac{(}{)}%%{[}{]}%Du quanh phng n tr li: {(}{)};{}{.};{}{)}
\chuphuongan{\small\bfseries\Alph}
\mauchu{blue} %Mu ch phng n
\PSNrandseed{\time}
% \coloigiai
\usepackage{centerpage} %gi lnh cn cc trang vo trung tm
\usepackage{lastpage} %gi lnh ly trang cui cng
http://nhdien.wordpress.com - Nguyn Hu in
\graphicspath{{hinh-cauhoi/}}
\setlength{\shortitemwidth}{0.17\textwidth}
7. Mt cu hi v li gii
nh dng c bn mt bi tp
\begin{baitap}{<Nhn ca bi>}
\begin{problems}
<Ni dung bi>
\end{problems}
\begin{traloi}
<Ni dung li gii>
\end{traloi}
\end{baitap}
1. <Nhn ca bi> Mi bi c gn cho mt nhn, c im ca nhn l chi lm hai phn
c du hai chm gia. Phn trc du chm ta c th cho cng nhm k t nh diffeasy
lot bi o hm loi d sau ny ly ra hng lot cng loi, phn sau arctan cho khc
nhau, duy nht trong tp d liu. V vy ta c th cho s cng c nh diffeasy:2 bi s
2 trong tp ca ta.
2. <Ni dung bi>, chp nhn tt c lnh ca LATEX tr mi trng verbatim. Vi ty
chn km theo c th ch hin ra bi hoc khng.
3. <Ni dung li gii> Tt c lnh v mi trng, k c hnh nh u cho vo y c.
Vi ty chn km theo c th ch hin ra li gii hoc khng.
V d nh ngha bi ton:
\begin{baitap}{diffeasy:arctan}
\begin{problems}
$y = \arctan x = \tan^{-1}x$
\end{problems}
\begin{traloi}
$$\tan y = x$$
diff w.r.t. $x$:
\begin{eqnarray*}
\sec^2y\frac{dy}{dx} & = & 1\\
\frac{dy}{dx} & = & \frac{1}{\sec^2y}\\
& = & \frac{1}{1+\tan^2y}
= \frac{1}{1+x^2}
\end{eqnarray*}
\end{traloi}
http://nhdien.wordpress.com - Nguyn Hu in
\end{baitap}
Vi lnh s dng v kt qu:
\begin{enumerate}[label={\bf Cu \arabic*. }]
Cu 1. Ly o hm hm s sau y
\item \useproblem{diffeasy:arctan}
arctan x = tan1 x
\end{enumerate}
\showanswers
\begin{enumerate}[label={
\bf Cu \arabic*. }]
\item \useproblem{diffeasy:arctan}
\end{enumerate}
Cho c li gii v bi
\begin{enumerate}[label={
\bf Cu \arabic*. }]
\hideanswers
\item \useproblem{diffeasy:arctan}
\showanswers
\useproblem{diffeasy:arctan}
\end{enumerate}
:
Cu 1. Ly o hm hm s sau y
arctan x = tan1 x
http://nhdien.wordpress.com - Nguyn Hu in
10
8.1. Cu hi t lun
Ging ht nh v d trn ch c khc l cc mi trng c rt gn li
\baituluan{<Nhn ca bi>}{%Cu hi 1
<Ni dung bi>
}{%Tr li
<Ni dung li gii>
}%Ht cu hi 1
Cch dng ging trn v cch dng khc na phn sau. V d
\baituluan{logic:5}{%Cu hi 5
Trong mn hc gii tch ton hc ngi ta nh ngha hm lin tc nh sau:
"Hm $f(x)$ c gi l hm lin tc ti $x_0\in D$ nu cho trc mt s
$\epsilon>0$ ty th ta c c mt s $\delta>0$ tng ng sao cho
vi mi $x\in D$ tha mn $|x-x_0|<\delta$ th $|f(x)-f(x_0)|<\epsilon$".\\
a) Hy vit li nh ngha theo cc k hiu ca h ton tn t.\\
b) Hy lp mnh ph nh cho nh ngha trn
(ngha l hm khng lin tc ti im $x_0$)
}{%Tr li
a) $(\forall \epsilon)(\exists \delta) (\forall x\in D): $
$|x-x_0|<\delta \rightarrow |f(x)-f(x_0)|<\epsilon$.\\
b) $(\exists \epsilon) (\forall \delta) (\exists x\in D) : $
$|x-x_0|<\delta \rightarrow |f(x)-f(x_0)|>\epsilon$
}%Ht cu hi 5
\begin{enumerate}[label={\bf Cu \arabic*. }]
\hideanswers
\showanswers
\item \useproblem{logic:5}
\end{enumerate}
2
Cu 1. Trong mn hc gii tch ton hc ngi ta nh ngha hm lin tc nh sau: "Hm f ( x )
c gi l hm lin tc ti x0 D nu cho trc mt s e > 0 ty th ta c c mt s
> 0 tng ng sao cho vi mi x D tha mn | x x0 | < th | f ( x ) f ( x0 )| < e".
a) Hy vit li nh ngha theo cc k hiu ca h ton tn t.
b) Hy lp mnh ph nh cho nh ngha trn (ngha l hm khng lin tc ti im x0 )
Li gii. a) (e)()( x D ) : | x x0 | < | f ( x ) f ( x0 )| < e.
b) (e)()( x D ) : | x x0 | < | f ( x ) f ( x0 )| > e
http://nhdien.wordpress.com - Nguyn Hu in
11
http://nhdien.wordpress.com - Nguyn Hu in
12
\hideanswers
\begin{enumerate}[leftmargin=*,align=left,
label={\bf Cu \arabic*.\ }]
\item \useproblem{giaitich:1}
\end{enumerate}
bi v tr li
x 1
Cu 1. Gii phng trnh 23 x 3x = 9
v ch ra nghim khng nguyn ca
n.
A.
C.
\hideproblems
\showanswers
\begin{enumerate}[leftmargin=*,align=left,
label={\bf Li gii \arabic*.\ }]
\item \useproblem{giaitich:1}
\end{enumerate}
3
2;
5
7;
B. 3 log3 2;
D. log2 3;
\showanswers
\begin{enumerate}[leftmargin=*,align=left,
label={\bf Cu \arabic*.\ }]
\item \useproblem{giaitich:1}
\end{enumerate}
Tr li rt gn
x 1
Cu 1. Gii phng trnh 23 x 3x = 9
v ch ra nghim khng nguyn ca
n.
A.
C.
3
2;
5
7;
B. 3 log3 2;
D. log2 3;
:
Li gii 1.
http://nhdien.wordpress.com - Nguyn Hu in
13
{\sai{\underline{h}igh }}
{\sai{\underline{h}ouse }}
{\sai{\underline{h}ome}}
}%Ht mt bi
Loi bi ton chn t cng l bi ton trc nghim nhng nh dng hi c bit nhiu cu hi
ch c phng n lin vi dng, nn phn ni dung cu hi khng c. Ti to ra cu hi ging
nh trc nghim phng dng Bn phng n c ch t: \bonpat
d hiu ta ly mt lot bi ton nh vy trong 1 tp:
\def\dschontu{chontu:1,chontu:2,chontu:3}
\loadselectedproblems[btchontu]{\dschontu}{08cauhoi-tienganh-2009}
\tieude{Chn t (ng vi A hoc B, C, D) c phn gch di
c pht m khc vi nhng t cn li trong mi cu sau.}
\begin{enumerate}[leftmargin=*,align=left,label={\bf Cu \arabic*.}]
\foreachproblem[btchontu]{
\item\label{prob:\thisproblemlabel}\thisproblem}
\end{enumerate}
Chn t (ng vi A hoc B, C, D) c phn gch di c pht m khc vi nhng t cn li
trong mi cu sau.
Cu 1.
A. hour
B. high
C. house
D. home
Cu 2.
A. basic
B. nation
C. cancer
D. patience
Cu 3.
A. stopped
B. worked
C. wanted
D. liked
http://nhdien.wordpress.com - Nguyn Hu in
14
http://nhdien.wordpress.com - Nguyn Hu in
15
C p n v tr li
\showanswers
\tieude{Chn phng n (A hoc B, C, D) ng vi t/ cm t c gch di cn phi sa cc
\begin{enumerate}[ resume,label={\bf Cu \arabic*.\ }]
\foreachproblem[btsuatu]{\item[\ref{prob:\thisproblemlabel}]\thisproblem}
\end{enumerate}
Chn phng n (A hoc B, C, D) ng vi t/ cm t c gch di cn phi sa cc cu sau
tr thnh chnh xc.
Cu 1. That is the man which told me the bad news.
A
Cu 1.
Cu 2.
Cu 3.
http://nhdien.wordpress.com - Nguyn Hu in
16
\hideanswers
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{| p{0.6\textwidth} |c|}
\hline
\textbf{Cu hi} & \textbf{Tr li}\\
\hline %
1. \useproblem{bangtn:2}
&\\
\hline
\end{tabular}
p n
\showanswers
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{| p{0.6\textwidth} |c|}
\hline
\textbf{Cu hi} & \textbf{Tr li}\\
\hline %
1. \useproblem{bangtn:2}
&\\
\hline
\end{tabular}
:
Cu hi
1. exp(ln x ) = x pour tout
x appartenant
Tr li
0
;
+
0 ; +
:
Cu hi
1. exp(ln x ) = x pour tout
x appartenant
2
Tr li
; +
0
;
+
8.5. Cu hi in ch trng
Ta c th dng phng n * cho bt c mi trng no cng c, ti dng lnh cho cau hi
t lun
\baitracnghiemdv*{<Nhn ca bi>}{
http://nhdien.wordpress.com - Nguyn Hu in
17
\hideanswers
\begin{enumerate}[ resume,label={\bf Cu \arabic*.\
\item \useproblem{diencho:s1}
\end{enumerate}
}]
2
Cu 3. How much
wood?
would a
chuck, if a
would
V d tr li:
\showanswers
\begin{enumerate}[ resume,label={\bf Cu \arabic*.\
\item \useproblem{diencho:s1}
\end{enumerate}
}]
2
Cu 3. How much wood would a woodchuck chuck, if a woodchuck would chuck, wood?
8.6. Cu hi ng sai
Ta c th dng phng n * cho bt c mi trng no cng c, ti dng lnh cho cau hi
t lun
\baitracnghiemds*{<Nhn ca bi>}{
<Ni dung cu hi in>
}
http://nhdien.wordpress.com - Nguyn Hu in
18
V d lp cu hi
\hideanswers
\begin{enumerate}
\item \useproblem{dungsai:1}
\item \useproblem{dungsai:2}
\end{enumerate}
V d tr li cu hi
1.
false.
2.
Roger & Trng Me
chronicles one mans attempt to get into
Disneyland so that he can visit Toontown.
\showanswers
\begin{enumerate}
\item \useproblem{dungsai:1}
\item \useproblem{dungsai:2}
\end{enumerate}
2
1.
ng
2.
ng
Roger & Trng Me
chronicles one mans attempt to get into
Disneyland so that he can visit Toontown.
http://nhdien.wordpress.com - Nguyn Hu in
19
would a
chuck, if a
would
.
http://nhdien.wordpress.com - Nguyn Hu in
20
\begin{enumerate}
\selectallproblems{<Tn tp>}
\end{enumerate}
<Tn tp> l cc tp c cu trc trn, k c tp cha nh dng chung nht phn u. V d
\hideanswers
\begin{enumerate}
\selectallproblems{cauhoi05-dungsai}
\end{enumerate}
1.
2.
Roger & Trng Me chronicles one mans attempt to get into Disneyland
so that he can visit Toontown.
3.
conuts.
Laden swallows fly faster than unladen swallows, unless they carry co-
4.
5.
All animals are created equal, but some animals are more equal than others.
9.3. Cc lnh ly cu hi vo b nh
A. Lnh \loadrandomproblems gi cu hi vo b nh, ch khi no dng bng lnh khc mi
ly vo vn bn.
\loadrandomproblems[<Tn tp cha cu hi>]{<S cu hi>}{<Tn tp>}
1. <Tn tp cha cu hi> Ta t mt tn b danh cha cc cu hi trong b nh,
dng n sau ny nh bttuluan, hoc bttracnghiem,...
2. <S cu hi> S nguyn, ln nht bng s cu hi c trong <Tn tp>, khng th bo
li.
3. <Tn tp> Mt trong cc tp cha cu hi trn.
V d ly 4 cu trong tp t lun (ta bit tp c hn 3 cu hi)
\loadrandomproblems[bttuluan]{5}{cauhoi01-tuluan}
C th ly hng lot tp vo mt lc nh
\loadrandomproblems[bttracnghiem]{20}{cauhoi02-dtracnghiem}
\loadrandomproblems[btdiencho]{3}{cauhoi03-tracnghiemdv}
\loadrandomproblems[btdungsai]{4}{cauhoi05-dungsai}
\loadrandomproblems[btbangtn]{5}{cauhoibangtn}
Khi ta c th dng lnh theo nhn ly ra
http://nhdien.wordpress.com - Nguyn Hu in
21
\showproblems
\begin{enumerate}[leftmargin=*,align=left, label={\bf Cu \arabic*.\ }]
\item\useproblem[bttuluan]{logic:4}
\item\useproblem[bttracnghiem]{tracnghiem:b01}
\end{enumerate}
Cu 1. Trong mn hc gii tch ton hc ngi ta nh ngha hm lin tc nh sau: "Hm
f ( x ) c gi l hm lin tc ti x0 D nu cho trc mt s e > 0 ty th ta c c
mt s > 0 tng ng sao cho vi mi x D tha mn | x x0 | < th | f ( x ) f ( x0 )| <
e".
a) Hy vit li nh ngha theo cc k hiu ca h ton tn t.
b) Hy lp mnh ph nh cho nh ngha trn (ngha l hm khng lin tc ti im
x0 )
x2 5x + 6
l:
Cu 2. Tp xc nh ca hm s y =
x+2
A. R \ {3; 2; 2}
B. R \ [2; 3]
C. (, 2] [3, +)
D. (, 2] [3, +) \ {2}
Bn c th t tm thi draft cho ty chn gi lnh s nhn thy nhn.
B. Khi ly ra ri ta c th gi cc bi ra nh tp d liu nh
\begin{enumerate}[leftmargin=*,align=left, label={\bf Cu \arabic*.\ }]
\foreachproblem[btdungsai]{\item\thisproblem}
\end{enumerate}
Cu 1.
Roger & Trng Me chronicles one mans attempt to get into Disneyland
so that he can visit Toontown.
Cu 2.
conuts.
Laden swallows fly faster than unladen swallows, unless they carry co-
Cu 3.
Cu 4.
others.
All animals are created equal, but some animals are more equal than
http://nhdien.wordpress.com - Nguyn Hu in
22
\end{enumerate}
D. c bit chng cn dng lnh trn ch cn \input cauhoituluan.tex ri dng lnh
\begin{enumerate}[leftmargin=*,align=left, resume, label={\bf Cu \arabic*.\ }]
\item\useproblem{logic:2}
\item\useproblem{logic:1}
\end{enumerate}
Bi v tp d liu cha mc nh cha cc bi gi vo l [default]. Tt c cc lnh phn trc
c dng tp c s d liu u dng thay vo [default] l c nh
\begin{enumerate}[leftmargin=*,align=left, resume, label={\bf Cu \arabic*.\ }]
\foreachproblem[default]{\item\thisproblem}
\end{enumerate}
Ch tp ny [default] c tt c cc bi dng cch gi khng gn vo tp d liu c th no.
( P1 P2 ) Q ( P1 Q) ( P1 Q).
b) S dng s tng ng trn chng minh mnh sau y: " Nu n khng chia ht cho 3 th
n2 khng chia ht cho 3".
http://nhdien.wordpress.com - Nguyn Hu in
23
(( A B) ( B C )) ` A C.
( A B) (( B C ) (( A B) C )).
Hy thc hin
a) a cng thc v dng chun tc hi.
b) Ch ra cng thc l hng ng.
Cu 4. a) Pht biu nh ngha th no l hng t v cng thc tn t trong l thuyt h tn t.
b) Cho v t ba bin P( x, y, z) x.y = z trn trng s thc. Xc nh gi tr chn l ca
mnh : ( x )(y)(z) P( x, y, z) v (z)( x )(y) P( x, y, z). Din gii mnh thnh cu ni thng
thng.
Cu 5. Trong mn hc gii tch ton hc ngi ta nh ngha hm lin tc nh sau: "Hm f ( x )
c gi l hm lin tc ti x0 D nu cho trc mt s e > 0 ty th ta c c mt s > 0
tng ng sao cho vi mi x D tha mn | x x0 | < th | f ( x ) f ( x0 )| < e".
a) Hy vit li nh ngha theo cc k hiu ca h ton tn t.
b) Hy lp mnh ph nh cho nh ngha trn (ngha l hm khng lin tc ti im x0 )
Tham kho cc nhn \ref{all:logic:1} l Cu 1. , \ref{all:logic:3} l Cu 3. ,
\ref{all:logic:2} l Cu 2.
3. C th dng lit k cc cu hi gi ra ri dng
\begin{enumerate}[leftmargin=*,align=left, resume,label={\bf Cu \arabic*.\ }]
\foreachproblem[bttuluan]{
\item\label{prob:\thisproblemlabel}\thisproblem}
\end{enumerate}
T sau ta dng nhn
\begin{enumerate}
\foreachproblem[bttuluan]{
\item[\ref{prob:\thisproblemlabel}]\thisproblem}
\end{enumerate}
http://nhdien.wordpress.com - Nguyn Hu in
24
Cha
va
truy
nhp
vo
\newcount\myseed
\PSNgetrandseed{\myseed}
3. \PSNrandom: \PSNrandom{<Bin ghi>}{<n>} sinh ra mt s t nhin t 1 n n, ri ghi
vo <Bin ghi>. V d sinh ra mt s trong khong 1 n 10 ri ghi vo \myreg:
\newcount\myreg
\PSNrandom{\myreg}{10}
4. \random: \random{<S m>}{<cn di>}{<cn trn>} Sinh ra s ngu nhin trong
khong cn di n cn trn v ghi vo s m. V d
\newcounter{myrand}
\random{myrand}{3}{8}
5. \doforrandN: \doforrandN{<n>}{<cmd>}{<list>}{<Vn bn>} Chn ngu nhin n gi
tr trong <Vn bn> cch nhau bi du phy. Mi ln thc hin lp th thc hin <Vn bn> bng
lnh <cmd>
V d gi bi t hai ca danh sch tp:
\doforrandN{2}{\thisfile}{file1,file2,file3}{%
\loadrandomproblems{1}{\thisfile}}
http://nhdien.wordpress.com - Nguyn Hu in
\showanswers
\begin{enumerate}[leftmargin=*,align=left, resume,label={\bf Cu \arabic*.\ }]
\foreachdataset{\thisdataset}{%
\foreachproblem[\thisdataset]{
\item[\ref{prob:\thisproblemlabel}]\thisproblem}
}
\end{enumerate}
3. In y c v li gii
\hideproblems
\showanswers
\begin{enumerate}[leftmargin=*,align=left, resume,label={\bf Cu \arabic*.\ }]
\foreachdataset{\thisdataset}{%
\foreachproblem[\thisdataset]{
\item[\ref{prob:\thisproblemlabel}]\thisproblem}
}
\end{enumerate}
25
http://nhdien.wordpress.com - Nguyn Hu in
\hideproblems
\showanswers
\begin{multicols}{3}
\begin{enumerate}[leftmargin=*,align=left]
\foreachdataset{\thisdataset}{%
\foreachproblem[\thisdataset]{
\item[\ref{prob:\thisproblemlabel}]\thisproblem}
}
\end{enumerate}
\end{multicols}
4. In ra phiu kim tra theo
\lamtieude
\begin{center}
{\bf PHIU KIM TRA TRC NGHIM}
\end{center}
H v tn \dotfill Lp \dotfill
\hideproblems
\showanswers
\lamphieu
\begin{multicols}{3}
\begin{enumerate}[leftmargin=*,align=left]
\foreachdataset{\thisdataset}{%
\foreachproblem[\thisdataset]{
\item[\ref{prob:\thisproblemlabel}]\thisproblem}
}
\end{enumerate}
\end{multicols}
11.3. in ch v ng sai
1. ch in ra
\loadrandomproblems[btdiencho]{5}{cauhoi03-tracnghiemdv}
\loadrandomproblems[btdungsai]{5}{cauhoi05-dungsai}
\hideanswers
\noindent {\bf in vo ch trng}
\begin{enumerate}[{\bf Cu 1.}]
\foreachproblem[btdiencho]{
\item\label{prob:\thisproblemlabel}\thisproblem}
\end{enumerate}
\noindent {\bf Tr li ng sai}
26
http://nhdien.wordpress.com - Nguyn Hu in
\begin{enumerate}[{\bf Cu 1.}]
\foreachproblem[btdungsai]{
\item\label{prob:\thisproblemlabel}\thisproblem}
\end{enumerate}
2. In ra v p n
\begin{center}
{\bf BI V P N }
\end{center}
\showanswers
\noindent {\bf in vo ch trng}
\begin{enumerate}
\foreachproblem[btdiencho]{
\item[\bf Cu \ref{prob:\thisproblemlabel}.]\thisproblem}
\end{enumerate}
\noindent {\bf Tr li ng sai}
\begin{enumerate}
\foreachproblem[btdungsai]{
\item[\bf Cu \ref{prob:\thisproblemlabel}.]\thisproblem}
\end{enumerate}
27
http://nhdien.wordpress.com - Nguyn Hu in
28
11.5. c th thit k
1. Ta c th thit k dng cu hi
\newproblem{tab:1}{%
Kt qu $(3+2)\times5$ l? &
25 \ifshowanswers\selected\else\notselected\fi &
13 \notselected &
10 \notselected &
}{Brackets come first}%
\newproblem{tab:2}{%
Kt qu $-1+2\times3$ l? &
3 \notselected &
-7 \notselected &
5 \ifshowanswers\selected\else\notselected\fi &
}{Multiplication comes first}%
2. Ri thit k cu hi tr li
\begin{longtable}{lrrrl}
\bfseries Cu hi & \bfseries A & \bfseries B &
\bfseries C & \ifshowanswers \bfseries Reason\fi\\
\selectrandomly{cauhoi07-baithietke}{2}
\end{longtable}
Cu hi
1. Kt qu (3 + 2) 5 l?
2. Kt qu 1 + 2 3 l?
A
25
3
B
13
-7
C
10
5
http://nhdien.wordpress.com - Nguyn Hu in
29
http://nhdien.wordpress.com - Nguyn Hu in
%\NoRearrange %Lnh khng trn
% \socotdapan{3} %s ct p n v phiu thi
% \motphieuthi
%In ra mt phiu thi, Mc nh l khng hin ra phiu thi
% \nhieuphieuthi
%In ra mi mt phiu thi
%\coloigiai
%In ra p n c li gii, khng c \ShortKey v phiu thi
% \lietkedatrue
%in p n theo kiu lit k
\ShortKey
%Lnh hin ra p n mi thi
% \OneKey
%Lnh ch in ra 1 bn p n
% \NoKey
%Lnh khng in ra phn p n
\tentruong{B GIO DC V O TO}
\tenkhoa{ MINH HA}
\loaidethi{ gm c \pageref{LastPage} trang}%{ THI LI}%%{ CHNH THC}
\tenkythi{K THI TRUNG HC PH THNG QUC GIA NM 2017}
\tenmonhoc{Mn: Ton}
\madethi{100}
\thoigian{\underline{Thi gian lm bi: 90 pht, khng k thi gian pht }}
30
http://nhdien.wordpress.com - Nguyn Hu in
31
........
\end{shortanswer}
V d t cu hi phn A trong tp km theo: vidu01-tuluan.tex
V d t cu hi phn B trong tp km theo: vidu01-tuluan-f1.tex
http://nhdien.wordpress.com - Nguyn Hu in
32
http://nhdien.wordpress.com - Nguyn Hu in
33
......
\end{vnmultiplechoice}
1. title l tiu phn ni dung chung cho cc cu hi; rearrange=yes c o v no khong
o . keycolumns=6 p n chia lm su ct lit k kt qu ng.
2. Khi o th cc cu hi t trong khu nu o vi nhau thi khng o ra ngoi n.
3. Mi trng vnmultiplechoice khi ly cu hi t tp vo khng b li.
4. V d t cu hi phn A. trong tp: vidu02-tracnghiem.tex
5. V d t cu hi phn B. trong tp: vidu02-tracnghiem-f1.tex
http://nhdien.wordpress.com - Nguyn Hu in
34
\baitracnghiemgd{suatu:2}{
My \saih{younger} brother \saih{has} worked in \saih{a} bank \dungh{since} a long time.
}{%Phng n tr li
\datcot
\bonpah
{\sai{younger}}
{\sai{has}}
{\sai{a}}
{\dung{since}}
}
Xem cu hi trong tp cauhoi02-tracnghiemgd.tex
C. Mi trng s dng
\begin{vnmultiplechoice}[title={\bf
.......
\end{vnmultiplechoice}
Cu hi gch di},
keycolumns=3]
V d l tp:vidu02-tracnghiemgd.tex
15.2. Cu hi in vo
A. Cu hi trc tip.
\begin{question}
Mills theory of morality is known as \blank{Utilitarianism}
\end{question}
B. Cu hi trong tp.
\baitracnghiemdv*{diencho:so2}{%Cu hi 2
\blank{Wittgenstein}s first work was the \textsl{Tractatus-\blank{Logico}
Philosophicus}.
}
Xem cu hi trong tp cauhoi02-tracnghiemdv.tex
C. Mi trng s dng
\begin{vnfillin}[title={\bf
Cu hi in t vo ch trng},
resetcounter=yes,keycolumns=2]
.......
\end{vnfillin}
V d l tp:vidu02-tracnghiemdv.tex
http://nhdien.wordpress.com - Nguyn Hu in
15.3. Cu hi ng sai
A. Cu hi trc tip.
\begin{question}
\answer{Sai} Laden swallows fly faster than unladen swallows, unless
they carry coconuts.
\end{question}
B. Cu hi trong tp.
\baitracnghiemds*{truefalse:b04}{%
\answer{ng} Monty Python and the Holy Grail is a very funny movie.
}
Xem cu hi trong tp cauhoi05-dungsai.tex
C. Mi trng s dng
\begin{truefalse}[title={\bf
.......
\end{truefalse}
Cu hi ng sai}]
V d l tp:vidu05-tracnghiemds.tex
15.4. Cu hi tng ng
A. Cu hi trc tip.
Ghp ni cc ....
\pair{Elvis Costello}{Spike}
\pair{Nirvana}{Nevermind}
\pair{Love and Rockets}{Earth, Sun, Moon}
\pair{The Jesus and Mary Chain}{Automatic}
\pair{The Dave Matthews Band}{Under the Table and Dreaming}
B. Cu hi trong tp.
\newproblem*{matching:b01}{%
\pair{Elvis Costello}{Spike}
\pair{Nirvana}{Nevermind}
\pair{Love and Rockets}{Earth, Sun, Moon}
\pair{The Jesus and Mary Chain}{Automatic}
\pair{The Dave Matthews Band}{Under the Table and Dreaming}
}
35
http://nhdien.wordpress.com - Nguyn Hu in
36
16. Tng hp cu hi
Nhng loi cu hi trn c th tng hp trong mt thi hay mt cun sch:
1. vidu06-tonghop-f1.tex
\usepackage[baithi]{dethi}.
dng
cc
cu
hi
theo
la
chn
2. vidu06-tonghop-f2.tex
l
dng
cc
cu
hi
theo
la
\usepackage[baitap]{dethi}. y l mt cun sch c cc loi cu hi khc nhau.
chn
http://nhdien.wordpress.com - Nguyn Hu in
37
http://nhdien.wordpress.com - Nguyn Hu in
38
\includegraphics[width=0.8\linewidth,clip=]{input}%
\figcaption{Ch thch hnh}%
\label{fig:input}%
\end{figure}
Ly nhn bng \ref{fig:input} v \ref{tab:Commands}.
3. V d
\baituluan{Viduhinh:1}{%Cu hi 4
Hai ng gic u $ABCDE$ v $AEKPL$ trong khng gian sao cho
$\widehat{DAK} =60^o$. Chng minh rng hai mt phng $ACK$
v $BAL$ vung gc.
\begin{figure}[H]
\centering%
\includegraphics[scale=0.8]{hinh12mat}
\figcaption{Ch thch hnh}%
\label{fig:input}%
\end{figure}
}{%Tr li
Nu ta quay $AEKPL$ quanh trc $AE$,
bt u v tr trng nhau vi $ABCDE$, th gc $\widehat{DAK}$
tng cho n khi $AEKPL$ li nm trn mt phng cha $ABCDE$. .....
}%Ht cu hi
\begin{enumerate}[label={\bf Cu \arabic*.\ }]
\showanswers
\item \useproblem{Viduhinh:1}
\end{enumerate}
T
L
E
D
O
C
B
http://nhdien.wordpress.com - Nguyn Hu in
39
http://nhdien.wordpress.com - Nguyn Hu in
40
\baitracnghiem{t2017:b10}{%
Cho mt tm nhm hnh vung cnh 12 cm. Ngi ta ct bn gc ca tm
nhm bn hnh vung bng nhau, mi hnh vung c cnh bng $x$ (cm), ri gp tm
nhm li nh hnh v di y c mt ci hp khng np. Tm $x$ hp nhn
c c th tch ln nht.
\begin{center}
\includegraphics[scale =0.4]{toan03}
\end{center}
}{
\datcot
\bonpa
{\sai{$x=6$.}}
{\dung{$x=3$.}}
{\sai{$x=2$.}}
{\sai {$x=4$.}}
}
Cu 3. Cho mt tm nhm hnh vung cnh 12 cm. Ngi ta ct bn gc ca tm nhm
bn hnh vung bng nhau, mi hnh vung c cnh bng x (cm), ri gp tm nhm li nh hnh
v di y c mt ci hp khng np. Tm x hp nhn c c th tch ln nht.
A. x = 6.
B. x = 3.
C. x = 2.
D. x = 4.
17.3. t cc tp hnh vo mt th mc
cho gn nhng tp hnh ta vo mt th mc bn trong th mc ang cha cc tp TeX
bng lnh \graphicspath{{hinh-cauhoi/}}tt c cc hnh cu hi trong th mc \hinh-cauhoi
http://nhdien.wordpress.com - Nguyn Hu in
Dng n trong ty chn [baithi]:
\begin{vnmultiplechoice}[keycolumns=3]%
\useproblem[bttn]{t2017:b10}
\useproblem[bttn]{t2017:b15}
\end{vnmultiplechoice}
Trong ty chn [baitap]
\loadselectedproblems[bttn]{t2017:b10,t2017:b15}{01cauhoi-toan-2017}
\showproblems
\begin{enumerate}[resume,label={\bf Cu \arabic *.\ }]
\item\useproblem[bttn]{t2017:b10}
\item\useproblem[bttn]{t2017:b15}
\end{enumerate}
2. Tng t nu c nhiu nhn a vo danh sch:
\def\dsnhan{t2017:b20,t2017:b21,t2017:b22}
\loadselectedproblems[bttnnew]{\dsnhan}{01cauhoi-toan-2017}
S dng cc nhn nh trn, nhng y ta dng cch khc trong ty chn [baithi]
\begin{vnmultiplechoice}[keycolumns=3]%
\foreachproblem[bttnnew]{\thisproblem}
\end{vnmultiplechoice}
Trong ty chn [baitap]
\showproblems
\begin{enumerate}[resume,label={\bf Cu \arabic *.\ }]
\foreachproblem[bttnnew]{\item\label{prob:\thisproblemlabel}\thisproblem}
\end{enumerate}
3. Ly cc nhn cu hi trong tp d liu:
Vi lp vieexamdesign.cls a vo t chn draft;
\documentclass[11pt,draft]{vieexamdesign}
Ly ton b cu hi bng lnh v mi trng
\begin{vnmultiplechoice}[keycolumns=3]%
\selectallproblems{01cauhoi-toan-2017}
\end{vnmultiplechoice}
Khi bin dch s c trang u tin cha cc nhn km theo tn tp cha nhn nh
41
http://nhdien.wordpress.com - Nguyn Hu in
42
[01cauhoi-toan-2017,t2017:b01] [01cauhoi-toan-2017,t2017:b02]
[01cauhoi-toan-2017,t2017:b03] [01cauhoi-toan-2017,t2017:b04]
[01cauhoi-toan-2017,t2017:b05] [01cauhoi-toan-2017,t2017:b06]
....
Chp nhn vo mt tp v ly nhn bng thay th tn tp bng trng,...
t2017:b01,
t2017:b08,
t2017:b15,
t2017:b22,
t2017:b29,
t2017:b36,
t2017:b43,
t2017:b50
t2017:b02,
t2017:b09,
t2017:b16,
t2017:b23,
t2017:b30,
t2017:b37,
t2017:b44,
t2017:b03,
t2017:b10,
t2017:b17,
t2017:b24,
t2017:b31,
t2017:b38,
t2017:b45,
t2017:b04,
t2017:b11,
t2017:b18,
t2017:b25,
t2017:b32,
t2017:b39,
t2017:b46,
t2017:b05,
t2017:b12,
t2017:b19,
t2017:b26,
t2017:b33,
t2017:b40,
t2017:b47,
t2017:b06,
t2017:b13,
t2017:b20,
t2017:b27,
t2017:b34,
t2017:b41,
t2017:b48,
t2017:b07,
t2017:b14,
t2017:b21,
t2017:b28,
t2017:b35,
t2017:b42,
t2017:b49,
http://nhdien.wordpress.com - Nguyn Hu in
\showproblems
\begin{enumerate}[resume,label={\bf Cu \arabic *.\
\selectrandomly{01cauhoi-toan-2017}{4}
\end{enumerate}
43
}]
}]
2. Nhng lnh trn c th ly cu hi trong nhiu tp khc nhau mt lc. xem trong tp
vidu02-tracnghiem-nhan-cauhoi.tex
Nhng ch khng ng thi ly hai ln cu hi c cng mt nhn, mi cu hi ch ly vo
b nh 1 ln, nu nhiu hn chng trnh s ba li.
http://nhdien.wordpress.com - Nguyn Hu in
44
http://nhdien.wordpress.com - Nguyn Hu in
vieexamdesign.cls
dethi.sty
baitap.sty
baithi.sty
centerpage.sty
titledot.sty
shortlst.sty
lastpage.sty
multicol.sty
nonfloat.sty
picinpar.sty
substr.sty
45
Hnh 2: Th mc dethi
http://nhdien.wordpress.com - Nguyn Hu in
46
\newcommand{\ba}{3}
\ifthenelse{\ba=3}{O.K.}{Ci g y?}\\
\ifthenelse{\value{page}<100}
{Trang nh}{Trang ln qu!}
O.K.
Trang nh
\ifthenelse{\isodd{\value{page}}}
{y l trang l \thepage.}
{y l trang chn \thepage.}
Kim tra chui k t
Kim tra chui k t dng lnh
\equal{<chui k t 1>}{<chui k t 2>}
\newcommand{\tenban}{Hng}
\ifthenelse{\equal{\tenban}{Hng}}
{Nguyn Thu \tenban}{Sai ri??}
http://nhdien.wordpress.com - Nguyn Hu in
47
Kim tra di
Mnh lgic so snh gia hai di l
\lengtest{<so snh>}
y <so snh> bao gm hai di hoc hai lnh di quan h bi <, = hoc >. V d
\newlength{\horiz} \newlength{\vert} \newlength{\min}
......
\ifthenelse{\newlength{\horiz>\vert}}
{\setlength{\min}{\vert}}{\setlength{\min}{\horiz}}
t \min nh hn \horiz v \vert.
B chuyn i
B chuyn i l thng s hoc l ng hoc l sai hay cn gi l c. C ba lnh vn hnh
chuyn i:
\newboolean{<chui k t>} To ra b chuyn i.
\setboolean{<chui k t>}{<gi tr>} Gn gi tr true hoc false
\boolean{<chui k t>} Kim tra gi tr.
Lnh th ba dng kim tra trong cu lnh ca \ifthenelse v whiledo.
Kt hp cc mnh lgic
Bt k mnh lgic trn u c th t hp li thnh nhng mnh phc hp thng qua
cc ton t lgic sau:
\and
\or
\not
\(
\)
http://nhdien.wordpress.com - Nguyn Hu in
48
B. Gi lnh picinpar.sty
Gi lnh pincipar ca Friedhelm Sowa cho php mt ca s c a vo gia on vn bn.
Mi trng c bn ca gi lnh ny l window v c hai mi trng khc l figwindow, tabwindow.
Ch mi trng figwindow v mi trng figure vi mt s mi trng khc cho nh hoc
th nhiu khi th t ln lt c xp khng ng. Cng thc chung l
\begin{window}[<s dng>, <cn l>, <vn bn>, <ch thch>]
<v bn bn cnh>
\end{window}
<s dng> S dng ca on m ca s bt u xut hin.
<cn l> Cn vn bn trong ca s (l mc nh cn tri, c cn vo gia v r cn bn phi).
<vn bn> Vn bn mun a vo ca s
<ch thch> Gii thch vn bn trong ca s, la chn ny l cc tiu cho hai mi trng
figwindow v tabwindow
V d sau m t a hnh vo bn cch vn bn.
\baitracnghiem{t2017:b01}{%
ng cong trong hnh bn l th ca mt hm s trong
\begin{window}[0,r,{
\hspace*{1cm}\includegraphics[scale=0.6]{toan01}\hspace*{1cm}},{\label{fig:b01}}]
bn hm s c lit k bn phng n $A, B, C, D$ di
y. Hi hm s l hm s no ?
\end{window}
}{
\datcot[4]
\bonpa
{\sai{$y=-x^2+x-1$.}}
{\sai{$y=-x^3+3x+1$.}}
{\dung{$y=x^3-3x+1$.}}
{\sai {$y=x^4-x^2+1$.}}
}}
Cu 1. ng cong trong hnh bn l th ca mt hm s trong
bn hm s c lit k bn phng n A, B, C, D di y. Hi
hm s l hm s no ?
A. y = x2 + x 1.
B. y = x3 + 3x + 1.
C. y = x3 3x + 1.
D. y = x4 x2 + 1.
Mi trng figwindow v tabwindow c nh s hnh bn di
http://nhdien.wordpress.com - Nguyn Hu in
49
7
\begin{window}[1,c,{
\fbox{\shortstack{H\\ a \\ y}}},{}]
Con sng di lng su \\
Con sng trn mt nc \\
i con sng nh b \\
Ngy m khng ng c\\
\end{window}
C. Gi lnh enumitem.sty
Mc ch gi lnh ny l ch ng iu khin cc nhn v khong cch trong mi trng
enumerate, itemmize, description. Gi lnh ny khng cng vi gi lnh enumerate.sty, khi
dng chung s bo li, trong n c y cc mi trng danh sch chun ri, ti dng
gi lnh lm nhn v iu khin cc cu hi vi khong cch thch hp. Khi a gi lnh
\usepackage{enumitem} vo u vn bn, th c th thc hin lnh v mi trng. Khi dng
mi trng c ty chn
\begin{enumerate}[<Ty chn>]
\item <Vn bn>
\end{enumerate}
Mc nh ca ty chn nh l khng c gi lnh, ta c th gn li
1. Thng s cho cc khong cch ng ca danh sch:
topsep, partopsep, parsep, itemsep
2. Khong cc theo chiu ngang:
leftmargin, rightmargin, listparindent, labelwidth, labelsep, itemindent
3. C th t li khi thc hin mi trng
\begin{enumerate}[ leftmargin=*,itemindent=12pt, ...]
\item <Cc danh sch vn bn>
\end{enumerate}
4. C th t li chung cho ton vn bn bng lnh
\setlist{topsep=0pt, partopsep=0pt, parsep=0pt, itemsep=0pt, ...}
5. \setlist{noitemsep} b khong cch dng trong danh sch v cc dng st nhau hn.
\setlist{nolistsep} tt c cc khong cch trong mi trng danh sch u cho bng 0. Dng
lnh ny ko st cc cu hi trc nghim st nhau.
http://nhdien.wordpress.com - Nguyn Hu in
50
D. Gi lnh shortlst.sty
Gi lnh nhm mc ch nh s danh sch chy theo chiu ngang, ti dng gi lnh lm
cc phng n cho cu hi trc nghim. Khi a \usepackage{shortlst} ta c 3 mi trng
1. shortitemize Danh sch chm trn en.
2. shortenumerate Danh sch nh s th t.
3. runenumerate Danh sch nh s chy lin lin tc bn trong mi trng v c ngoi mi
trng ni lin tc.
Mt s lnh thng s iu khin mi trng ny nh sau:
1. \runitemsep khong cch gia cc danh sch c t li vi mc nh
\setlength{\runitemsep}{1em plus .5em minus .5em}.
2. \labelsep cch ch s v ch.
http://nhdien.wordpress.com - Nguyn Hu in
51
E. Gi lnh float.sty
E.1. To ra mt mi trng ng mi
To ra mi trng c th dng mt s lnh khc nhau nh \newtheorem, ta bit dng lnh
ny to ra mi trng nh l, Mnh , B , nh ngha, ...Ta ch l trc lnh ny thng c
lnh \theoremstyle{...} iu khin ni dung in nghing hoc khng nghing trong cc mi
trng s dng sau ny. Hon ton tng t nh vy gi lnh float.sty c lnh lm mi trng
ng \newfloat{<Tn mi trng>} v trc l lnh \floatstyle{<Ty chn>} v d
\floatstyle{plaintop}
\newfloat{program}
Ri dng mi trng program nh mi trng ng vi tiu ch thch phia trn on chng
trnh. <Ty chn> c cc t kha:
1. plain Ch thch ng khng gi thay i so vi LATEX m di hnh chnh vo gia.
2. plaintop Ch thch hnh pha trn v tng t nh ty chn trn.
3. boxed Khi mi trng ng c ng khung, nhng ch thch ngoi khung v pha
di.
4. ruled Ch thch nm trong hai ng k ngang v cui khi cng c ng k ngang
nh.
V d
\floatstyle{ruled}
\newfloat{Program}{htbp}{lop}[section]
ta c th dng Lnh v thng s y nh sau: required and one optional argument; it is of the
form
\newfloat{<Tn mi trng>}{<V tr>}{<tp cha mc lc>}[<Trong on>]
1. <Tn mi trng> t tn cho mi trng dng.
2. <V tr> L cc quy nh n l ch ci hoc kt hp t khi:
t ti u trang;
b ti Cui trang;
p ti Trang Di ng;
h ti y, nu c th;
http://nhdien.wordpress.com - Nguyn Hu in
52
H Ti y, dt khot nh vy.
Ch l ch c ty chn H l mi cn, cc ty chn khc ging nh mi trng hnh v bng ta
thng dng.
3. <tp cha mc lc> Phn m rng ca <Tn mi trng>.<tp cha mc lc> nh l
*.toc.
4. <Trong on> Trong chapter, section, part.
V d trn l
\floatstyle{ruled}
\newfloat{Program}{tbp}{lop}[section]
\begin{Program}
\begin{verbatim}
\dots\ program text \dots
\end{verbatim}
\caption{\dots\ caption \dots}
\end{Program}
http://nhdien.wordpress.com - Nguyn Hu in
53
n
0
1
2
3
4
5
6
7
n
0
1
1
1
1
1
1
1
1
n
1
n
2
n
3
n
4
n
5
n
6
n
7
1
2
3
4
5
6
7
1
3
6
10
15
21
1
4
10
20
35
1
5
15
35
1
6
21
1
7
http://nhdien.wordpress.com - Nguyn Hu in
54
\floatstyle{plaintop}
\restylefloat{figure}
t li ch thch hnh v bng.
\begin{figure}[H]
\centering
\includegraphics[height=4cm,width=6cm]{banco1}
\caption{Dng graphicx}\label{fig:}
\end{figure}
Hnh 4: Dng graphicx
F. Gi lnh nonfloat.sty
Trong ch LaTeX bnh thng th mi trng table v figure lun bng v hnh trong
ch di ng, ngha l vi thng s
http://nhdien.wordpress.com - Nguyn Hu in
55
\begin{figure}[!ht]
\centering
\includegraphics[height=2cm,width=3cm]{*}
\caption{}\label{fig:}
\end{figure}
th hnh c th t ti v tr c lnh nu cn ch khng th chuyn sang u trang sau hoc v cui
bi. Nhiu lp hoc gi lnh khng dng ch ng ny, gi lnh nonfloat.sty p ng yu cu
ny, nhng khng dng c mi trng table v figure na, m phi thay i mt cht. ng
l l
\begin{table}[htbp]
\caption{Table Caption}%
\label{tab:supertitle}%
\begin{tabular}{...}
...
\end{tabular}
\end{table}
ta thay bng
\begin{minipage}{\linewidth}
\centering%
\tabcaption{Commands for Table and Figure Captions}%
\label{tab:Commands}%
\begin{tabular}{c l c }
...
\end{tabular}
\end{minipage}
Hnh c thay bng
\begin{minipage}{\linewidth}
\centering%
\includegraphics[width=0.8\linewidth,clip=]{input}%
\figcaption{Figure Caption}%
\label{fig:input}%
\end{minipage}
http://nhdien.wordpress.com - Nguyn Hu in
56
Ti liu
[1] Nguyn Hu in,Nguyn Minh Tun, LaTeX tra cu v son tho, NXBHQG, 2001.
[2] Nguyn Hu in, LaTeX gi lnh v phn mm cng c, NXBHQG, 2004.
[3] Jason Alexander, The examdesign class
http://www.ctan.org/tex-archive/macros/latex/contrib/examdesign
[4] Nguyn Hu in, Gi lnh dethi.sty 2.0 lm thi trc nghim
https://nhdien.wordpress.com/2016/09/14/goi-lenh-dethi-sty-2-0-lam-de-thi-tracnghiem/
[5] Nguyn Hu in, lamdethi.sty 1.0 gi lnh mi lm thi v bi tp
https://nhdien.wordpress.com/2010/01/20/lamdethi.sty 1.0 gi lnh mi lm thi v bi
tp
[6] Cc a ch gi lnh c lit k trn