Ngắm vẻ đẹp tuyệt vời của đề thi HSG Toán soạn bằng Latex

Sau đây là một vài đề thi HSG Toán soạn bằng Latex, các bạn hãy xem và cảm nhận vẻ đẹp của các đề thi này nào

De_In

Nếu bạn thấy thích rồi thì còn chần chừ gì nữa bật máy tính lên và cài đặt latex ngay nào.

Đây là mã nguồn để sau khi cài đặt xong bạn có thể chép về tham khảo.



















































































































































	



	

















































































	
















	
	






















































































\documentclass[12pt,twoside,a4paper] 


{book}
\usepackage{scrextend} %Tăng cỡ chữ
\changefontsizes{13pt}%Cỡ chữ mới là 13pt
\usepackage[top=2cm,bottom=2.15cm,left=2cm,right=2cm,includefoot=false,includehead=false] 

{geometry}
\usepackage{tikz}
\usepackage[hidelinks,unicode] 




{hyperref}
\usetikzlibrary{arrows,calc,intersections,angles,snakes,quotes,positioning,backgrounds,shapes.geometric}
%%%%%%%%%%%%%% Tạo header, footer và watermark
\makeatletter
\renewcommand{\@oddhead}{
\tikz[remember picture,overlay] 
{
\fill[cyan!80!blue,opacity=0.2]  (current page.north west) rectangle  ([shift={(2cm,-1.8cm)}] 
current page.north east);
\fill[cyan!80!blue,opacity=0.3]  (current page.north east) -- +(-0.35*\textwidth,0)--([turn] 45:2.55cm)--([shift={(2cm,-1.8cm)}] 
current page.north east)--cycle;
\fill[cyan!80!blue,opacity=0.35]  (current page.north east) -- +(-0.25*\textwidth,0)--([turn] 45:2.55cm)--([shift={(2cm,-1.8cm)}] 
current page.north east)--cycle;
\node[text=violet,anchor=west]  at ([shift={(2cm,-1cm)}] 


current page.north west) 
{\href{https://www.facebook.com/groups/ToanTieuHocTHCSTHPTVietNam}
{\scshape Đề thi HSG khối 9 năm học 2020 - 2021}};
\node[text=white,anchor=east]  at ([shift={(-2cm,-1cm)}] 
current page.north east) {\href{https://www.facebook.com/groups/ToanTieuHocTHCSTHPTVietNam}{
{\tikz[baseline=(char.base)] {\node[shape=circle,draw=white,inner sep=1pt,minimum size =24pt] 


 (char) {\fontfamily{anttlc}\selectfont\bfseries\thepage};}}}};
}}

\renewcommand{\@oddfoot}{\begin{tikzpicture}[remember picture,overlay] 

    \fill[cyan!80!blue,opacity=0.2]  (current page.south west) rectangle  ([shift={(0,1.8cm)}] 
current page.south east);
    \fill[cyan!80!blue,opacity=0.3]  (current page.south west) -- +(0.35*\textwidth,0)--([turn] 45:2.55cm)--([shift={(0,1.8cm)}] 
current page.south west)--cycle;
    \fill[cyan!80!blue,opacity=0.35]  (current page.south west) -- +(0.25*\textwidth,0)--([turn] 45:2.55cm)--([shift={(0,1.8cm)}] 
current page.south west)--cycle;
    \node[text=white,anchor=west]  at ([shift={(1.75cm,0.85cm)}] 
current page.south west) {\href{https://www.facebook.com/groups/ToanTieuHocTHCSTHPTVietNam}{\bfseries\scshape Tổ học sinh giỏi}};   
    \path (current page.south west)--(current page.north west) node[midway,sloped,gray!50,below=.5cm] 




{\fontsize{15pt}{14pt}\fontfamily{qag}\selectfont \faFacebookSquare~|~Tiểu Học - THCS - THPT Việt Nam};
     \end{tikzpicture}
     }
     
\renewcommand{\@evenhead}{
\tikz[remember picture,overlay] 
{
\fill[cyan!80!blue,opacity=0.2]  (current page.north west) rectangle  ([shift={(2cm,-1.8cm)}] 
current page.north east);
\fill[cyan!80!blue,opacity=0.3]  (current page.north west) -- +(0.35*\textwidth,0)--([turn] -45:2.55cm)--([shift={(0,-1.8cm)}] 
current page.north west)--cycle;
\fill[cyan!80!blue,opacity=0.4]  (current page.north west) -- +(0.25*\textwidth,0)--([turn] -45:2.55cm)--([shift={(0,-1.8cm)}] 
current page.north west)--cycle;
\node[text=violet,anchor=east]  at ([shift={(-2cm,-1cm)}] 
current page.north east) {\href{https://www.facebook.com/groups/ToanTieuHocTHCSTHPTVietNam}{\faCubes~|~Tổ học sinh giỏi}};
\node[text=white,anchor=east]  at ([shift={(2cm,-1cm)}] 
current page.north west) {\href{https://www.facebook.com/groups/ToanTieuHocTHCSTHPTVietNam}{
{\tikz[baseline=(char.base)] {\node[shape=circle,draw=white,inner sep=1pt,minimum size =24pt] 


 (char) {\fontfamily{anttlc}\selectfont\bfseries\thepage};}}}};
}}

\renewcommand{\@evenfoot}{\begin{tikzpicture}[remember picture,overlay] 

    \path (current page.north east)--(current page.south east) node[midway,sloped,gray!50,below=.5cm] 
{\fontsize{15pt}{14pt}\fontfamily{qag}\selectfont \faFacebookSquare~|~Tiểu Học - THCS - THPT Việt Nam};
        \fill[cyan!80!blue,opacity=0.2]  (current page.south west) rectangle  ([shift={(0,1.8cm)}] 
current page.south east);
        \fill[cyan!80!blue,opacity=0.3]  (current page.south east) -- +(-0.35*\textwidth,0)--([turn] -45:2.55cm)--([shift={(0,1.8cm)}] 
current page.south east)--cycle;
        \fill[cyan!80!blue,opacity=0.4]  (current page.south east) -- +(-0.25*\textwidth,0)--([turn] -45:2.55cm)--([shift={(0,1.8cm)}] 
current page.south east)--cycle;
        \node[text=violet,anchor=west]  at ([shift={(1.75cm,0.85cm)}] 










current page.south west) {\href{[email protected]}
        {\faPaperPlaneO\,\faEnvelopeO\;\scshape Mong nhận được góp ý!}};   
    \end{tikzpicture}}
\makeatother
%%%%%%%%%%%%%%
\usepackage{fontawesome}
\usepackage{oplotsymbl}
\usepackage{pifont}
\usepackage{amsmath,dsfont}
\let\widering\relax 
\usepackage{fouriernc}
\usepackage[utf8] 



{vietnam}
\usepackage{multido}
\linespread{1.2}
\usepackage{enumitem}
\setlist[enumerate] 





{wide=0cm,itemsep=2pt,leftmargin=0cm}
\newlength{\lengthtab}
\newlength{\lengthindent}
\setlength{\lengthtab}{6.5mm}
\setlength{\lengthindent}{7mm}
\newenvironment{cauhoi}{\begin{enumerate}
    [label={\alph*)},wide=\lengthtab,leftmargin=\dimexpr \lengthtab+\lengthindent \relax,topsep=-3pt,itemsep=0pt] 













}
{\end{enumerate}
}
\usepackage{tasks}
\settasks{
  item-indent =\dimexpr \lengthtab+\parindent, 
  before-skip = -1.5pt , % undo paragraph skip
  after-skip =-2pt , % undo paragraph skip
  after-item-skip =-2pt% undo paragraph skip
}
\AtBeginEnvironment{tasks}
    {\mbox{}\vspace*{\dimexpr -\baselineskip+3mm}}
%%%============================================%%%
\usepackage{xcolor}
\usepackage[most,many] 

{tcolorbox} 

\newcommand\circled[1] {\tikz[baseline=(char.base)] {\node
[shape=circle,draw,inner sep=1pt,xanhchuan,fill=xanhchuan!10,
minimum size =16pt,font=\fontsize{12}{12}\selectfont] 

 (char){#1};}}

\newcommand\diamondnumh[1] {\tikz[baseline=(char.base)] 

    \node[draw,double,diamond,draw,inner sep=1pt,teal,fill=cyan!10,text width=9pt,align=center,font=\fontsize{12}{12}\selectfont\bfseries] 


 (char){#1};}
    
\definecolor{xanhh}{RGB}{10,123,129}
\newtcolorbox{GC}[2] [] 

















{enhanced,breakable,
    before skip=1mm,after skip=1mm,
    left=1mm,right=1mm,top=1mm,bottom=1mm,
    colback=xanhh!5,boxrule=1.5pt,
    leftrule=3mm,
    coltitle=magenta,
    colframe=xanhh,
    sharp corners,
    attach title to upper=\;,
    title = {\hspace*{5pt}\bfseries\scshape \faCubes \; #2},
    #1}
\usepackage{pgfornament}
\usepackage{lettrine}
\usepackage{setspace}
\usepackage{Zallman}
%\usepackage{Konanur}
%\font\yinith=Zallman at 30pt
%\font\yinit=royal at 15pt
\newcounter{scau}[section] 




\newcommand{\caut}{\refstepcounter{scau}\noindent{\large\bfseries\zall B}{\bfseries\fontfamily{anttlc}\selectfont ài \thescau.}} 
\newcounter{sodong}
%%%=====Bỏ câu hỏi vào khung=====%%%
%\newtcolorbox{Cau}[2] [] 













{
%  breakable,
%  enhanced,
%  colback=cyan!10,
%  boxrule=0pt,
%  left=3pt, right=3pt,
%  arc=0pt,
%  outer arc=0pt,
%  title={\caut\ifthenelse{\equal{#2}{}}{\setcounter{sodong}{0}}{\setcounter{sodong}{#2}}},
%  fonttitle=\bfseries\sffamily\strut,
%  coltitle=magenta,
%  attach title to upper=\;,
%  #1,
%  overlay={
%    \draw[line width=2.5pt,cyan] 
 (frame.south west) -- (frame.south east);
%    \draw[line width=2.5pt,cyan] 





 (frame.north west) -- (frame.north east);
%  },
%}
%%%=====Để câu hỏi liên tục=====%%%
\definecolor{teal}{RGB}{0,0,255}
\definecolor{xanhchuan}{RGB}{0,0,255}
\newenvironment{Cau}[1] 






{\par\bigskip\color{xanhchuan}\caut\setcounter{sodong}{0}\color{black}\;}
{}
% in dòng kẽ hay không
\AfterEndEnvironment{Cau}{\ifthenelse{\thesodong>0}
{\setlength{\baselineskip}{18pt plus 1pt minus 1pt}\par\noindent
\makebox[0pt] [l] 



{\textcolor{purple}\faEdit}\hspace*{-3pt}
\multido{}{\thesodong}{\textcolor{teal!65}{\rule{\textwidth}{0.5pt}}\\ }
}{}}
%%%============================================%%%
\newtcolorbox{Hoi}[1] [] 




	{enhanced,breakable,
    before skip=1mm,after skip=1mm, coltext=magenta,
    boxrule=0pt,left=11mm,right=2mm,top=3mm,bottom=1mm,
    arc=0mm,colback=cyan!15,
    underlay={%
%	    \path[draw=doc!70,shorten <=-0.5mm,shorten >=-0.5mm,line width=3pt]  ([xshift=6mm] interior.south west)--([xshift=8mm] 
interior.north west);
        \path  node
[draw,color=teal,regular polygon,regular polygon sides=5,inner sep=1pt, minimum size=9mm,%
        double,double distance=1.25pt,line width=0.75pt]  at ([shift={(7mm,-0.2mm)}] 

	

interior.west) {\Large\bfseries ?};
    },
    1}	
%%%==============================================================%%%
\usepackage[answerdelayed] 















{exercise}
\renewcommand{\AnswerHeader}{\noindent\textcolor{magenta}{\bfseries{\large\zall C}âu {\fontfamily{anttlc}\selectfont\thescau}.\;}}
%%%==============================================================%%%
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\makeatletter
\DeclareSymbolFontAlphabet{\math@bb}{AMSb}
\AtBeginDocument{\protected\def\mathbb{\math@bb}} 
\makeatother
\renewcommand{\parallel}{\mathbin{\! / \mkern-2mu / \!}}
\makeatletter
\g@addto@macro\normalsize{
    \setlength{\abovedisplayskip}{4pt}%
    \setlength{\belowdisplayskip}{2pt}%
    \setlength{\abovedisplayshortskip}{4pt}%
    \setlength{\belowdisplayshortskip}{2pt}%
    }
\renewcommand{\simeq}[1] [] {~\tikz[scale=\f@size/12,baseline=\f@size/12*-7pt] \draw[#1,scale=0.1,line width=\f@size/12*0.5pt] 



 (0,0) arc (90:270:1)..controls +(0:1) and +(180:1).. (2,0) arc (90:-90:1);~
}
\makeatother
%%%==============================================================%%%
\usepackage[explicit] 




{titlesec}
\titleformat{\subsection}
{\normalfont\fontsize{15}{17}\bfseries}
{}{.5em}
{
{\tikz[overlay,remember picture] 
{
% \node[text width=0.95\linewidth] 




{\fontfamily{qag}\fontsize{16}{20}\selectfont\bfseries\scshape 
% \begingroup #1 
% \endgroup};
 \def\rt{0.65}
\pgfmathsetmacro{\rtn}{\rt*sqrt(2)}
 \fill[fill=cyan!10] 
 (\rt,0) coordinate (goc)--(90:\rt)--(-\rt,0)--(0,-\rt)--cycle;
 \node[violet] 
 at (0,0) {\fontfamily{qag}\fontsize{16}{20}\selectfont\bfseries\Alph{subsection}} ;
 \fill[cyan!10,on background layer]  ([shift={(goc)}] 135:\rt)--+(0.975*\linewidth,0)--([turn] -90:\rtn)--+(-0.975*\linewidth,0)--([turn] 
-135:\rt)--cycle;
 \node[anchor=west,text=teal] 

 at (goc) {\fontfamily{qag}\fontsize{16}{20}\selectfont\bfseries\scshape  \begingroup #1 
  \endgroup};
 \draw[line width=1pt,violet]  ([shift={(goc)}] 135:\rt)--+(0.975*\linewidth,0)--([turn] 
-90:\rtn)--+(-0.975*\linewidth,0);
 \draw[line width=1pt,violet,double] 


(\rt,0) coordinate (goc)--(90:\rt)--(-\rt,0)--(0,-\rt)--cycle;
}}
}
[] 




%%%==========================================================%%%
%%%Dùng lệnh sau để hiện thị đáp án ngay câu hỏi
%\AfterEndEnvironment{Answer}{\shipoutAnswer}
\newcommand{\dapso}[1] 




{\begin{flushright}
\textcolor{violet}{Đáp số:{ }#1}
\end{flushright}}
\everymath{\color{xanhchuan}}
\begin{document}
\newcommand{\giai}[1] 
{\par\noindent
\tikz{\node[above,anchor=south east,align=left] 
 (A) {\bfseries\scshape \color{magenta}{Cách giải #1}};
\path[teal,thin]  (A.south west)  to [ornament=85] 




 (A.south east);}
}

%\begin{center}
\newcounter{sode}
\newcommand{\tieude}[1] 



{\setcounter{scau}{0}
\refstepcounter{section}
\refstepcounter{sode}\newpage\noindent
\hspace*{-0.15cm}
\begin{tikzpicture}[every node/.style={inner sep=0pt,text=xanhchuan},color=xanhchuan,remember picture] 

\node[text=cyan!80!blue,fill=white,anchor=north west] 


(tieude)
 at (-1cm,0)
{
\includegraphics[scale=0.5] 

{Nguon/Logo4.pdf}
};
%\node[anchor=north west]  at (tieude.north west){\pgfornament[width=1cm] 
{41}};
%\node[anchor=north east]  at (tieude.north east){\pgfornament[width=1cm,symmetry=v] 
{41}};
%\node[anchor=south west]  at (tieude.south west){\pgfornament[width=1cm,symmetry=h] 
{41}};
%\node[anchor=south east]  at (tieude.south east){\pgfornament[width=1cm,symmetry=c] 
{41}};
\node[scale=1.5,text=white]  at ([yshift=0.5cm] 
tieude.center){\fontfamily{anttlc}\selectfont\bfseries\thesode};
%\path  ([shift={(1.1,0.1)}] tieude.south west) to [ornament=88]  ([shift={(-1.1,0.1)}] 
tieude.south east);
%\path  ([shift={(1.1,-0.05)}] tieude.north west) to [ornament=88]  ([shift={(-1.1,-0.05)}] 


tieude.north east);

    
\node[below=6pt of tieude,anchor=north west,xshift=1cm] 


 (B) {
    \begin{minipage}{0.75\textwidth}
    \begin{center}
       {\textcolor{xanhchuan}{\textit{Họ và tên thí sinh:} \makebox[7cm] 

	


{\dotfill}}}
    \end{center}
%	\textit{Lớp:} \dotfill 
    \end{minipage}};

\node[anchor=north east]  at ([shift={(0cm,3.25cm)}] B.north east) (MPT) {\pgfornament[width=1cm,symmetry=v] 
{41}}; %bên phải trên
\node[anchor=south west]  at ([shift={(-1cm,-20pt)}] B.south west) (MTD) {\pgfornament[width=1cm,symmetry=h] 
{41}}; %bên trái dưới
\node[anchor=south east]   at ([shift={(0cm,-20pt)}] B.south east) (MPD) {\pgfornament[width=1cm,symmetry=c] 


{41}}; %bên phải dưới
\path ($ 0.5*(MTD) + 0.5*(MPD)$) coordinate (gachduoi);

\node[anchor=north east] 
 (C)
at ([shift={(-1cm,-1pt)}] 







	
	





MPT){
\begingroup
\begin{minipage}{9cm}
\color{xanhchuan}
\begin{center}
    {\large\bfseries\MakeUppercase{#1}}\\
    {\bfseries CHỌN HỌC SINH GIỎI LỚP 9 } \\
    NĂM HỌC: 2020-2021. MÔN: TOÁN\\
%	\textit{Thời gian làm bài 150 phút}\\
%	Ngày thi: {/11/2020}
\end{center}
\end{minipage}
\endgroup
};

\path ([shift={(-3.5cm,-12pt)}] gachduoi.south)  to [ornament=88]  ([shift={(3.5cm,-12pt)}] 








gachduoi.south) ;
\end{tikzpicture}
}
%%%%====================================%%%%

\input{Nguon/KhaoSatDauNam}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenCamThuy}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenChuongMy}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenMyDuc}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenUngHoa}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenGiaLam}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenYenDinh}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/HuyenBaVi}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/TruongNongCong}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/QuanTayHo}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 





 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/YenLac}

\vspace*{6pt}
\begin{center}
    \tikz{\path[blue]  (0,0)  to [ornament=88] 










 +(0.55\textwidth,0);}
\end{center}
\input{Nguon/LongBien}



\input{Nguon/BaThuoc}
%%%=====================================%%%
\input{Nguon/Archimedes}
\input{Nguon/Melinh}

\end{document}

Bạn nào biên soạn thành công đừng quên chia sẻ kinh nghiệm biên soạn đề toán Latex của mình để cùng học hỏi

Read:   Đề thi Tin học 10 - Trại hè Hùng Vương lần thứ XV - THPT CHUYÊN BẮC KẠN - Kèm code mẫu
Hình đại diện của người dùng

admin

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *