On 9/19/25 13:35, Martin Budaj wrote:
On Fri, Sep 19, 2025 at 4:29 PM Bill Gee <bgee@campercaver.net <mailto:bgee@campercaver.net>> wrote:
https://ctan.org/pkg/datetime2 <https://ctan.org/pkg/datetime2>
If I add "\usepackage{datetime2}" to the "code tex-map" block in my thconfig file, then Therion throws several compile errors. It basically says it does not have any idea what that command means.
Therion also does not understand \today and \currenttime. These two should be part of a base set of packages. The datetime2 package overrides them with new definitions.
Therion uses Plain TeX format, so LaTeX packages don't work.
Plain defines only the following numeric variables: \day, \month, \year. You can use these directly or combine the \month with a series of \ifs to print a month name (AI can help to write this, don't forget to specify it should be used in Plain TeX).
Another option is the texdate package (https://ctan.org/tex-archive/ macros/generic/texdate <https://ctan.org/tex-archive/macros/generic/ texdate>) that should work with Plain (see chapter 8 in its documentation).
> On 9/18/25 21:56, bruce@tomo.co.nz <mailto:bruce@tomo.co.nz> wrote: >> I have been using /currentdate to identify in an exported pdf map >> header when the map was compiled. ... >> It takes the system date and format as input. So I was using Windows >> 10 OS settings to format the date how I preferred it, in the case, d >> Mmm YYYY. >> >> Seems that Windows 11, my new OS does not have the ability to format >> the system date in manner(s) that I find useful. >> >> Is there a way for Therion to take the date provided by the OS and >> reformat it?
\currentdate contains actually only a string preformatted by Therion according to the locale set on the system. It should be enough to set your date formatting on Windows.
Best wishes Martin
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Hmmm... That certainly explains why the datetime and datetime2 packages do not work. I installed a Fedora package from repositories called "texlive-texdate". The description says it pure "TeX-primitive", which I assume is the same thing as Plain TeX. https://ctan.org/pkg/texdate I tried using the basic stuff from texdate, but Therion did not like any of it. Even the most basic \initcurrdate command gave an "undefined control sequence" error. On my system, the date that Therion pulls in with \currentdate is in the form MM/DD/YY even though I have the system short date set to DD MMM YYYY. Time is a bigger problem. At 14:38 local time I compiled a map, and Therion set the time as "880". Where the heck did that come from? I can live with the date format Therion uses, though it is not ideal, and I can go without time. Just for grins, I tried to create a plain .tex file that called \initcurrdate. I could not get even that to work. =============== Bill Gee