3

My LaTeX code is

\documentclass[12pt]{article}


\usepackage[margin=1in]{geometry}
\usepackage{amsfonts, amsmath, amssymb}
\usepackage[none]{hyphenat}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{float}
\usepackage{url}
\usepackage[nottoc, notlot, notlof]{tocbibind}
\usepackage{url}
\usepackage{bm}
\usepackage[autostyle]{csquotes}
\usepackage[cache=false]{minted}
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage[colorlinks,linkcolor=black]{hyperref}
\usepackage[lined, linesnumbered, ruled,vlined]{algorithm2e}

% \usepackage{natbib}
% \usepackage[hyperref=true,backend=bibtex8,sorting=none,backref=true]{biblatex}

\DeclareMathOperator*{\argmax}{argmax}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{\slshape \MakeUppercase{My Report}}
\fancyhead[R]{\slshape MY NAME}
\fancyfoot[C]{\thepage}  % page number in the center at the footer

% \renewcommand{\headrulewidth}{0pt}  % remove the horizotal line
\renewcommand{\footrulewidth}{0pt}  % remove the footer line


% \parindent 0ex % no need for indent
% \setlength{\parindent}{4em}  % indentation of paragraph

% \setlength{\parskip}{1em} % length between paragraphs
% \renewcommand{\baselinestretch}{1.5} % line spacing

\begin{document}

\begin{titlepage}

\begin{center}
\vspace*{1cm}
\huge{\textbf{My Group}} \\
% \Large{\textbf{My Report}} \\
\vfill
\line(1, 0){430}\\[1mm]
\Large{\textbf{TITLE 1}} \\[3mm]
\Large{\textbf{TITLE 2}}\\[1mm]
\line(1, 0){430}
\vfill

My NAME \\
ME@ME.com \\
http://ME.COM \\
%\today
\date{August 4, 2018}

\end{center}

\end{titlepage}

\tableofcontents
\thispagestyle{empty}
\clearpage

\setcounter{page}{1}  % set page number 1

\definecolor{bg}{rgb}{0.95,0.95,0.95}

\section{My Section}

HELLO HERE is My Section........

\end{document}

using \today is can show the date on the page, however, using \date{August 4, 2018} it doesn't show the date on the page. How can I fix it?

6

\date{} is to specify the date - either by a free text, such as your August 4, 2018 or by using the current day \date{\today}. This stores the date for later use.

To insert it in your document, you could use

\makeatletter
\@date
\makeatother

or just write it in plain text, as you do for all your other elements like title, author etc.


some other comments about your code:

  • please don't load the same package more than once

  • commands like \huge are switches and don't take arguments


\documentclass[12pt]{article}


\usepackage[margin=1in]{geometry}
\usepackage{amsfonts, amsmath, amssymb}
\usepackage[none]{hyphenat}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{float}
%\usepackage{url}
\usepackage[nottoc, notlot, notlof]{tocbibind}
\usepackage{url}
\usepackage{bm}
\usepackage[autostyle]{csquotes}
%\usepackage[cache=false]{minted}
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage[colorlinks,linkcolor=black]{hyperref}
\usepackage[lined, linesnumbered, ruled,vlined]{algorithm2e}

% \usepackage{natbib}
% \usepackage[hyperref=true,backend=bibtex8,sorting=none,backref=true]{biblatex}

\DeclareMathOperator*{\argmax}{argmax}

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{\slshape \MakeUppercase{My Report}}
\fancyhead[R]{\slshape MY NAME}
\fancyfoot[C]{\thepage}  % page number in the center at the footer

% \renewcommand{\headrulewidth}{0pt}  % remove the horizotal line
\renewcommand{\footrulewidth}{0pt}  % remove the footer line

\date{August 4, 2018}

% \parindent 0ex % no need for indent
% \setlength{\parindent}{4em}  % indentation of paragraph

% \setlength{\parskip}{1em} % length between paragraphs
% \renewcommand{\baselinestretch}{1.5} % line spacing

\begin{document}

\begin{titlepage}

\begin{center}
\vspace*{1cm}
{\huge\textbf{My Group}} \\
% \Large{\textbf{My Report}} \\
\vfill
\line(1, 0){430}\\[1mm]
{\Large \textbf{TITLE 1}} \\[3mm]
{\Large\textbf{TITLE 2}}\\[1mm]
\line(1, 0){430}
\vfill

My NAME \\
ME@ME.com \\
http://ME.COM \\
%\today
\makeatletter
\@date
\makeatother


\end{center}

\end{titlepage}

\tableofcontents
\thispagestyle{empty}
\clearpage

\setcounter{page}{1}  % set page number 1

\definecolor{bg}{rgb}{0.95,0.95,0.95}

\section{My Section}

HELLO HERE is My Section........

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.