Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more query types #10

Open
eg9 opened this issue Jul 16, 2024 · 3 comments
Open

Adding more query types #10

eg9 opened this issue Jul 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@eg9
Copy link

eg9 commented Jul 16, 2024

This is a feature request. Presently the only queries are

pwd
ls

but I believe that there are other useful features that could be added. Looking at texosquery my list would be

osname
osversion
date-time
time-zones
tmpdir

There is already the ifplatform package, but it requires shell-escape (otherwise it just distinguish between Windows or not Windows). Possibly osversion is not that important as well as tmpdir. On the other hand, date-time and time-zones can be very useful; currently pdftex and luatex can provide very compact date information already, but xetex and perhaps ptex based engines don't.

@eg9 eg9 added the enhancement New feature or request label Jul 16, 2024
@muzimuzhi
Copy link
Contributor

currently pdftex and luatex can provide very compact date information already, but xetex and perhaps ptex based engines don't.

If you meant \pdfcreationdate and \pdffilemoddate pdfTeX primitives, they are both required by the l3kernel (see here) hence both have engine-independent expl3 correspondences: \c_sys_timestamp_str and \file_timestamp:n.

@car222222
Copy link

I was wondering what the queries such as:
date-times and time-zone
were intended to supply.
Please explain the details.

@eg9
Copy link
Author

eg9 commented Jul 25, 2024

@muzimuzhi @car222222

You can look at the documentation of texosquery. The OS is able to provide faster access to a wealth of information about dates and time zones. This information is obviously accessible with LuaTeX, but not with other engines. With \(pdf)creationdate only the time zone offset is available, not the ID or daylight saving.

This might simplify the working of packages such as datetime2, for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants