Sie sind hier

scrlttr2 date

I will put this in the beginners forum because I hope it should be an easy answer.
I cannot get the date to show as an 1st the st in superscript I have included the tex and part of the lco file I have even tried this as a single tex file also. Everything works except the superscript. Your help would be appreciated as this is driving me mad. ¹

\documentclass[smacapbus02,fontsize=11pt,paper=a4,enlargefirstpage=on,
pagenumber=botcenter,headsepline=false,parskip=half,footsepline=false,
fromalign=centered,fromphone=false,fromrule=false,fromfax=false,
fromemail=false,fromurl=off,fromlogo=off,addrfield=on,
backaddress=off,subject=titled,subject=underlined,subject=centered
locfield=wide,foldmarks=on,numericaldate=off,refline=narrow,
draft=false]{scrlttr2}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\usepackage[driver=xetex]{geometry} 
\usepackage{pst-barcode}
\begin{document}
\setkomavar{date}{\todaysname, \today}
\setkomavar{yourref} {DUR 56115}%% 
\setkomavar{customer}{DE73623423}
\begin{letter}{
Washington fsfg\\
Pfgsdfg Hgsfdgds\\
sdgfsdfg sdfgsdfge\\
fgsdfgsdfg\
sgffgsdfg\\
\psbarcode[transy=-0.2cm,transx=0.1cm]{NE371LY}{}{royalmail}
}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully}
\end{letter}
\end{document}

the lco file has the following info in ¹

\usepackage{graphicx}
\usepackage{scrdate}
\usepackage[british,dayofweek,long,raise]{datetime}
\usepackage[no-math]{fontspec}
\usepackage{marvosym}
\usepackage{scrpage2} 
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\usepackage[british,dayofweek,long]{datetime}

I can get the date to work if I add this ¹

\setkomavar{date}{\formatdate{15}{4}{2011}}

¹[Admin-Edit]: <code>…</code> added. Next time take care of this by yourself please!

Bild von Markus Kohm

scrlttr2 has to redefine \datelanguage to implement option numericaldate. But datetime does something similar and that breaks scrlttr2 and results in an endless loop. To avoid this, please try:

\documentclass[fontsize=11pt,paper=a4,enlargefirstpage=on,
pagenumber=botcenter,headsepline=false,parskip=half,footsepline=false,
fromalign=centered,fromphone=false,fromrule=false,fromfax=false,
fromemail=false,fromurl=off,fromlogo=off,addrfield=on,
backaddress=off,subject=titled,subject=underlined,subject=centered,
locfield=wide,foldmarks=on,numericaldate=off,refline=narrow,
draft=false]{scrlttr2}
 
% ----------------------------------------------------------------
% moved from smacapbus02.lco to build a complete minimal example
\usepackage{graphicx}
\usepackage[no-math]{fontspec}
\usepackage{marvosym}
\usepackage{scrpage2}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\usepackage[british,dayofweek,long]{datetime}
% Usage of \today at \date<language> has been broken, so replace
% it at variable date:
\setkomavar{date}{\formatdate{\day}{\month}{\year}}
% ----------------------------------------------------------------
 
\usepackage{pst-barcode}
\begin{document}
\setkomavar{yourref} {DUR 56115}%% 
\setkomavar{customer}{DE73623423}
\begin{letter}{
Washington fsfg\\
Pfgsdfg Hgsfdgds\\
sdgfsdfg sdfgsdfge\\
fgsdfgsdfg\
sgffgsdfg\\
\psbarcode[transy=-0.2cm,transx=0.1cm]{NE371LY}{}{royalmail}
}
\opening{Dear Sir or Madam,}
\closing{Yours faithfully}
\end{letter}
\end{document}

Note: I've removed some of the not needed or double loaded packages and eliminated the lco file to minimize the example.

I knew it would be something simple thanks and I will format my question correctly next time.
Vielen Dank für den Hilfe.

Comments for "scrlttr2 date" abonnieren