<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%% \section{Examples}
\section{\texorpdfstring{VĆ­ dį»�}{Vi du}}

\label{sec:examples}

%% The setting is as follows. 
CĆ�c thiįŗæt lįŗ­p Ä‘Ę°į»£c dĆ¹ng nhĘ° sau Ä‘Ć¢y.
ChĆŗ Ć½ rįŗ±ng, cĆ�c thiįŗæt lįŗ­p tuĆ¢n theo nguyĆŖn tįŗÆc thį»«a kįŗæ. VĆ­ dį»�,
thiįŗæt lįŗ­p |font| khĆ´ng Ä‘Ę°į»£c khį»i tįŗ�o vį» trįŗ�ng thĆ�i bĆ¬nh thĘ°į»¯ng khi ta
khai bĆ�o mĆ´i trĘ°į»¯ng |Lemma|, vĆ¬ thįŗæ |Lemma| sįŗ½ thį»«a kįŗæ cĆ�c thiįŗæt lįŗ­p
cį»§a mĆ´i trĘ°į»¯ng |Theorem|.

\medskip
Mį»™t sį»‘ vĆ­ dį»� cĆ³ dĆ¹ng lį»‡nh |\color| Ä‘Ę°į»£c cung cįŗ�p bį»i gĆ³i |xcolor.sty|.

\medskip 
%% \begin{itemize}
%%  \item For Theorems:
%% \item 
Äį»‹nh lĆ½:
\begin{command}
  \theoremstyle{marginbreak}
  \theoremheaderfont{\normalfont\bfseries}\theorembodyfont{\slshape}
  \theoremsymbol{\ensuremath{\diamondsuit}}
  \theoremseparator{:}
  \newtheorem{Theorem}{Theorem}\end{command}
%%  \item For Lemmas:
%% \item 
Bį»• Ä‘į»:
\begin{command}
  \theoremstyle{changebreak}
  \theoremsymbol{\ensuremath{\heartsuit}}
  \theoremindent0.5cm
  \theoremnumbering{greek}
  \newtheorem{Lemma}{Lemma}\end{command}
%%  \item For Corollaries:
%% \item
 Hį»‡ quįŗ£:
\begin{command}
  \theoremindent0cm
  \theoremsymbol{\ensuremath{\spadesuit}}
  \theoremnumbering{arabic}
  \newtheorem{Corollary}[Theorem]{Corollary}
\end{command}
%%  \item For Examples:
%% \item 
VĆ­ dį»�:
\begin{command}
  \theoremstyle{change}
  \theorembodyfont{\upshape}
  \theoremsymbol{\ensuremath{\ast}}
  \theoremseparator{}
  \newtheorem{Example}{Example}\end{command}
%%  \item For Definitions:
%% \item
 Äį»‹nh nghÄ©a
\begin{command}
  \theoremstyle{plain}
  \theoremsymbol{\ensuremath{\clubsuit}}
  \theoremseparator{.}
  \newtheorem{Definition}{Definition}\end{command}
%%  \item For Proofs:
Chį»©ng minh:
\begin{command}
  \theoremheaderfont{\sc}\theorembodyfont{\upshape}
  \theoremstyle{nonumberplain}
  \theoremseparator{}
  \theoremsymbol{\rule{1ex}{1ex}}
  \newtheorem{Proof}{Proof}
\end{command}
%% \end{itemize}
%% Note, that parts of the setting are inherited. For instance, the
%% fonts are not reset before defining ``Lemma'', so the font setting 
%% of ``Theorem'' is used.

%% \begin{thmbox}
{\color{-red!75!green!50}
\begin{Example}[VĆ­ dį»� Ä‘Ę�n giįŗ£n]
%%  The first example is just a text. 
Mį»™t chiį»u Ä‘i trĆŖn con Ä‘Ę°į»¯ng nĆ&nbsp;y, Hoa Ä‘iį»‡p vĆ&nbsp;ng trįŗ£i dĘ°į»›i chĆ¢n tĆ´i,\ldots 

%%  In the next examples, it is shown how an endmark is put at a
%%  displaymath, a single equation and both types of eqnarrays.
	CĆ�c vĆ­ dį»� tiįŗæp theo minh hį»¨a cho viį»‡c Ä‘įŗ·t cĆ�c dįŗ�u kįŗæt thĆŗc
	į» cĆ�c biį»u thį»©c toĆ�n, phĘ°Ę�ng trĆ¬nh Ä‘Ę�n lįŗ» vĆ&nbsp; cĆ�c dĆ£y phĘ°Ę�ng trĆ¬nh.
\end{Example}
%% \end{thmbox}
}

