Changing the date
documentclass[a4paper,10pt,demo ]{article} %
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (today)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
I want to add ''th'' in the date as follows
date
add a comment |
documentclass[a4paper,10pt,demo ]{article} %
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (today)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
I want to add ''th'' in the date as follows
date
add a comment |
documentclass[a4paper,10pt,demo ]{article} %
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (today)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
I want to add ''th'' in the date as follows
date
documentclass[a4paper,10pt,demo ]{article} %
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (today)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
I want to add ''th'' in the date as follows
date
date
asked Mar 7 at 15:26
SchülerSchüler
33019
33019
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Using datetime
package, (see datetime.sty
pdf, on p:8):
documentclass[a4paper,10pt,demo ]{article} %
usepackage{datetime}
newdateformat{dashdate}{%
twodigit{THEDAY}-twodigit{THEMONTH}-THEYEAR}
newdateformat{usvardate}{%
monthname[THEMONTH] ordinal{DAY}, THEYEAR}
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
[1]:
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changedMySlogan{Curriculum Vitae \ nullhfill (today)}
byMySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks
– Schüler
Mar 7 at 15:44
Or you can uselevel
option to passdatetime
, e.g,usepackage[level]{datetime}
. Theth
is placed next to date, not uppercase.
– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined afterusepackage{datetime}
.
– ferahfeza
Mar 7 at 15:56
|
show 4 more comments
The following uses a datetime2
approach to set the ordinal date, similar to what is proposed in ferahfeza's answer. Additionally, a minor adjustment in the placement of the ordinal is introduced:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{fmtcount}
usepackage[calc,english]{datetime2}
DTMnewdatestyle{usvardate}{%
renewcommand{DTMdisplaydate}[4]{%
DTMmonthname{##2} ordinalnum{##3}, number##1 }%
renewcommand{DTMDisplaydate}{DTMdisplaydate}%
}
makeatletter
AtBeginDocument{
renewcommand{fmtord}[1]{,fc@textsuperscript{#1}}% Add , before ordinal number
}
makeatother
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetdatestyle{usvardate}today)}
end{document}
add a comment |
The culprit is here
- to find the right layout for your wished date (month day-with-ord, year) and
- to change the distance between number and ord.
To test this two pints please see the following MWE:
documentclass{article}
usepackage[en-GB,en-CA,en-US]{datetime2}
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
begin{document}
british:
DTMsetstyle{en-GB}today.
DTMlangsetup[en-GB]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-GB}emph{today} today
canadian:
DTMlangsetup[en-CA]{ord=raise} % ,monthyearsep={,space},abbr ,ordsep={,}
DTMsetstyle{en-CA}emph{today} today
american:
DTMlangsetup[en-US]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-US}emph{today} today
end{document}
Its result shows you that you can choose the canadian or american variant to get your wished date layout. Because you used italic font in your document I showed in the MWE above italic and normal text for the date.
You can see that in this variant the distance between number and ord is a little bit greater than in your result, but if you want more distance, please uncomment the lines
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
in the MWE above to activate an patch. This patch adds an smal skip ,
after the number (represented with #1
in the code. Now you get the result:
Okay, now we can include the found code (I choosed american variant) into your code:
documentclass[%
a4paper,
10pt,
demo
]{article}
usepackage[en-US]{datetime2} % <=======================================
DTMlangsetup[en-US]{ord=raise}
usepackage{etoolbox} % <===============================================
patchcmd{DTMenglishordinal}% <cmd> <==================================
{#1 DTMenglishfmtordsuffix}% <search>
{#1,DTMenglishfmtordsuffix}% <replace>
{}{}% <success><failure>
usepackage{pifont} %bouni
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command % <=================================================== ???????
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
pagestyle{empty} % No pagenumbers/headers/footers
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetstyle{en-US}today)} % <=======================
sepspace % Si on ajoute encore sepspace on aura plus d'espace
section*{Informations personelles}
end{document}
with the result:
The red underlined "command" commes from the line I marked in the code with <====== ?????
. Is that what you want? If not delete the line with command
in the code.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478218%2fchanging-the-date%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using datetime
package, (see datetime.sty
pdf, on p:8):
documentclass[a4paper,10pt,demo ]{article} %
usepackage{datetime}
newdateformat{dashdate}{%
twodigit{THEDAY}-twodigit{THEMONTH}-THEYEAR}
newdateformat{usvardate}{%
monthname[THEMONTH] ordinal{DAY}, THEYEAR}
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
[1]:
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changedMySlogan{Curriculum Vitae \ nullhfill (today)}
byMySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks
– Schüler
Mar 7 at 15:44
Or you can uselevel
option to passdatetime
, e.g,usepackage[level]{datetime}
. Theth
is placed next to date, not uppercase.
– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined afterusepackage{datetime}
.
– ferahfeza
Mar 7 at 15:56
|
show 4 more comments
Using datetime
package, (see datetime.sty
pdf, on p:8):
documentclass[a4paper,10pt,demo ]{article} %
usepackage{datetime}
newdateformat{dashdate}{%
twodigit{THEDAY}-twodigit{THEMONTH}-THEYEAR}
newdateformat{usvardate}{%
monthname[THEMONTH] ordinal{DAY}, THEYEAR}
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
[1]:
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changedMySlogan{Curriculum Vitae \ nullhfill (today)}
byMySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks
– Schüler
Mar 7 at 15:44
Or you can uselevel
option to passdatetime
, e.g,usepackage[level]{datetime}
. Theth
is placed next to date, not uppercase.
– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined afterusepackage{datetime}
.
– ferahfeza
Mar 7 at 15:56
|
show 4 more comments
Using datetime
package, (see datetime.sty
pdf, on p:8):
documentclass[a4paper,10pt,demo ]{article} %
usepackage{datetime}
newdateformat{dashdate}{%
twodigit{THEDAY}-twodigit{THEMONTH}-THEYEAR}
newdateformat{usvardate}{%
monthname[THEMONTH] ordinal{DAY}, THEYEAR}
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
[1]:
Using datetime
package, (see datetime.sty
pdf, on p:8):
documentclass[a4paper,10pt,demo ]{article} %
usepackage{datetime}
newdateformat{dashdate}{%
twodigit{THEDAY}-twodigit{THEMONTH}-THEYEAR}
newdateformat{usvardate}{%
monthname[THEMONTH] ordinal{DAY}, THEYEAR}
usepackage{pifont} %bouni
%-----accent
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
%-----
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
%%%%%%%%%%%%% dimension ancien des marges %%%%%%%%%%%%%%%%%%%%
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
%%%%%%%%%%%%% style des sections %%%%%%%%%%%%%%%%%%%%
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
%%%%%%%%%%%%%%%% Macros %%%%%%%%%%%%%%%%%%%%
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
%%% ------------------------------------------------------------
pagestyle{empty} % No pagenumbers/headers/footers
%%%%%%%%%%%%%%%%%%%%% Begin Document %%%%%%%%%%%%%%%%%%%%%%%%%
begin{document}
%%%%%%%%%%%%%%%%%% Photo et title %%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------
%---------------------------
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
%MySlogan{Curriculum Vitae (October 2016)}
%---------------------------
sepspace % Si on ajoute encore sepspace on aura plus d'espace
$$$$
%%%%%%%%%%%%%% Personal details%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
section*{Informations personelles}
end{document}
[1]:
answered Mar 7 at 15:36
ferahfezaferahfeza
6,88911933
6,88911933
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changedMySlogan{Curriculum Vitae \ nullhfill (today)}
byMySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks
– Schüler
Mar 7 at 15:44
Or you can uselevel
option to passdatetime
, e.g,usepackage[level]{datetime}
. Theth
is placed next to date, not uppercase.
– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined afterusepackage{datetime}
.
– ferahfeza
Mar 7 at 15:56
|
show 4 more comments
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changedMySlogan{Curriculum Vitae \ nullhfill (today)}
byMySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks
– Schüler
Mar 7 at 15:44
Or you can uselevel
option to passdatetime
, e.g,usepackage[level]{datetime}
. Theth
is placed next to date, not uppercase.
– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined afterusepackage{datetime}
.
– ferahfeza
Mar 7 at 15:56
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Thanks a lot. Please can I separate a bit the letter t from the number 7?
– Schüler
Mar 7 at 15:43
Please also why you changed
MySlogan{Curriculum Vitae \ nullhfill (today)}
by MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks– Schüler
Mar 7 at 15:44
Please also why you changed
MySlogan{Curriculum Vitae \ nullhfill (today)}
by MySlogan{Curriculum Vitae \ nullhfill (usvardatetoday)}
? Thanks– Schüler
Mar 7 at 15:44
Or you can use
level
option to pass datetime
, e.g, usepackage[level]{datetime}
. The th
is placed next to date, not uppercase.– ferahfeza
Mar 7 at 15:51
Or you can use
level
option to pass datetime
, e.g, usepackage[level]{datetime}
. The th
is placed next to date, not uppercase.– ferahfeza
Mar 7 at 15:51
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
In your opinion, what is the best way? Thanks
– Schüler
Mar 7 at 15:55
usvardate
is the name of the new dateformat. See my code. It is defined after usepackage{datetime}
.– ferahfeza
Mar 7 at 15:56
usvardate
is the name of the new dateformat. See my code. It is defined after usepackage{datetime}
.– ferahfeza
Mar 7 at 15:56
|
show 4 more comments
The following uses a datetime2
approach to set the ordinal date, similar to what is proposed in ferahfeza's answer. Additionally, a minor adjustment in the placement of the ordinal is introduced:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{fmtcount}
usepackage[calc,english]{datetime2}
DTMnewdatestyle{usvardate}{%
renewcommand{DTMdisplaydate}[4]{%
DTMmonthname{##2} ordinalnum{##3}, number##1 }%
renewcommand{DTMDisplaydate}{DTMdisplaydate}%
}
makeatletter
AtBeginDocument{
renewcommand{fmtord}[1]{,fc@textsuperscript{#1}}% Add , before ordinal number
}
makeatother
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetdatestyle{usvardate}today)}
end{document}
add a comment |
The following uses a datetime2
approach to set the ordinal date, similar to what is proposed in ferahfeza's answer. Additionally, a minor adjustment in the placement of the ordinal is introduced:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{fmtcount}
usepackage[calc,english]{datetime2}
DTMnewdatestyle{usvardate}{%
renewcommand{DTMdisplaydate}[4]{%
DTMmonthname{##2} ordinalnum{##3}, number##1 }%
renewcommand{DTMDisplaydate}{DTMdisplaydate}%
}
makeatletter
AtBeginDocument{
renewcommand{fmtord}[1]{,fc@textsuperscript{#1}}% Add , before ordinal number
}
makeatother
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetdatestyle{usvardate}today)}
end{document}
add a comment |
The following uses a datetime2
approach to set the ordinal date, similar to what is proposed in ferahfeza's answer. Additionally, a minor adjustment in the placement of the ordinal is introduced:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{fmtcount}
usepackage[calc,english]{datetime2}
DTMnewdatestyle{usvardate}{%
renewcommand{DTMdisplaydate}[4]{%
DTMmonthname{##2} ordinalnum{##3}, number##1 }%
renewcommand{DTMDisplaydate}{DTMdisplaydate}%
}
makeatletter
AtBeginDocument{
renewcommand{fmtord}[1]{,fc@textsuperscript{#1}}% Add , before ordinal number
}
makeatother
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetdatestyle{usvardate}today)}
end{document}
The following uses a datetime2
approach to set the ordinal date, similar to what is proposed in ferahfeza's answer. Additionally, a minor adjustment in the placement of the ordinal is introduced:
documentclass{article}
usepackage[T1]{fontenc}
usepackage{fmtcount}
usepackage[calc,english]{datetime2}
DTMnewdatestyle{usvardate}{%
renewcommand{DTMdisplaydate}[4]{%
DTMmonthname{##2} ordinalnum{##3}, number##1 }%
renewcommand{DTMDisplaydate}{DTMdisplaydate}%
}
makeatletter
AtBeginDocument{
renewcommand{fmtord}[1]{,fc@textsuperscript{#1}}% Add , before ordinal number
}
makeatother
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetdatestyle{usvardate}today)}
end{document}
answered Mar 9 at 17:26
WernerWerner
447k699901697
447k699901697
add a comment |
add a comment |
The culprit is here
- to find the right layout for your wished date (month day-with-ord, year) and
- to change the distance between number and ord.
To test this two pints please see the following MWE:
documentclass{article}
usepackage[en-GB,en-CA,en-US]{datetime2}
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
begin{document}
british:
DTMsetstyle{en-GB}today.
DTMlangsetup[en-GB]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-GB}emph{today} today
canadian:
DTMlangsetup[en-CA]{ord=raise} % ,monthyearsep={,space},abbr ,ordsep={,}
DTMsetstyle{en-CA}emph{today} today
american:
DTMlangsetup[en-US]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-US}emph{today} today
end{document}
Its result shows you that you can choose the canadian or american variant to get your wished date layout. Because you used italic font in your document I showed in the MWE above italic and normal text for the date.
You can see that in this variant the distance between number and ord is a little bit greater than in your result, but if you want more distance, please uncomment the lines
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
in the MWE above to activate an patch. This patch adds an smal skip ,
after the number (represented with #1
in the code. Now you get the result:
Okay, now we can include the found code (I choosed american variant) into your code:
documentclass[%
a4paper,
10pt,
demo
]{article}
usepackage[en-US]{datetime2} % <=======================================
DTMlangsetup[en-US]{ord=raise}
usepackage{etoolbox} % <===============================================
patchcmd{DTMenglishordinal}% <cmd> <==================================
{#1 DTMenglishfmtordsuffix}% <search>
{#1,DTMenglishfmtordsuffix}% <replace>
{}{}% <success><failure>
usepackage{pifont} %bouni
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command % <=================================================== ???????
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
pagestyle{empty} % No pagenumbers/headers/footers
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetstyle{en-US}today)} % <=======================
sepspace % Si on ajoute encore sepspace on aura plus d'espace
section*{Informations personelles}
end{document}
with the result:
The red underlined "command" commes from the line I marked in the code with <====== ?????
. Is that what you want? If not delete the line with command
in the code.
add a comment |
The culprit is here
- to find the right layout for your wished date (month day-with-ord, year) and
- to change the distance between number and ord.
To test this two pints please see the following MWE:
documentclass{article}
usepackage[en-GB,en-CA,en-US]{datetime2}
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
begin{document}
british:
DTMsetstyle{en-GB}today.
DTMlangsetup[en-GB]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-GB}emph{today} today
canadian:
DTMlangsetup[en-CA]{ord=raise} % ,monthyearsep={,space},abbr ,ordsep={,}
DTMsetstyle{en-CA}emph{today} today
american:
DTMlangsetup[en-US]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-US}emph{today} today
end{document}
Its result shows you that you can choose the canadian or american variant to get your wished date layout. Because you used italic font in your document I showed in the MWE above italic and normal text for the date.
You can see that in this variant the distance between number and ord is a little bit greater than in your result, but if you want more distance, please uncomment the lines
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
in the MWE above to activate an patch. This patch adds an smal skip ,
after the number (represented with #1
in the code. Now you get the result:
Okay, now we can include the found code (I choosed american variant) into your code:
documentclass[%
a4paper,
10pt,
demo
]{article}
usepackage[en-US]{datetime2} % <=======================================
DTMlangsetup[en-US]{ord=raise}
usepackage{etoolbox} % <===============================================
patchcmd{DTMenglishordinal}% <cmd> <==================================
{#1 DTMenglishfmtordsuffix}% <search>
{#1,DTMenglishfmtordsuffix}% <replace>
{}{}% <success><failure>
usepackage{pifont} %bouni
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command % <=================================================== ???????
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
pagestyle{empty} % No pagenumbers/headers/footers
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetstyle{en-US}today)} % <=======================
sepspace % Si on ajoute encore sepspace on aura plus d'espace
section*{Informations personelles}
end{document}
with the result:
The red underlined "command" commes from the line I marked in the code with <====== ?????
. Is that what you want? If not delete the line with command
in the code.
add a comment |
The culprit is here
- to find the right layout for your wished date (month day-with-ord, year) and
- to change the distance between number and ord.
To test this two pints please see the following MWE:
documentclass{article}
usepackage[en-GB,en-CA,en-US]{datetime2}
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
begin{document}
british:
DTMsetstyle{en-GB}today.
DTMlangsetup[en-GB]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-GB}emph{today} today
canadian:
DTMlangsetup[en-CA]{ord=raise} % ,monthyearsep={,space},abbr ,ordsep={,}
DTMsetstyle{en-CA}emph{today} today
american:
DTMlangsetup[en-US]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-US}emph{today} today
end{document}
Its result shows you that you can choose the canadian or american variant to get your wished date layout. Because you used italic font in your document I showed in the MWE above italic and normal text for the date.
You can see that in this variant the distance between number and ord is a little bit greater than in your result, but if you want more distance, please uncomment the lines
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
in the MWE above to activate an patch. This patch adds an smal skip ,
after the number (represented with #1
in the code. Now you get the result:
Okay, now we can include the found code (I choosed american variant) into your code:
documentclass[%
a4paper,
10pt,
demo
]{article}
usepackage[en-US]{datetime2} % <=======================================
DTMlangsetup[en-US]{ord=raise}
usepackage{etoolbox} % <===============================================
patchcmd{DTMenglishordinal}% <cmd> <==================================
{#1 DTMenglishfmtordsuffix}% <search>
{#1,DTMenglishfmtordsuffix}% <replace>
{}{}% <success><failure>
usepackage{pifont} %bouni
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command % <=================================================== ???????
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
pagestyle{empty} % No pagenumbers/headers/footers
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetstyle{en-US}today)} % <=======================
sepspace % Si on ajoute encore sepspace on aura plus d'espace
section*{Informations personelles}
end{document}
with the result:
The red underlined "command" commes from the line I marked in the code with <====== ?????
. Is that what you want? If not delete the line with command
in the code.
The culprit is here
- to find the right layout for your wished date (month day-with-ord, year) and
- to change the distance between number and ord.
To test this two pints please see the following MWE:
documentclass{article}
usepackage[en-GB,en-CA,en-US]{datetime2}
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
begin{document}
british:
DTMsetstyle{en-GB}today.
DTMlangsetup[en-GB]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-GB}emph{today} today
canadian:
DTMlangsetup[en-CA]{ord=raise} % ,monthyearsep={,space},abbr ,ordsep={,}
DTMsetstyle{en-CA}emph{today} today
american:
DTMlangsetup[en-US]{ord=raise} % ,monthyearsep={,space},abbr
DTMsetstyle{en-US}emph{today} today
end{document}
Its result shows you that you can choose the canadian or american variant to get your wished date layout. Because you used italic font in your document I showed in the MWE above italic and normal text for the date.
You can see that in this variant the distance between number and ord is a little bit greater than in your result, but if you want more distance, please uncomment the lines
%usepackage{etoolbox}
%patchcmd{DTMenglishordinal}% <cmd>
% {#1 DTMenglishfmtordsuffix}% <search>
% {#1,DTMenglishfmtordsuffix}% <replace>
% {}{}% <success><failure>
in the MWE above to activate an patch. This patch adds an smal skip ,
after the number (represented with #1
in the code. Now you get the result:
Okay, now we can include the found code (I choosed american variant) into your code:
documentclass[%
a4paper,
10pt,
demo
]{article}
usepackage[en-US]{datetime2} % <=======================================
DTMlangsetup[en-US]{ord=raise}
usepackage{etoolbox} % <===============================================
patchcmd{DTMenglishordinal}% <cmd> <==================================
{#1 DTMenglishfmtordsuffix}% <search>
{#1,DTMenglishfmtordsuffix}% <replace>
{}{}% <success><failure>
usepackage{pifont} %bouni
usepackage[latin1]{inputenc} %écrire directement les accents et il peut poser des problème
usepackage[T1]{fontenc}
usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
usepackage{graphicx} % Enable pdflatex
usepackage{wrapfig}
usepackage{amsmath,amsfonts,amsthm} % Math packages
usepackage{geometry}
geometry{left=2cm,right=2cm,top=1.5cm,bottom=1.5cm}
frenchspacing % Better looking spacings after periods
usepackage{sectsty}
sectionfont{% % Change font of section
command % <=================================================== ???????
usefont{OT1}{phv}{b}{n}% % bch-b-n: CharterBT-Bold font
sectionrule{0pt}{0pt}{-5pt}{1pt}}
newcommand{sepspace}{vspace*{1em}} % Vertical space macro
newcommand{MyName}[1]{ % Name
Huge usefont{OT1}{phv}{b}{n} hfill #1
par normalsize normalfont}
newcommand{MySlogan}[1]{ % Slogan}{optional)
large usefont{OT1}{phv}{m}{n}hfill textit{#1}
par normalsize normalfont}
pagestyle{empty} % No pagenumbers/headers/footers
begin{document}
MyName{Name Name}
MySlogan{Curriculum Vitae \ nullhfill (DTMsetstyle{en-US}today)} % <=======================
sepspace % Si on ajoute encore sepspace on aura plus d'espace
section*{Informations personelles}
end{document}
with the result:
The red underlined "command" commes from the line I marked in the code with <====== ?????
. Is that what you want? If not delete the line with command
in the code.
answered Mar 9 at 20:19
KurtKurt
39.3k850164
39.3k850164
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478218%2fchanging-the-date%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown