[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Re: New commands to activate AUCTeX?

From: Michael Forster
Subject: [AUCTeX] Re: New commands to activate AUCTeX?
Date: Sat, 21 May 2005 13:15:10 +1000
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)


David Kastrup wrote:
Michael Forster <address@hidden> writes:

The texmf finding problem with MiKTeX remains, right?

How about something like

    TEX=`kpsewhich tex.exe`

Is the general package layout of MikTeX that?  texmf tree, then
miktex/bin? Always?

Well, I am not an MikTeX expert, but I've never run across an installation with a different layout, and I've been using MikTeX for some years. Using the MikTeX installer, one can choose where to put the texmf tree(s), but the executables seem always to be in $TEXMF/miktex/bin.

And miktex/bin all in lowercase letters? We wont use kpsewhich here,
> but this might provide a way to figure out the texmf tree.

I think it's always in lowercase. At least this is how the current installer does it. You could get around the uppercase/lowercase issue by just starting at the tex.exe directory and moving up two levels in the path.

Note that "kpsewhich" has the advantage that it returns the C: syntax, while "which" returns "/cygdrive/c/" syntax. This is because cygwin converts "C:" path entries to "/cygdrive/c" (*)

> And the texmf tree then is called something that ends in texmf as
> last path component?

No. This can be choosen by the user.

Maybe a safe algorithm is:

* Start with the directory of tex.exe. Convert the name to lowercase and assert that it is "bin"

* Move one directory up. Convert the name to lowercase and assert that it is "miktex"

* Move one directory up. Use this as the texmf directory. Optionally assert that it has a "tex" subdirectory.


(*) BTW: Do you now the cygpath utility which comes with cygwin? Could be helpful:

$ cygpath -d C:\\Program\ Files

$ cygpath -m C:\\Program\ Files
C:/Program Files

$ cygpath -u C:\\Program\ Files
/cygdrive/c/Program Files

$ cygpath -w /cygdrive/c/Progra~1

$ cygpath -w --long C:/Progra~1
C:\Program Files

Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
       cygpath [-c HANDLE]
       cygpath [-ADHPSW]
Convert Unix and Windows format paths, or output system path information

Output type options:
  -d, --dos             print DOS (short) form of NAMEs (C:\PROGRA~1\)
  -m, --mixed           like --windows, but with regular slashes
  -M, --mode            report on mode of file (binmode or textmode)
  -u, --unix            (default) print Unix form of NAMEs
  -w, --windows         print Windows form of NAMEs (C:\WINNT)
  -t, --type TYPE       print TYPE form: 'dos', 'mixed', 'unix', or
Path conversion options:
  -a, --absolute        output absolute path
  -l, --long-name       print Windows long form of NAMEs (with -w, -m
  -p, --path            NAME is a PATH list (i.e., '/bin:/usr/bin')
  -s, --short-name      print DOS (short) form of NAMEs (with -w, -m
System information:
  -A, --allusers        use `All Users' instead of current user for -D,
  -D, --desktop         output `Desktop' directory and exit
  -H, --homeroot        output `Profiles' directory (home root) and exit
  -P, --smprograms      output Start Menu `Programs' directory and exit
  -S, --sysdir          output system directory and exit
  -W, --windir          output `Windows' directory and exit
Other options:
  -f, --file FILE       read FILE for input; use - to read from STDIN
  -o, --option          read options from FILE as well (for use with
  -c, --close HANDLE    close HANDLE (for use in captured process)
  -i, --ignore          ignore missing argument
  -h, --help            output usage information and exit
  -v, --version         output version information and exit

reply via email to

[Prev in Thread] Current Thread [Next in Thread]