%% \begin{thmbox}
{%\color{red!60}
\begin{Theorem}[Äį»‹nh lĆ½ dĆ&nbsp;i]
\label{thm:verylong}
%% The examples are put into this theorem environment. 
VĆ­ dį»� vį» mĆ´i trĘ°į»¯ng |Theorem|, lį»“ng bĆŖn trong nĆ³ lĆ&nbsp;
cĆ�c mĆ´i trĘ°į»¯ng khĆ�c nhĘ° |Example|, |Lemma|,\ldots Khi Ä‘ang
į» ngay trong mĆ´i trĘ°į»¯ng |Theorem|, chį»Æ cĆ³ mĆ&nbsp;u Ä‘en; khi į» trong
cĆ�c mĆ´i trĘ°į»¯ng sĆ¢u hĘ�n, mĆ&nbsp;u cį»§a mĆ´i trĘ°į»¯ng sįŗ½ Ä‘į»•i khĆ�c Ä‘į» dį»… phĆ¢n biį»‡t.

\medskip
%% The next example will not appear in the list of examples since
%% it is written as
VĆ­ dį»� tiįŗæp theo sįŗ½ khĆ´ng xuįŗ�t hiį»‡n trong danh sĆ�ch |Example|,
vĆ¬ nĆ³ Ä‘Ę°į»£c dĆ¹ng vį»›i dįŗ�ng sao:
\begin{command}
  \begin{Example*}
    ...
  \end{Example*}
\end{command}
{\color{red!60}
\begin{Example*}%[Ending with a displayed formula]
[kįŗæt thĆŗc vį»›i biį»u thį»©c toĆ�n]
%% Look, the endmark is really at the bottom of the line:
HĆ£y Ä‘į» Ć½ vį»‹ trĆ­ dįŗ�u kįŗæt thĆŗc į» dĘ°į»›i dĆ²ng biį»u diį»…n cĆ´ng thį»©c
\[ f^{(n)}(z) =
   \frac{n!}{2\pi i} \int \limits _{\partial D}
            \frac{f(\zeta)}{(\zeta-z)^{n+1}} d\zeta \]
\end{Example*}}
%% At this point, we add an additional entry without number 
%% in the Example list:
BĆ¢y giį»¯, ta sįŗ½ ghi vĆ&nbsp;i thĆ´ng tin bį»• sung vĆ&nbsp;o danh sĆ�ch |THM| (|Example|);
thĆ´ng tin Ä‘Ę°į»£c ghi sįŗ½ khĆ´ng gį»“m chį»‰ sį»‘ |THM|:
\begin{command}
  \addtheoremline*{Example}{Extra Entry}
\end{command}
\addtheoremline*{Example}{Extra Entry}
{\color{red!75!green}
\begin{Lemma}%[Display with array]
[Biį»u thį»©c trong mįŗ£ng (dĆ£y) phĘ°Ę�ng trĆ¬nh]
%% Lemmata are indented and numbered with greek symbols.
%% Also for displayed arrays of this form, it looks good:
Bį»• Ä‘į» (|Lemma|) Ä‘Ę°į»£c thį»�t Ä‘įŗ§u dĆ²ng vĆ&nbsp; Ä‘Ć�nh chį»‰ sį»‘ vį»›i chį»Æ sį»‘ Hy Lįŗ�p.

\medskip
%% NgoĆ&nbsp;i ra, cĆ�c biį»u thį»©c nhĘ° sau Ä‘Ć¢y trĆ´ng cĆ³ vįŗ» nhĘ° Ć½:
XĆ©t vĆ­ dį»� sau Ä‘Ć¢y, trĆ´ng cĆ³ vįŗ» tį»‘t:
\begin{command}
 \[\begin{array}{l}
      a = \begin{array}[t]{l}
            first\ line \\
            second\ line
         \end{array}%
     \mbox{\color{green}{try to put this text in the lowest line}}
   \end{array}
  \]
\end{command}
%% Just try to get this with the presented array structure ... without
%% using dirty tricks, you can position the outer array either [t], [c],
%% or [b], and you will not get the desired effect.
NhĘ°ng biį»u diį»…n nhĘ° trĆŖn mĆ&nbsp; khĆ´ng sį»­ dį»�ng cĆ�c mįŗ¹o Ä‘įŗ·c biį»‡t nĆ&nbsp;o
(thį»­ Ä‘į» lį»±a chį»¨n cĆ�c vį»‹ trĆ­ |[t]|, |[c]|, |[b]|),
kįŗæt quįŗ£ cĆ³ thį» khĆ´ng nhĘ° Ć½:
\[\begin{array}{l}
   a = \begin{array}[t]{l}
         first\ line \\
         second\ line
       \end{array}%
   \mbox{\color{green}{try to put this text in the lowest line}}
  \end{array}\]
\end{Lemma}}
{\color{green!75!red}
\begin{Lemma}[PhĘ°Ę�ng trĆ¬nh]
%% For |equation|s, we decided to put the endmark after the equation
%% number, which is vertically centered.
%% Currently, we do not know, how to get the equation number centered and
%% the endmark at the bottom (one has to know the internal height of the
%% math material) ... If anyone knows, please inform us.
Vį»›i cĆ�c phĘ°Ę�ng trĆ¬nh cĆ³ Ä‘Ć�nh sį»‘, dįŗ�u kįŗæt thĆŗc sįŗ½ Ä‘Ę°į»£c Ä‘įŗ·t sau chį»‰ sį»‘
phĘ°Ę�ng trĆ¬nh, vĆ&nbsp; Ä‘Ę°į»£c canh giį»Æa theo chiį»u Ä‘į»©ng. Hiį»‡n tįŗ�i, chĘ°a cĆ³ thuįŗ­t
toĆ�n Ä‘į» bį»‘ trĆ­ chį»‰ sį»‘ phĘ°Ę�ng trĆ¬nh canh giį»Æa (theo chiį»u Ä‘į»©ng),
cĆ²n dįŗ�u kįŗæt thĆŗc lįŗ�i Ä‘Ę°į»£c Ä‘įŗ·t vĆ&nbsp;o cuį»‘i phĘ°Ę�ng trĆ¬nh --- viį»‡c nĆ&nbsp;y Ä‘į»¸i hĆ²i
phįŗ£i biįŗæt chiį»u cao cį»§a nį»™i dung phĘ°Ę�ng trĆ¬nh. Nįŗæu ai Ä‘Ć³ biįŗæt,
vui lĆ²ng bĆ�o cho tĆ�c giįŗ£ cį»§a |ntheorem|.
\begin{equation}
 \int_{\gamma} f(z)\, dz := \int_a^b f(\gamma (t)) \gamma'(t) \, dt
\end{equation}
\end{Lemma}}

%% With the |break|-theoremstyles, if the environment is labeled and 
%% written as
Vį»›i kiį»u |break|, nįŗæu sį»­ dį»�ng viį»‡c Ä‘Ć�nh nhĆ£n nhĘ° sau
\begin{command}
  \begin{Lemma}[Breakstyle]\label{breakstyle}
\end{command}
{\color{red!75!green!50!blue}
\begin{Lemma}[Breakstyle]\label{breakstyle}
%% you see, there is a leading space \dots \\
%% If a percent (comment) (or an explicit |\ignorespaces|) is put directly 
%% after the label, e.g.
thĆ¬ nhĘ° bįŗ�n thįŗ�y, xuįŗ�t hiį»‡n cĆ�c khoįŗ£ng trįŗÆng thį»«a \ldots \\
Nįŗæu dįŗ�u phįŗ§n trÄm (chĆŗ thĆ­ch) Ä‘Ę°į»£c Ä‘įŗ·t ngay sau lį»‡nh tįŗ�o nhĆ£n
(hoįŗ·c dĆ¹ng lį»‡nh |\ignorespaces|), vĆ­ dį»�
\begin{command}
  \begin{Lemma}[Breakstyle]\label{breakstyle}% 
\end{command}
%% the space disappears.
thĆ¬ khoįŗ£ng trįŗÆng thį»«a sįŗ½ mįŗ�t.

%% From the predefined styles, this is exactly the case for the break-styles.
%% That's no bug, it's \LaTeX-immanent.
\medskip
Vį»›i cĆ�c kiį»u Ä‘Ć£ Ä‘Ę°į»£c Ä‘į»‹nh nghÄ©a bį»i |ntheorem|, Ä‘iį»u nĆ&nbsp;y chį»‰ xįŗ£y ra
chį»‰ vį»›i kiį»u |break|. ÄĆ¢y khĆ´ng phįŗ£i lĆ&nbsp; lį»—i, mĆ&nbsp; chĆ­nh lĆ&nbsp; cĆ�ch xį»­ lĆ½ cį»§a \LaTeX{}.

\medskip
%% The example goes on with an |eqnarray|:
VĆ­ dį»� vį»›i |eqnarray|:
\begin{eqnarray}
f(z) &amp;=&amp;
   \frac{1}{2\pi i}
   \int \limits_{\partial D} \frac{f(\zeta)}{\zeta-z} d\zeta \\
&amp;= &amp;
   \frac{1}{2\pi}
   \int \limits_0^{2\pi}
      f(z_0 + re^{it}) dt
\end{eqnarray}
\end{Lemma}}

{\color{green}
\begin{Proof}[of nothing]
\begin{eqnarray*}
f(z) &amp;=&amp;
   \frac{1}{2\pi i}
   \int \limits_{\partial D} \frac{f(\zeta)}{\zeta-z} d\zeta \\
&amp;= &amp;
   \frac{1}{2\pi}
   \int \limits_0^{2\pi}
      f(z_0 + re^{it}) dt
\end{eqnarray*}
\end{Proof}}
%% That's it (the end of the Theorem).
Äįŗæn Ä‘Ć¢y lĆ&nbsp; kįŗæt thĆŗc Äį»‹nh lĆ½~\ref{thm:verylong}.
\end{Theorem}
%% \end{thmbox}
}

%% If there are some environments in the same thm-environment,
%% the last gets the endmark:
Nįŗæu cĆ³ nhiį»u mĆ´i trĘ°į»¯ng cĆ¹ng bĆŖn trong mį»™t mĆ´i trĘ°į»¯ng |THM|,
mĆ´i trĘ°į»¯ng cuį»‘i cĆ¹ng mį»›i cĆ³ dįŗ�u kįŗæt thĆŗc
\begin{Definition}[vį»›i danh sĆ�ch]
\begin{equation}
 \int_{\gamma} f(z)\, dz := \int_a^b f(\gamma (t)) \gamma'(t) \, dt
\end{equation}
\begin{itemize}
%% \item you've seen, how it works for text and
%% \item math environments,
%% \item and it works for lists.
\item nhĘ° vįŗ­y, bįŗ�n Ä‘Ć£ thįŗ�y dįŗ�u kįŗæt thĆŗc lĆ&nbsp;m viį»‡c thįŗæ nĆ&nbsp;o vį»›i vÄn bįŗ£n
\item vį»›i biį»u thį»©c toĆ�n
\item vĆ&nbsp; vį»›i danh sĆ�ch.
\end{itemize}
\end{Definition}

\begin{Corollary}[Q.E.D.]
%% And here is a trivial corollary, which is ended by
ÄĆ¢y lĆ&nbsp; hį»‡ quįŗ£ tįŗ§m thĘ°į»¯ng, kįŗæt thĆŗc bį»i
|\qedsymbol{\textrm{q.e.d}}|  vĆ&nbsp; |\qed|.
\qedsymbol{q.e.d}\qed
\end{Corollary}

