[fptex] can one capture an environmental variable within a new command in latex?

Luis A Escobar luis at lsu.edu
Tue Feb 4 10:47:38 CET 2003


Heiko, thank you for the help.

   I will try your suggestion.

   Regards, Luis A




Heiko Oberdiek <oberdiek at uni-freiburg.de>@tug.org on 02/03/2003 03:59:22 PM

Sent by:    fptex-bounces at tug.org


To:    fptex at tug.org
cc:     (bcc: Luis A Escobar/luis/LSU)

Subject:    Re: [fptex] can one capture an environmental variable within a
       new  command in latex?


On Mon, Feb 03, 2003 at 02:24:44PM -0600, Luis A Escobar wrote:

> I would like to write a newcommand which captures an environmental
>   variable defined in a windows environment. This could help me to
>   write latex document that depend on environmental variables but which
>   are basically machine independent in terms of paths, location of
>   newcommands, figures, etc. Something like (but
>
>   \newcommand{mypath}{\getenv{\$HOME}}

You can use the \write18-feature to call system commands,
write it to a file and read this by TeX.

\immediate\write18{echo %HOME%>env.tex}

(you have to enable the feature, eg. on the command line
  latex -shell-escape

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
_______________________________________________
fptex mailing list
fptex at tug.org
 http://tug.org/mailman/listinfo/fptex






More information about the fptex mailing list