Re: environment variable configuration and documentation
Vincent Belaïche <[email protected]>
| Newsgroups | gmane.comp.tex.miktex |
|---|---|
| Message-ID | <[email protected]> |
That's interesting. But it does not work properly. Conversion of the TeX envvars is not as simple as that, there are two things to consider: 1) an empty directory in a directory list means "insert here the default list (meaning root dir config for MikTeX, AFAIU) 2) a duplicate tailing / means "look at this directory recursively". I compiled display.c, and placed display.exe under /bin Then I tried this: $ export TEXINPUTS='/bin//::/local/bin'; display /bin/display.exe Supplied argument: c:/Nos_Programmes/msys/bin/display.exe. TEXINPUTS: c:\Nos_Programmes\msys\bin\;c:\Nos_Programmes\msys\local\bin. Please note that my MSYS root dir is c:\Nos_Programmes\msys The value of TEXINPUTS as converted by MSYS and passed to display.exe is incorrect, it should have been: c:\Nos_Programmes\msys\bin\\;;c:\Nos_Programmes\msys\local\bin look at that ------------^^ That makes me think that a function missing in MSYS is some configuration file where the user tells which variable to convert, and how to convert them. This file could look like PATH= TEXINPUTS=keep all empty up to 1, keep all tailing / up to 2 ... Anyway, it seems that MikTeX does not implement properly reading from TEXINPUTS, as the cur directory cannot be given less precedence than some other directory. Vincent. ---------------------------------------- > From: [email protected] > To: [email protected] > Date: Sun, 20 Sep 2015 19:11:50 +0000 > Subject: Re: [MiKTeX] environment variable configuration and documentation > > 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 ------------------------------------------------------------------------------ _______________________________________________ Q: How can I leave the mailing list? A: See http://docs.miktex.org/faq/support.html#leavingml