I want to add two rule before and after \tenbai. Can somebody help me?
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{vietnam}
\newcounter{sobai}
\newcommand{\tenbai}[1]{
\addtocounter{sobai}{1}
\textbf{\centerline{\huge{\S\thesobai. #1}}}
\addcontentsline{toc}{section}{\S\thesobai. #1}
}
\begin{document}
\tenbai{Số phức và tính toán đại số}
\end{document}


%) at the end of lines? – Werner Jan 14 '20 at 17:24\begin{document}
\tenbai{Số phức và tính toán đại số}
\end{document}
– frougon Jan 14 '20 at 17:34(each%is immediately followed by an end-of-line). Maybe it would be better to use for instancetitlesec` and redefine the appearance of sections.