-1

I am using clean thesis for writing the thesis. But, I am unable to write datetime in month year format like (August 2016).

  • So you don't want the day showing? Are you referring to \today? Should this form part of your title (\maketitle)? – Werner Aug 5 '16 at 17:00
  • 3
    Please Gopal, learn how to ask proper qustions. It is very very NOT obvious to most what you mean by clean thesis. – Johannes_B Aug 5 '16 at 17:33
3

Define a \MONTH and \YEAR macro to set what you need. The following example highlights this within \maketitle's \date:

enter image description here

\documentclass{scrreprt}

\usepackage{cleanthesis}

\newcommand{\MONTH}{%
  \ifcase\month% 0
    \or January% 1
    \or February% 2
    \or March% 3
    \or April% 4
    \or May% 5
    \or June% 6
    \or July% 7
    \or August% 8
    \or September% 9
    \or October% 10
    \or November% 11
    \or December% 12
  \fi}
\newcommand{\YEAR}{\number\year}

\author{An author}
\title{A title}
\date{\MONTH\ \YEAR}

\begin{document}

\maketitle

\end{document}
3

I can't recommend using cleanthesis. Anyway, the date format can be set with the datetime2 package.

% **************************************************
% Document Class Definition
% **************************************************
\documentclass[
  paper=A4,                     % paper size --> A4 is default in Germany
  twoside=true,                 % onesite or twoside printing
  openright,                    % doublepage cleaning ends up right side
  parskip=full,                 % spacing value / method for paragraphs
  chapterprefix=true,           % prefix for chapter marks
  11pt,                         % font size
  headings=normal,              % size of headings
  bibliography=totoc,           % include bib in toc
  listof=totoc,                 % include listof entries in toc
  titlepage=on,                 % own page for each title page
  captions=tableabove,          % display table captions above the float env
  draft=false,                  % value for draft version
  enabledeprecatedfontcommands,
]{scrreprt}

\usepackage[utf8]{inputenc} % defines file's character encoding

\usepackage[                % clean thesis style
  figuresep=colon,
  sansserif=false,
  hangfigurecaption=false,
  hangsection=true,
  hangsubsection=true,
  colorize=full,
  colortheme=bluemagenta,
  bibsys=bibtex,
  bibfile=bib-refs,
  bibstyle=alphabetic,
]{cleanthesis}

\usepackage{datetime2,datetime2-calc}
\DTMnewdatestyle{Myyyy}{%
  \renewcommand*{\DTMdisplaydate}[4]{\DTMmonthname{##2}~##1}%
  \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}%
}
\DTMsetdatestyle{Myyyy}

\begin{document}

\today

\end{document}

enter image description here

  • I have used above command for month year date but our output date format in numeric (means month and year both appeared in numeric), Also want to month in alphabetic, and year in numeric format. – Gopal Verma Dec 4 '16 at 11:07

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.