1

Related to How to detect and condition based on hostname . Answer in next post.

ivo Welch
  • 3,766

2 Answers2

2

The hostname is available in LuaTeX through the socket library:

\directlua{
  token.set_macro('hostname', socket.dns.gethostname())
}
Compiled on \hostname.
\bye

enter image description here

0
\def\hostname{
  \directlua{
    tex.print(os.getenv('HOSTNAME'))
  }}
    Compiled: \today\ on \hostname.

but see Marcel's comment.

ivo Welch
  • 3,766