package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;

RequirePackage('xparse');

DefPrimitive('\csname stex_kpsewhich:Nn\endcsname Token {}',sub {
    my ($stomach, $target, $value) = @_;
    $value = ToString(Expand($value));
    my $out = ToString(`kpsewhich $value`);
    $out =~ s/^\s+//;
    $out =~ s/\s+$//;
    Note("Here: $value => $out");
    my @ret = Explode($out);
    DefMacroI($target, undef, Tokens(@ret));
},locked=>1);

\DefMacroI('\stex@backend',undef,Explode("latexml"));

InputDefinitions('stex', type => 'sty', noltxml => 1);

1;