\begin{Example}
\[ f^{(n)}(z) =
   \frac{n!}{2\pi i} \int \limits _{\partial D}
            \frac{f(\zeta)}{(\zeta-z)^{n+1}} d\zeta \]
%% If there is some text after an environment, the endmark is put
%% after the text.
Nįŗæu cĆ³ vÄn bįŗ£n theo sau mĆ´i trĘ°į»¯ng, dįŗ�u kįŗæt thĆŗc sįŗ½ Ä‘įŗ·t sau vÄn bįŗ£n Ä‘Ć³.
\end{Example}

%% The next one is done by the following sequence. Note, that 
%% |~\hfill~| is inserted to prevent \LaTeX\ from using its nested list 
%% management (a verbatim is also a trivlist),
%% i.e.\ this causes \LaTeX\ to start the |verbatim|-Part in a new line.
\medskip
VĆ­ dį»� tiįŗæp theo Ä‘Ę°į»£c cho bį»i mĆ£ nguį»“n sau Ä‘Ć¢y. ChĆŗ Ć½ rįŗ±ng,
lį»‡nh |~\hfill~| Ä‘Ę°į»£c chĆØn vĆ&nbsp;o Ä‘į» ngÄn cįŗ£n \LaTeX{} quįŗ£n lĆ½ danh sĆ�ch lį»“ng nhau
theo cĆ�ch cį»§a chĆ­nh \LaTeX{} (mĆ´i trĘ°į»¯ng |verbatim| lĆ&nbsp; danh sĆ�ch |\trivlist|).
CĆ³ nghÄ©a lĆ&nbsp;, viį»‡c nĆ&nbsp;y sįŗ½ khiįŗæn \LaTeX{} bįŗÆt Ä‘įŗ§u mĆ´i trĘ°į»¯ng |verbatim|
vį»›i mį»™t dĆ²ng mį»›i.
\begin{command}
  \begin{Example}
  ~\hfill~
  \begin{verbatim}
  And, it also works for verbatim
  ... when the \end{verbatim} is in the
  same line as the text ends. \end{verbatim}
                                ^ this space is important !!
  \end{Example}
\end{command}

