1# -*- mode: Perl -*-
2# /=====================================================================\ #
3# |  pgfutils latexml driver                                            | #
4# | Implementation for LaTeXML                                          | #
5# |=====================================================================| #
6# | Part of LaTeXML:                                                    | #
7# |  Public domain software, produced as part of work done by the       | #
8# |  United States Government & not subject to copyright in the US.     | #
9# |---------------------------------------------------------------------| #
10# | Released to the Public Domain                                       | #
11# |---------------------------------------------------------------------| #
12# | Bruce Miller <bruce.miller@nist.gov>                        #_#     | #
13# | http://dlmf.nist.gov/LaTeXML/                              (o o)    | #
14# \=========================================================ooo==U==ooo=/ #
15
16package LaTeXML::Package::Pool;
17use strict;
18use warnings;
19
20#======================================================================
21# Load pgf's TeX code for util-common, first
22InputDefinitions('pgfutil-common', type => 'tex', noltxml => 1);
23
24# Overwrite macros of interest
25
26DefPrimitive('\pgfutil@in@{}{}', sub {
27    AssignValue('pgfutilin_args', [ToString($_[1]), ToString($_[2])]);
28    return; });
29
30DefConditional('\ifpgfutil@in@', sub {
31    my $args    = LookupValue('pgfutilin_args') || ['', ''];
32    my $element = $$args[0];
33    my $list    = $$args[1];
34    my $test    = (index($list, $element) != -1);
35    return $test; });
36
371;
38