I would like to create a code to insert in my CV that make it auto update.
The hypotetic sentence is this one:
"Engineer with twenty experience years", where twenty is generated by, e.g., \startyear{1997}.
I have written this code:
\documentclass{article}
\usepackage{calculator}
\newcommand{\startyear}[1]{\SUBTRACT{\the\year}{1997}{\sol}\sol}
\begin{document}
Engineer with \startyear{1997} experience years.
\end{document}
that returns:
*
Engineer with 20 experience years.
*
But I would like the number (20) in text.

fmtcountpackage might be helpful – daleif Aug 28 '17 at 10:13calculatorpackage here.\newcommand{\startyear}[1]{\the\numexpr\year-#1}– Aug 28 '17 at 10:25fmtcountas @daleif suggested:\newcommand{\startyear}[1]{\numberstringnum{\numexpr\year-#1}}– Aug 28 '17 at 10:29\usepackage{fmtcount}and\newcommand{\startyear}[1]{\numberstringnum{\numexpr\year-#1}}in the preamble, I obtain the output: "Engineer with twenty experience years.", but with the error: "Missing = inserted for \ifnum. Engineer with \startyear{1997}" in the line where I use\startyear{1997}. – Giacomo Alessandroni Aug 28 '17 at 14:00