Thứ Hai, 11 tháng 8, 2025

Khai báo cho một Beamer chuẩn và đầy đủ


%!TEX TS-program = lualatex 
\documentclass[14pt,aspectratio=169]{beamer}
\usetheme{Warsaw}
\useinnertheme[shadow=true]{rounded}
\useoutertheme{infolines}
\setbeamercolor{frametitle}{fg=blue,bg=orange}
\setbeamercolor{block title}{fg=black,bg=gray}
\setbeamercolor{block body}{fg=black,bg=white}
\setbeamertemplate{frametitle}
{
\nointerlineskip
\begin{beamercolorbox}[sep=0.3cm,ht=1em,wd=\paperwidth]
{frametitle}
\vbox{}\vskip-2ex%
\strut\insertframetitle\strut
\vskip-0.8ex%
\end{beamercolorbox}
}


\usepackage{unicode-math}
\setsansfont{Arial}
\setmathfont[Extension =.otf,BoldFont = XITSMath-Bold]
				{XITSMath-Regular}
\everymath{\bf}
\usepackage{media9} % Gói hỗ trợ chèn video
\usepackage{tikz}
\usetikzlibrary{arrows, shapes.geometric,shapes.symbols,
							shadows}    
\usepackage[outline]{contour}
\usepackage{esvect} 
\usepackage{epsdice} 
\usepackage{fontawesome} 
\usepackage[most]{tcolorbox} 
\usepackage{fontspec}
\usepackage{esvect}
\usepackage{pifont}
\usepackage{comment} 
\usepackage{bbding} 
\usepackage{qrcode}
\usepackage{letltxmacro}
\usepackage{array}
\usepackage{systeme} 

\usepackage{longfbox} 
\fboxset{
	background-color=magenta!50,
	border-color=blue
}

