metapost: Therion version and current date
While I've having fun with metapost. Is it possible to expose the version number of therion to metapost? And the current system date and time? I'll add anything I make to the wiki. Promise. Bruce By surveying and mapping caves we steal from our future selves.
Thanks Martin I have made a clumsy crude attempt at getting therion's version and compile date into the map header/legend, as in the attached file, layout and image below. Hopefully ready for the new 'thversion' variable. I can see that the metapost variables year month etc are there, but not sure how to access them, presumably via tex, to get them into the header. One way would be to modify the legend symbol to include the compile date -really messy. Another way would be to make a new entity like the north arrow or scalebar, and include it in the legend - not sure how to do this or if therion would recognise it if I did. Or can tex extract the mpost variables directly? Any good ideas? You can probably tell that I'm not much of a coder. Bruce layout LayoutEnterExperimentalVersionDate #check and enter the current th version and date each time you compile code tex-map \newtoks\thversion \thversion={5.3.8} \newtoks\today \today={24Jun2011} endcode copy LayoutExperimentalHeader #from LayoutStandards: sets up for inclusion of the above endlayout LayoutEnterExperimentalVersionDate
Is it possible to expose the version number of therion to metapost?
this could be added
And the current system date and time?
there are following internal numeric variables in metapost: hour, minute, day, month, year martin _______________________________________________
Or can tex extract the mpost variables directly?
In fact TeX has its own \day, \month and \year (all numeric). You can find an example of converting month number to name at http://www.alfredklomp.com/programming/tex/macros/ (section 2) Martin
In fact TeX has its own \day, \month and \year (all numeric). You can find an example of converting month number to name at http://www.alfredklomp.com/programming/tex/macros/ (section 2)
Thanks, that works nicely now. I'll put an example on the wiki when once we get a \thversion implemented... I'm having some challenges with adding it to tex-atlas, but I'll work on it some more before bothering y'all. Bruce
participants (2)
-
Bruce -
Martin Budaj