Using \fbox
\documentclass{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{graphicx}
\newcommand{\centerbox}[1]% #1 = text
{\bgroup% use local definitions
\parskip=0pt
\sbox0{\fbox{#1}}
\dimen0=\dimexpr 0.5\textwidth - 0.5\wd0\relax
\par\noindent\rule{\dimen0}{0.8pt}\box0\rule{\dimen0}{0.8pt}\par
\egroup}
\begin{document}
\noindent{\rule{\textwidth}{0.8pt}}
\begin{center}
{\Large \textbf{Big title N 1 }}\\
(small title)
\end{center}
\noindent\rule{\textwidth}{0.8pt}
\begin{center}
{\large \fbox{Exercise}}
\end{center}
\centerbox{1}%
show that $$\int_{}^{} $$
\centerbox{2}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{text}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{large text}
% document content here
\end{document}
Using TikZ (rounded corners)
\documentclass{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{tikz}
\newcommand{\centerbox}[1]% #1 = text
{\bgroup% use local definitions
\parskip=0pt
\parindent=0pt
\sbox0{\tikz[baseline]{\node[draw,rounded corners,anchor=base]{#1};}}%
\dimen0=\dimexpr 0.5\textwidth - 0.5\wd0\relax
\par\rule{\dimen0}{0.8pt}\box0\rule{\dimen0}{0.8pt}\par
\egroup}
\begin{document}
\noindent{\rule{\textwidth}{0.8pt}}
\begin{center}
{\Large \textbf{Big title N 1 }}\\
(small title)
\end{center}
\noindent\rule{\textwidth}{0.8pt}
\begin{center}
\tikz[baseline]{\node[draw,rounded corners=0.8ex,anchor=base]{\large Exercise}}
\end{center}
\centerbox{1}%
show that $$\int_{}^{} $$
\centerbox{2}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{text}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{large text}
% document content here
\end{document}
Using tcolorbox (\tcbox
)
\documentclass{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{tcolorbox}
\newcommand{\centerbox}[1]% #1 = text
{\bgroup% use local definitions
\parskip=0pt
\parindent=0pt
\sbox0{\tcbox[tcbox raise base]{#1}}%
\dimen0=\dimexpr 0.5\linewidth - 0.5\wd0\relax
\par\rule{\dimen0}{0.8pt}\box0\rule{\dimen0}{0.8pt}\par
\egroup}
\begin{document}
\noindent\rule{\textwidth}{0.8pt}
\begin{center}
{\Large \textbf{Big title N 1 }}\\
(small title)
\end{center}
\noindent\rule{\textwidth}{0.8pt}
\begin{center}
\tcbox[tcbox raise base]{\large Exercise}
\end{center}
\centerbox{1}%
show that $$\int_{}^{} $$
\centerbox{2}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{text}
\begin{itemize}
\item
\item
\end{itemize}
\centerbox{large text}
% document content here
\end{document}