Including compile time in map legend
Hello everyone - I am back with more TeX questions1 I can hear the groaning already ... :-) The goal is to include the time of compilation in the map legend. I already found the Therion macro for \currentdate, and it works perfectly. However, there is no equivalent macro for \currenttime. I have been reading Knuth's tome "The TeXbook" and searching all over the Internet. What I have tried: 1) Use the pdfLaTeX macro \pdfcreationdate. This works, but produces a string that is nearly unintelligible. It looks like this: D:20171208103654-06’00’ Yep, that is the time ... and the date, and the time zone offset! Too much and not in a useful format. 2) Use the \the\time primitive from TeX. This also works, except the time it prints is the number of minutes since midnight. Not quite as busy as option one, but still not readable by ordinary mortals. 3) Using either the datetime (deprecated) or the datetime2 package. Datetime2 includes a definition for \DTMtime which produces the output I want. The problem here is that Therion does not pass "\usepackage{datetime2}" to pdfLaTeX in any usable form. I put it right after the "code tex-map" line. The error message is: ========= (./data.tex (./th_enc.tex) (./th_texts.tex) (./th_resources.tex (/usr/share/texlive/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)) (./th_fontdef.tex{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/ pdftex. map}) ! Undefined control sequence. l.622 \usepackage {datetime2} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. =========== Yes, I have the datetime2 package on my computer. I can create sample TeX documents where it works as expected. 4) I created test TeX document to see if I could convert the output of \time into a pair of numbers that can be joined with a string. The math is easy, except that pdfLateX complains about missing numbers. The problem is that \time produces a string, not a number, and the \divide macro can't work with that. Possible solutions: 1) Figure out a way to get pdfLaTeX to convert the output of \time into a number without using packages. 2) Figure out a way to get Therion to pass \usepackage{} to pdfLaTeX. 3) Add a \currenttime macro to Therion in the next version. Any other suggestions? -- Bill Gee
participants (1)
-
Bill Gee