Date now follows the language setting

This commit is contained in:
2020-02-07 23:37:39 +00:00
parent 4c69833048
commit 473cd9d6b9
4 changed files with 30 additions and 26 deletions

View File

@@ -1,12 +1,10 @@
\documentclass[12pt,a4paper,titlepage]{memoir}
\usepackage[IS]{rubook}
\usepackage{ruthesis}
\title{M.Sc. (and BSc.) Thesis Template for \theInstitution{}}
\titleIS{M.Sc. (and B.Sc.) Thesis Template for \theInstitution{} in Icelandic}
\usepackage[]{ruthesis}
%% Options in []:
%% IS Icelandic is main language
\title{B.Sc.\ and M.Sc.\ Thesis Template for \theInstitution{}}{B.Sc.\ and M.Sc.\ Thesis Template for \theInstitution{} in Icelandic}
\author{Joseph T. Foley}%Use \and as an author separator
\date{February 2020}% Change this to the date that it is signed
\dateIS{**Dagsetning í íslensk**}% Put the date in Icelandic
\date{2020}{2}{2}%{Year}{Month}{Day}%use numbers
%\DocumentInfo{TYPE}{ABBREVIATION}{DEGREE}{PROGRAM}
%\DocumentInfo{Dissertation}{Ph.D.}{Doctor of Philosophy}{Computer Science}
@@ -29,11 +27,13 @@
%%% Formatting code inclusion and snippets
%% "final" option to force it to display code
\usepackage{siunitx}
%% \SI{9.82}{\meter\per\second\square}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\maketitle{}
\copyrightpage{}
\signaturepage{}
\archivesigpage{}
@@ -125,5 +125,5 @@ $c$ &Speed of Light &\SI{2.99E8}{\meter\per\second\square}\\
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "PHD-NAME-YEAR"
%%% TeX-master: "BSC_MSC-NAME-YEAR"
%%% End:

View File

@@ -1,11 +1,10 @@
\documentclass[12pt,a4paper,titlepage]{memoir}
\usepackage{ruthesis}
\title{Ph.D. Dissertation Template for \theInstitution{}}
\titleIS{Ph.D. Dissertation Template for \theInstitution{} in Icelandic}
\usepackage[]{ruthesis}
%% Options in []:
%% IS Icelandic is main language
\title{Ph.D.\ Dissertation Template for \theInstitution{}}{Ph.D.\ Dissertation Template for \theInstitution{} in Icelandic}
\author{Joseph T. Foley}%Use \and as an author separator
\date{February 2020}% Change this to the date that it is signed
\dateIS{**Dagsetning í íslensk**}% Put the date in Icelandic
\date{2020}{2}{2}%{Year}{Month}{Day}%use numbers
%\DocumentInfo{TYPE}{ABBREVIATION}{DEGREE}{PROGRAM}
%\DocumentInfo{Dissertation}{Ph.D.}{Doctor of Philosophy}{Computer Science}

View File

@@ -104,6 +104,9 @@
{\RequirePackage[english,icelandic]{babel}}%%Icelandic main language
{\RequirePackage[icelandic,english]{babel}}%%English main language
\usepackage[useregional]{datetime2}
%% Smart manipulation of dates
\renewcommand{\date}[3]{\newcommand{\thedate}{\DTMdisplaydate{#1}{#2}{#3}{-1}}}
% \RequirePackage[autostyle,strict]{csquotes}
%% http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/csquotes/csquotes.pdf
@@ -302,7 +305,6 @@
% waste less blank pages in draft mode
% see p123 http://ctan.uib.no/macros/latex/contrib/memoir/memman.pdf
\newenvironment{cover}% commonalities for the cover material
{\thispagestyle{cover}%
\pagestyle{cover}%
@@ -495,11 +497,9 @@
%% Memoir titlepage definition and info at p.64
%% maketitlehookc is between the author and the date
\newcommand{\thetitle}{**Title in English**}
\newcommand{\thetitleIS}{**Title in Icelandic**}
\newcommand{\titleIS}[1]{\renewcommand{\thetitleIS}{#1}}
\newcommand{\thedateIS}{**Date in Icelandic**}
\newcommand{\dateIS}[1]{\renewcommand{\thedateIS}{#1}}
\renewcommand{\title}[2]{\renewcommand{\thetitle}{#1}\renewcommand{\thetitleIS}{#2}}
%% Clean up some formatting for the text
\renewcommand{\thepage}{\roman{page}}
@@ -697,7 +697,7 @@
\renewenvironment{abstract}
{\begin{coverleft}{\centering%
{\selectlanguage{english}\begin{coverleft}{\centering%
{\titletitlefont\thetitle\\}%%
\vspace{\baselineskip}
\theauthor\\%
@@ -710,12 +710,12 @@
{\par\end{coverleft}\newpage}
\newenvironment{abstractIS}
{\begin{coverleft}{\centering%
{\selectlanguage{icelandic}\begin{coverleft}{\centering%
{\titletitlefont\thetitleIS\\}%%
\vspace{\baselineskip}
\theauthor\\%
\vspace{\baselineskip}
\thedateIS\\%
\thedate\\%
}%
\setlength{\parskip}{\baselineskip}%
\par\vspace*{2\baselineskip}%

View File

@@ -1,11 +1,13 @@
%\documentclass{memoir}
\documentclass{article}
\documentclass{memoir}
\usepackage[online,IS]{ruthesis}
\usepackage[useregional]{datetime2}
%\usepackage{graphicx}
\title{Minimal Document for Testing}
\author{Joseph T. Foley \and Someone Else}
% \author: Use \and as a separator and \thanks{details} for additional info
\date{\today}
\date{\DTMdisplaydate{2020}{2}{2}{-1}}
%% TODO: use datetime2 to be smarter about dates
% \usepackage[icelandic,english]{babel}
% \usepackage[english,icelandic]{babel}
%\usepackage[icelandic]{babel}
@@ -22,11 +24,14 @@
\selectlanguage{icelandic}
\begin{abstract}
This is a test abstract in Icelandic.
% \icelandicmonthiiname to manually create names
\today
\end{abstract}
\selectlanguage{english}
\begin{abstract}
This is a test abstract in English.
\today
\end{abstract}
\newpage