%% taken from `pdpream.ble' generated from `powerdot.dtx'.
\usepackage{url}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{pst-char}
\usepackage{listings}
\usepackage{array}
\usepackage{xkeyval}

\newbox\yaktmpbox

\newenvironment{thmbox}{%
	\setbox\yaktmpbox=%
	\hbox\bgroup%
	\kern-\leftmargin %
	\kern-6.45pt % value found by try-and-error. What is the exact one?
	\vbox\bgroup%
	\kern-6pt
	\ignorespaces%
}{%
	\kern-8pt
	\egroup%
	\egroup%
	\fcolorbox{black}{yellow!20}{\box\yaktmpbox}%
	\ignorespacesafterend%
}

\lstnewenvironment{command}{%
  \lstset{columns=flexible,frame=single,backgroundcolor=\ifprint\color{white}\else\color{blue!20}\fi,%
    xleftmargin=\fboxsep,xrightmargin=\fboxsep,escapeinside=`',gobble=1}\ttfamily\color{black}}{}
\lstnewenvironment{example}[1][]{%
  \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,%
    backgroundcolor=\ifprint\color{white}\else\color{yellow!20}\fi,xleftmargin=\fboxsep,%
    xrightmargin=\fboxsep,gobble=1,%
    }\lstset{#1}\color{black}}{}
\def\option#1{%
	\ifprint
		\fcolorbox{black}{white}{\texttt{#1}}\vspace*{.2cm}%
	\else
		\fcolorbox{black}{red!20}{\texttt{#1}}\vspace*{.2cm}%
	\fi%
}
\def\exmacro#1{
	\ifprint
		\fcolorbox{black}{white}{\texttt{\bslash#1}}\vspace*{.2cm}%
	\else
		\fcolorbox{black}{blue!20}{\texttt{\bslash#1}}\vspace*{.2cm}%
	\fi%
}
\def\macro#1{
	\ifprint
		\fcolorbox{black}{white}{\texttt{\bslash#1}}\vspace*{.2cm}%
	\else
		\fcolorbox{black}{red!20}{\texttt{\bslash#1}}\vspace*{.2cm}%
	\fi%
}
\def\mktitledecor{%
  \rput[tl]{90}(-5.5,-25.51){%
    \psline[linewidth=1pt](0,1.5)(\paperheight,1.5)%
    \rput[lB](.075\paperheight,.5){\pscharpath[linecolor=blue!50,%
      fillcolor=yellow!20,fillstyle=solid,linewidth=.5pt]%
      {\Huge\bfseries\sffamily VietTUG, \url{http://viettug.org/}}%
    }%
    %\rput[rB](.925\paperheight,.5){\pscharpath[linecolor=blue!50,%
    %  fillcolor=yellow!20,fillstyle=solid,linewidth=.5pt]%
    %  {\Huge\bfseries Documentation}%
    %}%
    \psline[linewidth=1pt](0,0)(\paperheight,0)%
  }%
}
\makeatletter
\def\tableofcontents{\@starttoc{toc}}
\renewenvironment{theglossary}{%
  \section*{Version history}%
  \GlossaryParms \let\item\@idxitem \ignorespaces
}{}%
\def\DescribeMacros{\leavevmode\@bsphack
  \begingroup\MakePrivateLetters\Describe@Macros}
\def\Describe@Macros#1{\endgroup\strut
  \marginpar{\raggedleft
  \def\@tempa{#1}\count@\z@
  \XKV@for@o\@tempa\@tempa{%
    \ifnum\count@>\z@\\\fi\advance\count@\@ne
    \MacroFont\expandafter\string\@tempa
    \expandafter\SpecialUsageIndex\expandafter{\@tempa}%
  }}%
  \@esphack\ignorespaces
}
\def\DescribeOption#1{\leavevmode\@bsphack
              \marginpar{\raggedleft\PrintDescribeOption{#1}}%
              \SpecialOptionIndex{#1}\@esphack\ignorespaces}
\def\PrintDescribeOption#1{\MacroFont #1\ }
\def\SpecialOptionIndex#1{\@bsphack
    \index{#1\actualchar{\protect\ttfamily#1}
           (option)\encapchar usage}\@esphack}
\def\DescribeOptions#1{\leavevmode\@bsphack
  \marginpar{\raggedleft%\strut\emph{options}%
  \@for\@tempa:=#1\do{%
    \strut\MacroFont\@tempa\\\SpecialOptionIndex\@tempa
  }}\@esphack\ignorespaces}
\def\SpecialEnvIndex#1{\@bsphack
    \index{#1\actualchar{\protect\ttfamily#1}
           (environment)\encapchar usage}\@esphack}
\def\changes@#1#2#3{%
  \protected@edef\@tempa{%
    \noexpand\glossary{\textbf{#1}\hfill\emph{(#2)}%
    \levelchar
    \ifx\saved@macroname\@empty
      \space\actualchar\generalname
    \else
      \expandafter\@gobble\saved@macroname
      \actualchar\string\verb\quotechar*%
      \verbatimchar\saved@macroname\verbatimchar
    \fi
    :\levelchar #3}%
  }%
  \@tempa\endgroup\@esphack
}
\makeatother
\def\PrintChangesX{%
  \begingroup
    \let\efill\relax
    \PrintChanges
  \endgroup
}
\def\PrintIndexX{%
  \begingroup
    \setcounter{IndexColumns}{2}
    \setlength{\columnsep}{18pt}%
    \setlength{\columnseprule}{.4pt}%
    \PrintIndex
  \endgroup
}
\def\larg#1{{\ttfamily\char`\<}\meta{#1}{\ttfamily\char`\>}}
\let\pf\textsf
\newcolumntype{d}{c|l}
\newcolumntype{e}{c|c|c|c}
\RecordChanges
\CodelineIndex
\newcounter{FAQ}
\def\question{%
  \stepcounter{FAQ}%
  \parskip4pt plus 2pt minus 1pt
  \itemsep4pt plus 2pt minus 1pt
  \parsep4pt plus 2pt minus 1pt
  \item[\textbf{Q\arabic{FAQ}}]%
}
\def\answer{%
  \parskip0pt
  \itemsep0pt
  \parsep0pt
  \item[\ding{42}]%[\textbf{A\arabic{FAQ}}]%
}
\AtBeginDocument{
\def\reftextfaceafter {%
{\ohorn} trang \reftextvario{\dj\'\ocircumflex{}i di\d{\ecircumflex}n}{k\'\ecircumflex{} ti\'\ecircumflex{}p}}%
\def\reftextfacebefore{%
{\ohorn} trang \reftextvario{\dj{}\'\ocircumflex{}i di\d{\ecircumflex}n}{k\'\ecircumflex{} tr\uhorn\'\ohorn{}c}}%
\def\reftextafter{trang \reftextvario{li\`\ecircumflex{}n sau}{sau}}%
\def\reftextbefore{trang \reftextvario{li\`\ecircumflex{}n tr\uhorn\'\ohorn{}c}{tr\uhorn\'\ohorn{}c}}%
\def\reftextcurrent{trang \reftextvario{n\`ay}{hi\d{\ecircumflex}n t\d{a}i}}%
\def\reftextfaraway#1{trang~\pageref{#1}}%
\def\reftextpagerange#1#2{c\'ac trang \pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \dj\'\ecircumflex{}n \ref{#2}}%
}
\makeatletter
%<code>sty
\def\index@prologue{%
\section*{Index}%
\addcontentsline{toc}{section}{Index}
\markboth{Index}{Index}%
}
\makeatother

\endinput
%%
%% End of file `pdpream.ble'.
