Re: environment variable configuration and documentation

David Allsopp <[email protected]>
Newsgroups gmane.comp.tex.miktex
Organization MetaStack Solutions Ltd.
Message-ID <[email protected]>
Vincent Belaïche wrote:
> If I do the same experiment with additionally the --tidy option to
> texi2pdf, the TEXINPUTS is set to :
> 
> 
> /c/Programmes/installation/texinfo-
> install/trunk/util/dummy.t2d/pdf/bak:/c/Programmes/installation/texinfo-
> install/trunk/util:/c/Programmes/installation/texinfo-
> install/trunk/util/.:
> 
> 
> ie same as before, and the command run is the following:
> 
> 
> pdfetex -recorder '\catcode126=12 \def\normaltilde{~}\catcode126=13
> \let~\normaltilde ' '\input' '/c/Programmes/installation/texinfo-
> install/trunk/util/./dummy.texi'
> 
> 
> In this second case the input document file path is clearly an MSYS path,
> not an MSW path. And the compilation works fine all the same.
> 
> 
> So, I don't know how MikTeX achieves that internally, but for sure
> somewhere you are calling some MSYS Library (msys-1.0.dll ?) to do that
> conversion. I noticed that it works even with MSYS paths that are mounted
> in my ~/etc/fstab

It is not MiKTeX which does this conversion, but MSYS bash (or more specifically, the MSYS runtime which Bash is compiled against), see http://www.mingw.org/wiki/Posix_path_conversion 

My MiKTeX 2.9 installation hasn't been updated in a while, but I believe the MiKTeX texi2* files are not wrappers, but programs implementing the same functionality (i.e. they are not thin wrappers around shell scripts).

MSYS also does the same with the environment variables. I demonstrate this in a quick-and-dirty way on my computer using the MSYS2 Bash prompt provided by Git-Bash in Git-for-Windows and the mingw64 C compilers provided by Cygwin:

display.c
#include <stdlib.h>
#include <stdio.h>

int main (int argc, char *argv[])
{
  printf("Supplied argument: %s\nTEXINPUTS: %s\n", argv[1], getenv("TEXINPUTS"));

  return 0;
}

Compile this using i686-w64-mingw64-gcc -o display.exe display.c

** Please note that display.exe is a native executable depending on neither cygwin1.dll nor msys-*.dll, just like MiKTeX's executables **

Then from an MSYS bash prompt with display.exe in the current directory I run:

Altus+DRA@Altus MINGW64 /c/Scratch
$ export TEXINPUTS=/c/Windows:/c/Windows/system32

Altus+DRA@Altus MINGW64 /c/Scratch
$ ./display.exe /c/Windows
Supplied argument: C:/Windows
TEXINPUTS: C:\Windows;C:\Windows\system32

And you can see that the supplied program (which in your case would be MiKTeX's entirely non-MSYS pdfetex.exe) is supplied with both a converted argument and a converted environment variable.


David

------------------------------------------------------------------------------
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.