\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\newcolumntype{C}[1]{>{\PreserveBackslash\centering}p{#1}}
\newcolumntype{R}[1]{>{\PreserveBackslash\raggedleft}p{#1}}
\newcolumntype{L}[1]{>{\PreserveBackslash\raggedright}p{#1}}

\def\today{Ngày \number\day\space tháng \number\month\space
			năm \number\year}
\hypersetup{pdfpagemode=FullScreen}
\graphicspath{{./graphics/}}
\newcommand{\lienket}[2]{\hyperlink{#1}{\beamergotobutton{#2}}}
\newcommand{\lienkettoi}[3]{\hyperlink{#1}<#2>{\beamergotobutton{#3}}}
\newcommand{\mbb}[2]{$\symbf{\color{#2}#1}$}
\newcommand{\mb}[1]{$\symbf{#1}$}
\newcommand{\Cot}[3]{\begin{columns}\column{#1\textwidth}
		\begin{block}
        {\begin{center} 
        {\scriptsize\textbf{\color{yellow}#2}}
        \end{center}}{ #3}
        \end{block}\end{columns}}		
\newcommand{\hopmau}[3]{\begin{tcolorbox}[width=#1\textwidth,
	colback=white,colframe=gray,title=\begin{center}
		\textbf{\color{blue}{\scriptsize #2}}\end{center}]#3
        \end{tcolorbox}}		
\newcommand{\Cok}[2]{\begin{columns}\column{#1\textwidth}
			\begin{block}{}{#2}\end{block}\end{columns}}		
\newcommand{\haicot}[2]{\begin{columns}\column{.45\textwidth}
\begin{block}{}{\footnotesize #1}\end{block}
 \column{.5\textwidth}
 \begin{block}{}{\footnotesize #2}\end{block}\end{columns}}
\newcommand{\Haicot}[6]{\begin{columns}\column{#1\textwidth}
\begin{block}{\begin{center}{\scriptsize \textbf{\color{yellow}#3}}
		\end{center}}{\footnotesize #4}\end{block}
	\column{#2\textwidth}\begin{block}{\begin{center}
				{\scriptsize \textbf{\color{yellow}#5}}
		\end{center}}{\footnotesize #6}\end{block}\end{columns}}
\newcommand{\mucluc}[1]{
	\begin{columns}
		\column{.4\textwidth}
		\begin{block}{\begin{center}
		{\scriptsize \textbf{\color{yellow}Mục lục}}
			\end{center}}{\footnotesize #1}\end{block}
	\end{columns}}			
		
\newcommand{\motdong}[4]{\begin{tabbing}\hspace{.05\textwidth }\=
\hspace{.25\textwidth }\=
\hspace{.25\textwidth }\=
\hspace{.25\textwidth }\=\kill \> 
{\textbf{A.}} $\bf  #1$. \>  
{\textbf{B.}} $ \bf #2$. \>  
{\textbf{C.}} $\bf #3$. \> 
{\textbf{D.}} $\bf #4$.\end{tabbing}\vspace*{-.5cm} }

\newcommand{\haidong}[4]{\vspace*{-.25cm} 

\begin{tabbing}\hspace{.05\textwidth }\=\hspace{.475\textwidth }\=
\kill\> {\textbf{A.}} \mbb{#1}. \>  {\textbf{B.}} \mbb{#2}. \\ 
	\> {\textbf{C.}} \mbb{#3}. \> 
    {\textbf{D.}} \mbb{#4}.\end{tabbing} \vspace*{-.5cm} }
	
	
\def\dis{\displaystyle} 
\def\p{\pause\ }
\newcommand{\haihop}[2]{\parbox{.45\textwidth}{#1}
		\hspace*{.1\textwidth}\parbox{.45\textwidth}{#2}}
\newcommand{\Haihop}[4]{\parbox{#1\textwidth}{#3}\ 
		\parbox{#2\textwidth}{#4}}	
\newcounter{vidu}
\newcommand{\vidu}{\nutlom{Câu \thevidu}\quad }
\usecolortheme{spruce}

\newcommand{\tieude}[3] %tieudechinh, tieudephu,tieudeduoi
{\vspace*{.5cm}
\title[\color{blue}{\tiny \textbf{#3} }]{\color{red}{
		\textbf{\MakeUppercase{#1}}}}  
\subtitle{\color{blue}\textbf{\MakeUppercase{#2}}}
\author[\nutloi{\hspace*{-.25cm}\digiclock}]{\small }
\institute[]{}
\logo{
	\includegraphics[scale=.25]{bitex_logo_1.png}
}
\date[\lienket{mucluc}{\textbf{Mục lục}}\ \lienket{start}{
		\textbf{Trang tiêu đề}}]
{{\color{magenta}{\footnotesize  \today}}}
}

\LetLtxMacro{\oldsubsection}{\subsection}
\renewcommand{\subsection}[1]{\oldsubsection{
\color{blue}{\scriptsize #1}
}
}

\LetLtxMacro{\oldsection}{\section}
\renewcommand{\section}[1]{\oldsection{
\color{yellow}{\scriptsize #1}
}}

\newcommand{\nut}[3]{
\tikzpicture[
button/.style={text=white,draw=#3!50!black,
preaction={drop shadow={shadow scale=1.05,
shadow xshift=0pt,shadow yshift=-1pt}},
top color=#3!10,bottom color=#3!50!black,
inner xsep=1.3ex,inner ysep=1.3ex,
},
plastic/.style={button=#3,shape=rectangle,
rounded corners=1.6ex},
oval/.style={button=#3,shape=rectangle,
rounded corners=1.6ex,ball color=#3},
smooth/.style={button=#3,shape=rectangle,
rounded corners=1.6ex,
top color=#3!50!black,shading angle=45,
bottom color=#3!10}
]
\draw (0,0)
\foreach \shape in {#2} {
node[\shape=\color] {\textbf{\large #1} }
};
\endtikzpicture}

\newcommand{\nuttron}[2]{
\begin{tikzpicture}[button/.style 2 args={
circle, 
minimum size=1.5cm,
top color=#1!30!white,
bottom color=#1,
draw=#1!90!black,
thick,
append after command={
	node[circle,draw=#1!90!white,
	minimum size=1.36cm,
	font=\sffamily]at(\tikzlastnode.center)
	{\textcolor{white}{\contour{#1}{#2}}}
},
general shadow={
	shadow xshift=.2ex, shadow yshift=-.2ex,
	opacity=.5, fill=black!50,
}
}]
\node[button={\buttoncolor}] 
at (0, 0){};


\end{tikzpicture}
}

\newcommand{\nutlom}[1]{\raisebox{-1ex}{
			\nut{\scriptsize #1}{smooth}{red}}}
\newcommand{\nutloi}[1]{\raisebox{-1ex}{
		\nut{\scriptsize #1}{plastic}{blue}}}


\setbeamertemplate{frametitle}{%
\nointerlineskip%
\begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=0.6ex]{frametitle}
\hspace*{1ex}\insertframetitle%
\end{beamercolorbox}%
}
\setbeamercolor*{item}{fg=blue,bg=red}
\definecolor{beaublue}{rgb}{0.74, 0.83, 0.9}
\setbeamercolor{frametitle}{bg=beaublue}

\newcommand{\loigiai}{\vspace*{-.5cm}\begin{center}
		\nutloi{\textbf{Lời giải}}\end{center}  
        \p\vspace*{-.25cm}}
\newcommand{\qrcod}{{\setsansfont[Scale=1.5]{CASIO ClassWiz CW01}
				q[}(QR)\ }

\newcommand{\stt}[1]{\item[\footnotesize\color{blue} \ding{#1}]}%182

\def\p{\pause\ }
\def\vs{\vspace*{-.5cm}}  

\newcommand{\btg}[1]{{\setsansfont[Scale=1.5]{CASIO ClassWiz CW01}
							#1}}
\newcommand{\png}[1]{\raisebox{-1ex}{\includegraphics
		[height=.1\textheight]{#1}}}
\newcommand{\PNG}[3]{\raisebox{#3ex}{\includegraphics
		[height=#2\textheight]{#1}}}
\newcommand{\ppt}[6]{\usebackgroundtemplate{
\includegraphics[width=1.25\textwidth]{TRANG}}
\begin{frame}<1->[label=#2]\transwipe[direction=0]   
   \frametitle{} 
	{\begin{flushright}\lienket{#1}{{\scriptsize 
    \faStepBackward}} \ \ 
        \lienket{#3}{{\scriptsize \faStepForward}}  \\ 
        \vspace*{-.25cm}
				\end{flushright}}
	\begin{columns}\column{1.046\textwidth}\begin{block} 
    {\color{yellow}{\scriptsize \textbf{#4}}}	
    {\footnotesize #5} \\
		\end{block}\end{columns}\bigskip
		
		\color{black}\footnotesize #6\pause 
		\vspace*{\textheight}
		\end{frame} 
}
\newcommand{\ptt}[4]{\usebackgroundtemplate{
\includegraphics[width=1.25\textwidth]{TRANG}}
	\begin{frame}<1->[label=#2]\transwipe[direction=0]    
		\frametitle{}
		
{\begin{flushright}\lienket{#1}{{\scriptsize 
\faStepBackward}} \ \ 
		\lienket{#3}{{\scriptsize \faStepForward}}  \\ 				
 \end{flushright}}\bigskip
		
		{\footnotesize #4} 
		\vspace*{\textheight}
   \end{frame}
}
 

\input{bodemslide}
\input{dongho}
 

\newcommand{\wh}[1]{\includegraphics[scale=.8]{widehat.pdf}
				\hspace*{-.9cm}#1 }
\newcommand{\sopi}{\includegraphics[scale=1.4]{pi}}
\newcommand{\lh}[1]{\overline{#1}}
\newcommand{\vid}[1]{
 \includemedia[
        width=.275\textwidth,
        height=1.1\textheight,
        activate=onclick,  %pageopen, 
        passcontext,
        transparent,
        addresource=#1.mp4,
        flashvars={
            source=#1.mp4
        }
    ]{\includegraphics[width=.3\textwidth]{img1}}{VPlayer.swf}
    }
         
 

Không có nhận xét nào:

Đăng nhận xét