I'm building a complex index of dates & I'm using a lot of home commands. All is ok except using \datetime
commands with argument for exemple
\newcommand*{\qd}[1]{\ordinalnum{#1}~siècle\index{\ordinalnum{#1}~siècle}}
\qd{8}
It don't made the entry in the index. I show you all my file :
% !TEX encoding = UTF-8 Unicode
\documentclass{scrbook}
\usepackage[frenchb]{babel}
\usepackage[quiet]{fontspec}
\usepackage[automark,headsepline]{scrpage2}
\usepackage[babel,french=guillemets*]{csquotes}
\usepackage{etoolbox}
\usepackage{ifthen}
\usepackage{ifmtarg}
\usepackage{fp}
\usepackage[dayofweek]{datetime}
\usepackage[xindy={language=french, codepage=utf8}, style=altlist]{glossaries}
\usepackage[xindy, splitindex]{imakeidx}
\usepackage[itemlayout=singlepar]{idxlayout}
\setmainfont[Mapping=tex-text, Ligatures={Common, Rare}, Numbers={OldStyle}]{Adobe Garamond Pro}
\addtokomafont{disposition}{\normalfont}
\renewcommand{\fmtord}[1]{\up{#1}}
\makeatletter\patchcmd{\@ordinalMfrench}{eme}{ème}{}{}\makeatother
\makeglossaries
\def\xindylangopt{-M lang/french/utf8-lang -M style1.xdy}
\makeindex[name=can, title=Index des dates, options=\xindylangopt, intoc]
\newglossaryentry{Test 1}{name = Test 1, description = {Test 1 glossaire}}
\newglossaryentry{Test 2}{name = Test 2, description = {Test 2 glossaire}}
\newcommand*{\qds}[1]{\ordinalnum{#1}~siècle\index[can]{\ordinalnum{#1}~siècle}}
\newcommand*{\qdo}[1]{\ordinalnum{#1}~siècle\index[can]{{#1}~siècle}}
\begin{document}
\gls{Test 1}, \gls{Test 2},
\qds{8}, \qdo{9}, Test index\index[can]{Test index}
\printindex[can]
\printglossary
\end{document}
I compile with that :
% xelatex Date.tex
% makeglossaries Date
% xelatex -shell-escape Date.tex
% xelatex Date.tex
An idea ? How find a solution ? Thanks