[Therion] Is it possible to reformat output of currentdate tex variable
Martin Budaj
m.budaj at gmail.com
Fri Sep 19 20:35:30 CEST 2025
On Fri, Sep 19, 2025 at 4:29 PM Bill Gee <bgee at campercaver.net> wrote:
> 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) that should work with
Plain (see chapter 8 in its documentation).
> On 9/18/25 21:56, bruce at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20250919/888d3bf8/attachment.htm>
More information about the Therion
mailing list