\begin{Example}[dĆ¹ng `verbatim']
~\hfill~
\begin{verbatim}
And, it also works for verbatim
... when the end{verbatim} is in the
same line as the text ends. \end{verbatim}
\end{Example}

%% There must be no empty line in the input before the |\end{theorem}|
%% (since then, the end mark is ignored) \\
KhĆ´ng Ä‘Ę°į»£c chį»«a dĆ²ng trįŗÆng trĘ°į»›c |\end{theorem}|, bį»i lĆ&nbsp;m thįŗæ
sįŗ½ bį»¸ qua dįŗ�u kįŗæt thĆŗc.
\begin{command}
  \begin{Theorem}
   some text ... but no end mark
   
  \end{Theorem}
\end{command}

\begin{Theorem}\label{ex-empty-line}
some text ... but no end mark

\end{Theorem}


%% Now, there is a corollary which should appear with a different
%% name in the list of corollaries:
BĆ¢y giį»¯ lĆ&nbsp; hį»‡ quįŗ£ sįŗ½ xuįŗ�t hiį»‡n vį»›i tĆŖn riĆŖng hĘ�i khĆ�c
trong danh sĆ�ch |Corollary|:
\begin{command}
  \begin{Corollary*}[title in text]\label{otherlabel}
  ...
  \end{Corollary*}
  \addtheoremline{Corollary}{title in list}
\end{command}
\begin{Corollary*}[title in text]%
\label{otherlabel}\ignorespaces
\begin{center}
   Thį» hiį»‡n trong \\
   mĆ´i trĘ°į»¯ng \\
   canh giį»Æa.  
\end{center}
\end{Corollary*}
\addtheoremline{Corollary}{title in list}

\begin{Theorem}[trĆ­ch dįŗ«n]
\begin{quote}
%% In quote environments, the text is normally indented from left 
%% and right by the same space. The endmark is not indented from the 
%% right margin, i.e., it is typeset to the right margin of the
%% surrounding text.
Trong mĆ´i trĘ°į»¯ng trĆ­ch dįŗ«n |quote|, nį»™i dung thĘ°į»¯ng Ä‘Ę°į»£c thį»�t vĆ&nbsp;o į» tįŗ�t
cįŗ£ cĆ�c dĆ²ng į» cįŗ£ bĆŖn trĆ�i vĆ&nbsp; bĆŖn phįŗ£i. Tuy nhiĆŖn, dįŗ�u kįŗæt thĆŗc sįŗ½ khĆ´ng
vįŗ«n Ä‘Ę°į»£c Ä‘įŗ·t Ä‘Ćŗng vĆ&nbsp;o lį» bĆŖn phįŗ£i.
\end{quote}
\end{Theorem}

%% Here is an example for turning off the endmark automatics and
%% manual handling:
DĘ°į»›i Ä‘Ć¢y lĆ&nbsp; vĆ­ dį»� vį» viį»‡c tįŗÆt/bįŗ­t viį»‡c Ä‘įŗ·t dįŗ�u kįŗæt thĆŗc tį»± Ä‘į»™ng.

\begin{command}
  \begin{Theorem}[Manual End Mark]\label{somelabel}
  a line of text with a manually set endmark \hfill\TheoremSymbol\\
  some more text, but no automatic endmark set. \NoEndMark
  \end{Theorem}
\end{command}

\begin{Theorem}[Manual End Mark]\label{somelabel}
a line of text with a manually set endmark \hfill\TheoremSymbol \\
some more text, but no automatic endmark set. \NoEndMark
\end{Theorem}

%% Also, one should note, that |\hfill| is inserted to set
%% the endmark at the right margin.
Äį» Ć½ rįŗ±ng, lį»‡nh |\hfill| Ä‘Ę°į»£c chĆØn vĆ&nbsp;o trĘ°į»›c dįŗ�u kįŗæt thĆŗc
Ä‘į» Ä‘įŗ·t dįŗ�u Ä‘Ć³ vĆ&nbsp;o lį» bĆŖn phįŗ£i.

\begin{Example}[nhanh hĘ�n]
%%  It also works for short one's. 
Dįŗ�u kįŗæt thĆŗc Ä‘Ę°į»£c tį»± Ä‘į»™ng Ä‘įŗ·t trį» lįŗ�i...
\end{Example}

%% If you are tired of the greek numbers and the indentation for lemmata ... 
%% you can redefine it:
Nįŗæu bįŗ�n khĆ´ng thĆ­ch dĆ¹ng chį»‰ sį»‘ lĆ&nbsp; chį»Æ sį»‘ Hy Lįŗ�p vĆ&nbsp; cĆ�ch thį»�t Ä‘įŗ§u dĆ²ng cho
|Lemma|, bįŗ�n cĆ³ thį» Ä‘į»‹nh nghÄ©a lįŗ�i:
\theoremstyle{changebreak}
\theoremheaderfont{\normalfont\bfseries}\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\heartsuit}}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\theoremindent0cm
\theoremnumbering{arabic}
\renewtheorem{Lemma}{Lemma}
\begin{command}
  \theoremstyle{changebreak}
  \theoremheaderfont{\normalfont\bfseries}\theorembodyfont{\slshape}
  \theoremsymbol{\ensuremath{\heartsuit}}
  \theoremsymbol{\ensuremath{\diamondsuit}}
  \theoremseparator{:}
  \theoremindent0.5cm
  \theoremnumbering{arabic}
  \renewtheorem{Lemma}{Lemma}
\end{command}
\begin{Lemma}
%%   another lemma, with arabic numbering ... note that the numbering
%%   continues.
	BĆ¢y giį»¯ lĆ&nbsp; bį»• Ä‘į» khĆ�c, vį»›i cĆ�ch Ä‘Ć�nh sį»‘ dĆ¹ng chį»Æ sį»‘ įŗ¢ Rįŗ­p. ChĆŗ Ć½ rįŗ±ng
	chį»‰ sį»‘ vįŗ«n tiįŗæp tį»�c tÄng.
\end{Lemma}

%% the optional argument (i.e.\ the `theorem'-name) can be accessed by
%% |\|\meta{env}|name|. 
Tham sį»‘ bį»• sung xĆ�c Ä‘į»‹nh tĆŖn riĆŖng cį»§a |THM| cĆ³ thį» lįŗ�y Ä‘Ę°į»£c nhį»¯ 
chįŗ³ng hįŗ�n |\Theoremname| hoįŗ·c |Examplename|,\ldots --- Ä‘iį»u nĆ&nbsp;y chį»‰
cĆ³ thį» lĆ&nbsp;m bĆŖn trong mĆ´i trĘ°į»¯ng |THM| hiį»‡n tįŗ�i mĆ&nbsp; thĆ´i.

\begin{command}
  \begin{Theorem}[\color{red}{some name}\normalcolor]
  Obviously, we are in Theorem~\Theoremname.
  \end{Theorem}
\end{command}
\begin{Theorem}[\color{red}{some name}\normalcolor]
Obviously, we are in Theorem~\Theoremname.
\end{Theorem}

%% This feature can e.g.\ be used for automatically generating
%% executable code and a commented solution sheet:
TĆ­nh nÄng cĆ³ thį» dĆ¹ng, chįŗ³ng hįŗ�n Ä‘į» sinh ra tį»± Ä‘į»™ng cĆ�c mĆ£
cho mĆ´i trĘ°į»¯ng chĆŗ thĆ­ch, |verbatim|,\ldots:
\begin{command}
  \begin{exercise}[quicksort]
   `\meta{the exercise text}'
  \begin{verbatimwrite}{solutions/\exercisename.c}
   `\meta{C-code}'
  \end{verbatimwrite}
  \verbatiminput{solutions/\exercisename.c}
  \end{exercise}
\end{command}
%% This will write the C-code to a file |solutions/quicksort.c| and 
%% type it also on the solution sheet.
Äoįŗ�n mĆ£ trĆŖn sįŗ½ viįŗæt mĆ£ \meta{C-code} vĆ&nbsp;o tįŗ­p tin |solutions/quicksort.c|,
vĆ&nbsp; sau Ä‘Ć³ nįŗ�p vĆ&nbsp;o nhį»¯ lį»‡nh |\verbatiminput|.

%% Now, we define an environment |KappaTheorem| which uses the same 
%% style parameters as Theorems and is numbered together with
%% Corollaries (Theorems are also numbered with Corollaries).
%% Note that we define a complex header text and a complex end mark.
\medskip
BĆ¢y giį»¯, ta Ä‘į»‹nh nghÄ©a mĆ´i trĘ°į»¯ng |KappaTheorem| sį»­ dį»�ng cĆ¹ng kiį»u
nhĘ° mĆ´i trĘ°į»¯ng |Theorem|, Ä‘Ę°į»£c Ä‘Ć�nh sį»‘ tiįŗæp theo cĆ�c Hį»‡ quįŗ£ (|Corollary|)
(cĆ�c |Theorem| cÅ©ng Ä‘Ę°į»£c Ä‘Ć�nh sį»‘ theo |Corollary|). Äį» Ć½ rįŗ±ng,
ta sįŗ½ Ä‘Ę°a ra phįŗ§n |header| vĆ&nbsp; phįŗ§n dįŗ�u kįŗæt thĆŗc khĆ� phį»©c tįŗ�p.

\begin{command}
  \theoremclass{Theorem}
  \theoremsymbol{\ensuremath{a\atop b}}
  \newtheorem{KappaTheorem}[Theorem]{\(\kappa\)-Theorem}
\end{command}

\theoremclass{Theorem}
\theoremsymbol{\ensuremath{a\atop b}}
\newtheorem{KappaTheorem}[Theorem]{\(\kappa\)-Theorem}

\begin{KappaTheorem}[1st \(\kappa\)-Theorem]\label{kappatheorem1}
ÄĆ¢y lĆ&nbsp; Ä‘į»‹nh lĆ½ |kappa| Ä‘įŗ§u tiĆŖn. 
\end{KappaTheorem}

% =====================================================================

%% \subsection{Extended Referencing Features}
\subsection{\texorpdfstring{Tham khįŗ£o mį» rį»™ng}{Tham khao mo rong}}%
\label{sec-ExtRef}[Mį»�c]

%% The standard |\label| command is extended by an optional argument
%% which is intended to contain the ``name'' of the structure which
%% is labeled, allowing more comfortable referencing; e.g., this
%% section has been started with
Lį»‡nh |\label| chuįŗ©n Ä‘Ę°į»£c mį» rį»™ng: bĆ¢y giį»¯ nĆ³ cĆ³ thį» nhįŗ­n thĆŖm tham sį»‘
bį»• sung dĆ¹ng Ä‘į» xĆ�c Ä‘į»‹nh tĆŖn cįŗ�u trĆŗc dĆ¹ng Ä‘į» Ä‘Ć�nh nhĆ£n -- nhį»¯ Ä‘Ć³
viį»‡c tham khįŗ£o chĆ©o Ä‘Ę°į»£c linh hoįŗ�t hĘ�n.
VĆ­ dį»�, mį»�c nĆ&nbsp;y Ä‘Ę°į»£c Ä‘Ć�nh nhĆ£n nhĘ° sau:
\begin{command}
  \subsection*{....}%
  \label{sec-ExtRef}[Mu.c]
\end{command}

%% As already stated, for theorem-like environments the optional 
%% argument is filled in automatically, i.e., 
NhĘ° Ä‘Ć£ nĆ³i, vį»›i mĆ´i trĘ°į»¯ng |THM|, phįŗ§n tham sį»‘ bį»• sung cį»§a |\label|
sįŗ½ Ä‘Ę°į»£c tį»± Ä‘į»™ng thĆŖm vĆ&nbsp;o. Do Ä‘Ć³, 
\begin{command}
|\begin{Theorem}[Manual End Mark]\label{somelabel}|
\end{command}
%% (cf.\ page~\pageref{somelabel}) is equivalent to
tĘ°Ę�ng Ä‘Ę°Ę�ng vį»›i (xem \vpageref{somelabel})
\begin{command}
|\begin{Theorem}[Manual End Mark]\label{somelabel}[Theorem]|
\end{command}

%% |\thref{|\meta{label}|}| additionally outputs the contents
%% of the optional argument which has been associated with \meta{label}:
Lį»‡nh |\thref{|\meta{label}|}| sįŗ½ sinh ra thĆ´ng tin bį»• sung, cho biįŗæt
tĆŖn |THM| tĘ°Ę�ng į»©ng vį»›i tham sį»‘ bį»• sung cį»§a |\label|. VĆ­ dį»�:

\begin{command}
  This is \thref{sec-ExtRef}
  ... \thref{somelabel}
  ... \thref{otherlabel}
  ... \thref{kappatheorem1}
\end{command}
sįŗ½ cho ta
%% generates
\begin{quote}
This is \thref{sec-ExtRef}.
  ... \thref{somelabel}
  ... \thref{otherlabel}
  ... \thref{kappatheorem1}
\end{quote}

%% Here one must be careful that the handling of the optional 
%% argument is automated
%% only for environments defined by |\newtheorem|, i.e., \emph{not} 
%% for sectioning, equations, or enumerations. 
Phįŗ£i cįŗ©n thįŗ­n: viį»‡c xį»­ lĆ½ tham sį»‘ bį»• sung
Ä‘Ę°į»£c tiįŗæn hĆ&nbsp;nh tį»± Ä‘į»™ng chį»‰ cho cĆ�c mĆ´i trĘ°į»¯ng Ä‘Ę°į»£c Ä‘į»‹nh nghÄ©a nhį»¯ |\newtheorem|,
nghÄ©a lĆ&nbsp; sįŗ½ khĆ´ng cĆ³ sį»± quįŗ£n lĆ½ cho cĆ�c Mį»�c (|\section|),
phĘ°Ę�ng trĆ¬nh (|equation|) hay danh sĆ�ch (|enumerate|).

%% Calling |\thref{|\meta{label}|}| for a label which has been
%% set without an optional argument can result in different unintended
%% results: If \meta{label} is not inside a theorem-like environment, an
%% error message is obtained, otherwise the type of the surrounding
%% theorem-like environment is output, e.g., calling |\thref{label}| 
%% then results in ``Theorem~\meta{number}''!
Viį»‡c gį»¨i |\thref{|\meta{label}|}| cho cĆ�c nhĆ£n chĘ°a Ä‘Ę°į»£c thiįŗæt lįŗ­p vį»›i
phįŗ§n tham sį»‘ bį»• sung sįŗ½ sinh ra cĆ�c kįŗæt quįŗ£ khĆ³ tĘ°į»ng tĘ°į»£ng: nįŗæu \meta{label}
khĆ´ng į» bĆŖn trong mĆ´i trĘ°į»¯ng |THM|, lį»—i sįŗ½ sinh ra; ngĘ°į»£c lįŗ�i, tĆŖn |THM|
hiį»‡n tįŗ�i sįŗ½ Ä‘Ę°į»£c dĆ¹ng, vĆ­ dį»� viį»‡c gį»¨i |\thref{xxxlabel}|
sįŗ½ sinh ra chįŗ³ng hįŗ�n ``Äį»‹nh lĆ½~\meta{number}''!

\medskip
ChĆŗ Ć½ rįŗ±ng khĆ´ng cĆ³ hį»— trį»£ cho cĆ�c tham khįŗ£o chĆ©o phį»©c, nhĘ° ``xem Äį»‹nh lĆ½~5 vĆ&nbsp;~7''.%
\footnote{This would require plural-forms
for different languages and handling of \texttt{\bslash ref}-lists, probably
splitting into different sublists for different environments. If 
someone is interested in programming this, please contact us;
\color{red}{it seems to be algorithmically easy, but tedious.}}

%% Additionally, currently there is no support for multiple references 
%% such as ``see Theorems~5 and~7'' (this would require plural-forms
%% for different languages and handling of |\ref|-lists, probably
%% splitting into different sublists for different environments)\footnote{If 
%% someone is interested in programming this, please contact us; it 
%% seems to be algorithmically easy, but tedious.}.

%% \subsection{List of Theorems and Friends}
\subsection{\texorpdfstring{Danh sĆ�ch THM}{Danh sach THM}}

%% Note, that we put the following lists into the |quote|-environment
%% to emphazise them from the surrounding text. So the lists
%% are indented slightly at the margin.
%% ChĆŗ Ć½ rįŗ±ng, į» Ä‘Ć¢y cĆ�c danh sĆ�ch Ä‘Ę°į»£c bį»‘ trĆ­ trong cĆ�c mĆ´i trĘ°į»¯ng Ä‘įŗ·c biį»‡t
%% Ä‘į» nhįŗ�n mįŗ�nh kįŗæt quįŗ£, cĆ²n thį»±c tįŗæ, chĆŗng sįŗ½ Ä‘Ę°į»£c thį» hiį»‡n vį»›i lį» trĆ�i
%% khĆ�c į» Ä‘Ć¢y mį»™t chĆŗt!.

%% With 
\medskip
Vį»›i
\begin{command}
  \addtotheoremfile{Added into all theorem lists}
\end{command}
%% in every list, an additional line of text would be inserted.
%% But it isn't actually done in this documentation since we want
%% to use different list formats.
thĆ¬ į» mį»¨i danh sĆ�ch, dĆ²ng ``|Added into all theorem lists|''
sįŗ½ Ä‘Ę°į»£c chĆØn vĆ&nbsp;o. Tuy nhiĆŖn, trong tĆ&nbsp;i liį»‡u nĆ&nbsp;y, ta khĆ´ng lĆ&nbsp;m nhĘ° thįŗæ,
vĆ¬ ta dĆ¹ng Ä‘į»‹nh dįŗ�ng khĆ�c cį»§a danh dĆ�ch |THM|.

%% Only for the list of Examples, this one is added: 
\medskip Äį» chĆØn chį»‰ danh sĆ�ch cĆ�c vĆ­ dį»� (|Example|), cĆ³ thį» lĆ&nbsp;m chįŗ³ng hįŗ�n
\begin{command}
  \addtotheoremfile[Example]{%
    \color{blue}{Only concerning Example lists}}
\end{command}
\addtotheoremfile[Example]{\color{blue}{Only concerning Example lists}}

%% With
\medskip
Vį»›i
\begin{command}
  \theoremlisttype{all}
  \listtheorems{Lemma} 
\end{command}
%% all lemmas are listed:
mį»¨i bį»• Ä‘į» sįŗ½ Ä‘Ę°į»£c liį»‡t kĆŖ

\bigskip
{\color{red!75!green!50!blue}
 \theoremlisttype{all}
 \listtheorems{Lemma}}
\bigskip

%% From the examples, only those are listed which have an optional name: 
NhĘ° ta thįŗ�y trong kįŗæt quįŗ£ trĆŖn, xuįŗ�t hiį»‡n dĆ²ng chį»‰ toĆ&nbsp;n dįŗ�u chįŗ�m.
Ta sį»­ dį»�ng kiį»u danh sĆ�ch |opt| Ä‘į» liį»‡t kĆŖ chį»‰ cĆ�c bį»• Ä‘į» cĆ³ tĆŖn riĆŖng:
\begin{command}
  \theoremlisttype{opt}
 \listtheorems{Example}
\end{command}
%% leads to
cho ta kįŗæt quįŗ£

\bigskip
{\color{red!75!green!50!blue}
 \theoremlisttype{opt}
 \listtheorems{Example}
}

\bigskip
%% One should note the line \emph{Only concerning example lists}, which
%% was added by the |\addtotheoremfile|-statement above.
NhĘ° ta thįŗ�y, dĆ²ng chį»Æ ``\color{blue}{Only concerning Example lists}\normalcolor''
xuįŗ�t hiį»‡n į» cuį»‘i danh sĆ�ch --- ta Ä‘Ć£ thĆŖm dĆ²ng nĆ&nbsp;y nhį»¯ |\addtotheoremfile|
į» vĆ­ dį»� trĆŖn.

\medskip
%% For the next list, another layout, using the |tabular|-environment, 
%% is defined:
BĆ¢y giį»¯ ta Ä‘į»‹nh nghÄ©a kiį»u danh sĆ�ch mį»›i, sį»­ dį»�ng mĆ´i trĘ°į»¯ng |tabular|:
\begin{command}
  \newtheoremlisttype{tab}%
   {\begin{tabular*}{\linewidth}%
    {@{}lrl@{\extracolsep{\fill}}r@{}}}%
    {##1&amp;##2&amp;##3&amp;##4\\}%
   {\end{tabular*}}
\end{command}
%% Thus, by saying
Sį»­ dį»�ng kiį»u mį»›i |tab| nhĘ° sau:
\begin{command}
  \theoremlisttype{tab}
  \listtheorems{Theorem,Lemma}
\end{command}
%% theorems and lemmata are listed:
CĆ�c Ä‘į»‹nh lĆ½ vĆ&nbsp; bį»• Ä‘į» sįŗ½ Ä‘Ę°į»£c liį»‡t kĆŖ theo kiį»u mį»›i:

\bigskip
{\color{red!75!green!50!blue}
%% \begin{quote}
  \DeleteShortVerb{\|}
    \newtheoremlisttype{tab}%
    {\begin{tabular*}{\linewidth}{@{}lrl@{\extracolsep{\fill}}r@{}}}%
    {##1&amp;##2&amp;##3&amp;##4\\}%
    {\end{tabular*}}
   \theoremlisttype{tab}
   \listtheorems{Theorem,Lemma}
  \MakeShortVerb{\|}%
%% \end{quote}%
}

\vskip-12pt

%% \LaTeX-lists can also be used to format the theoremlist.
%% The input
CÅ©ng cĆ³ thį» sį»­ dį»�ng mĆ´i trĘ°į»¯ng tįŗ�o danh sĆ�ch cį»§a \LaTeX{}
Ä‘į» tįŗ�o kiį»u mį»›i nhĘ° sau Ä‘Ć¢y:
\begin{command}
  \newtheoremlisttype{list}%
    {\begin{trivlist}\item}
    {\item[##2 ##1:]\ ##3\dotfill ##4}%
    {\end{trivlist}}
  \theoremlisttype{list}
  \listtheorems{Corollary}
\end{command}
%% leads to%
Kįŗæt quįŗ£ vį»›i kiį»u mį»›i bĆ¢y giį»¯ lĆ&nbsp;

{\color{red!75!green!50!blue}
%% \begin{quote}%
\DeleteShortVerb{\|}%
  \newtheoremlisttype{list}%
    {\begin{trivlist}\item}%
    {\item[##2 ##1:]\ ##3\dotfill ##4}%
    {\end{trivlist}}%
  \theoremlisttype{list}
  \listtheorems{Lemma}%
  \MakeShortVerb{\|}%
%% \end{quote}%
}

%% In this example, after the item, \verb*!\ ! is used instead of 
%% \verb*! !, because in the latter case, |\dotfill| will produce an 
%% error if the optional argument (|##3|) 
%% is missing.
Trong vĆ­ dį»� nĆ&nbsp;y, sau mį»—i phįŗ§n tį»­ |\item| cį»§a danh sĆ�ch,
lį»‡nh \verb*#\ # Ä‘Ę°į»£c dĆ¹ng thay cho \verb*# #, vĆ¬ trong trĘ°į»¯ng hį»£p sau,
lį»‡nh |\dotfill| sįŗ½ bĆ�o lį»—i nįŗæu phįŗ§n tham sį»‘ bį»• sung |##3| khĆ´ng cĆ³.	

\endinput
</pre></body></html>