1

I want something as follows:

enter image description here

I tried it with $\hline$ and some text but getting some errors. I'm almost a beginner in LaTeX.

\documentclass[12pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{multicol}
\usepackage{url}
\usepackage{amsmath, amsfonts, amsthm}
\usepackage{amssymb}
\usepackage{color}
\usepackage{mdframed}
\usepackage{lipsum}
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{black}}

\begin{document} Problem: \underline{\hspace{30pt}} \hfill Page \underline{\hspace{30pt}} of \underline{\hspace{30pt}}

\noindent\rule{\textwidth}{1pt}

\end{document}

Any help is appreciated.

VIVID
  • 195

1 Answers1

2
    \documentclass{article}
\usepackage[tmargin=2cm,bmargin=2cm,rmargin=2cm,lmargin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{fancyhdr} 
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{1pt}
\rhead{}
\lhead{Problem : \underline{\hspace{30pt}} \\ Page \underline{\hspace{15pt}} of \underline{\hspace{15pt}}}
\cfoot{\thepage/\pageref{LastPage}}
\begin{document}
Problem 01: Evaluate the following integral : $$\int_1^e \left(\ln x\right)^2 dx$$
\end{document}

I used the fancyhdr package to write on the head of the page, and according to @lanThompson comment I used the following \underline{\hspace{30pt}}. enter image description here

As I said, I'm not satisfied with the blank space, meaning I don't know how to make that line, I used only the comment of @lanthompson!

  • Thank you! Could you please add the commands to remove the page number at the bottom? I really need this. – VIVID Jul 25 '20 at 15:48
  • @VIVID All that you need to do is to replace \cfoot{\thepage/\pageref{LastPage}} with \cfoot{} –  Jul 25 '20 at 17:36