Perltex が Perl モジュールを見つけられない

Perltex が Perl モジュールを見つけられない

私はWindows 10でTex LiveとStrawberry Perlを使用しています。私の最終的な目標は、この図に示すように、LaTeXでスプレッドシートからデータを取得できるようにすることでした。古い回答しかし、この時点では、追加のモジュールを使用してPerlコードを動作させようとしていますperltex。モジュールを使用しようとすると、perltex

! Package perltex Error: Can't locate Excel/Writer/XLSX.pm in @INC (you may need to 
install the Excel::Writer::XLSX module) (@INC contains:
 E:/Programmdateien /texlive/2019/tlpkg/tlperl/lib 
 E:/programmdateien/texlive/2019/tlpkg/tlperl/site/lib
 E:/programmdateien/texlive/2019/tlpkg/tlperl/lib) BEGIN failed--compilation 
aborted at (eval 13) line 6.
(perltex)                .

モジュールは確かに適切にインストールされています。Perl コードを問題なく実行でき、期待どおりの結果が得られるため、このことはわかっています。問題は、 を使用してビルドしようとした場合にのみ発生しますperltex

答え1

ローカルのtexmf.cnfに追加する

TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1

texmf.cnf ドキュメントより:

% This variable is specific to Windows.  It must be set to 0 or 1.  The
% default is 0.  Setting it to 1 tells the Windows script wrappers to
% use an already installed Perl interpreter if one is found on the
% search path, in preference to the Perl shipped with TeX Live.  Thus,
% it may be useful if you both (a) installed a full Perl distribution
% for general use, and (b) need to run Perl programs from TL that use
% additional modules we don't provide.  The TL Perl does provide all the
% standard Perl modules.

関連情報