auctex
[Top][All Lists]
Advanced

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

Re: LaTeX doesn't find the source file


From: Ikumi Keita
Subject: Re: LaTeX doesn't find the source file
Date: Mon, 07 Mar 2022 17:00:41 +0900

Hi Werner,

>>>>> Werner LEMBERG <wl@gnu.org> writes:
>> 1. Customize `TeX-kpathsea-path-delimiter' to ";".

> Is there a reason why ';' is not the default?

It was discussed in 2017 here:
https://lists.gnu.org/r/auctex/2017-11/msg00013.html
Basically, for the cases that use cygwin TeX distribution.

> The kpathsea library can use this value for non-Windows systems, too –
> have a look into TeXLive's `texmf.cnf` file, for example.

At that time, it didn't work for kpsewhich command, unlike lines in
texmf.cnf:
https://lists.gnu.org/r/auctex-devel/2017-11/msg00026.html
,----
| address@hidden:/usr/local/tmp/lilypond$ kpsewhich --progname=latex
| --expand-path "/home/dak/tex/india/:/tmp"
| /home/dak/tex/india:/tmp
| address@hidden:/usr/local/tmp/lilypond$ kpsewhich --progname=latex
| --expand-path "/home/dak/tex/india/;/tmp"
|
`----
https://lists.gnu.org/r/auctex-devel/2017-11/msg00027.html
,----
| In other words: texmf.cnf has different rules than the kpsewhich command
| line.
`----

However, it seems that recent TeX Live accepts ";" even for kpsewhich
command. Here on my terminal, this works just fine (TeX Live 2021):
,----
| % kpsewhich --progname=latex --expand-path "~/texmf;/tmp"
| /home/keita/texmf:/tmp
`----

Thus maybe AUCTeX can now change the default value of
`TeX-kpathsea-path-delimiter' to ";" and announce to users who use old
TeX distribution where kpsewhich command doesn't accept ";" as path
delimiter that "Update your TeX distribution or customize
`TeX-kpathsea-path-delimiter'".

[ Paragraphs below are more suitable for auctex-devel@gnu.org than here
auctex@gnu.org in fact. ]

...Hmm. This Oscar's case made me aware that the following combination
doesn't work out of the box:
[a] Windows platform
[b] W32-native emacs binary
[c] TeX distribution on cygwin (no W32 TeX Live nor MikTeX)
[d] ELPA AUCTeX

First of all, ELPA AUCTeX has the following code in tex-site.el:
----------------------------------------------------------------------
;;; Code specific to ELPA packaging:

;; From preview-latex.el:

(defvar preview-TeX-style-dir
  (expand-file-name "latex" (file-name-directory load-file-name)))
----------------------------------------------------------------------
This code sets `preview-TeX-style-dir' to a value with drive letter
specifier such as
c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/auctex-13.1.1/latex
. Then `preview-set-texinputs' sets TEXINPUTS environment variable to a
value such as
.:c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/auctex-13.1.1/latex:
, or
.;c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/auctex-13.1.1/latex;
when `TeX-kpathsea-path-delimiter' is ";".

In both cases, cygwin kpathsea doesn't understand
c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/auctex-13.1.1/latex
part correctly.

In most cases, the user can overcome this difficulty by customizing
`preview-TeX-style-dir' to nil, which doesn't alter TEXINPUTS. The files
in that omitted directory (e.g., preview.sty) are available as part of
TeX Live installation, so it wouldn't hurt, other than the following
exceptional cases:
(1) TeX Live installation is old and AUCTeX needs updated preview.sty
    bundled with it.
(2) TeX Live installation scheme is too small that it doesn't contain
    preview.sty.

After all, ELPA AUCTeX should take care of such cases at this part?
----------------------------------------------------------------------
;;; Code specific to ELPA packaging:

;; From preview-latex.el:

(defvar preview-TeX-style-dir
  (expand-file-name "latex" (file-name-directory load-file-name)))
----------------------------------------------------------------------
If the user declares that "I use cygwin TeX distribution" by a certain
new customize option, AUCTeX converts windows-style path
c:/Users/xxxx/AppData/Roaming/.emacs.d/elpa/auctex-13.1.1/latex
into cygwin-style
/I/DONT/KNOW/EXACT/FORMAT/FOR/CYGWIN
...is it possible?

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine

(BTW, should AUCTeX also cover linux distribution on wsl, instead of
cygwin?)



reply via email to

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