/usr/share/perl5/LaTeXML/Package/pifont.sty.ltxml is in latexml 0.7.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | # -*- CPERL -*-
# /=====================================================================\ #
# | pifont | #
# | Implementation for LaTeXML | #
# |=====================================================================| #
# | Part of LaTeXML: | #
# | Public domain software, produced as part of work done by the | #
# | United States Government & not subject to copyright in the US. | #
# |---------------------------------------------------------------------| #
# | Bruce Miller <bruce.miller@nist.gov> #_# | #
# | http://dlmf.nist.gov/LaTeXML/ (o o) | #
# \=========================================================ooo==U==ooo=/ #
use strict;
use LaTeXML::Package;
package LaTeXML::Package::Pool;
sub dingbat_map {
my($code)=@_;
pack('U',$code+0x2700); }
our %PIFONT_MAP = (pzd=>\&dingbat_map);
sub pichar {
my($pifont,$number)=@_;
$pifont = ToString($pifont);
$number = $number->valueOf if ref $number;
if(my $mapper = $PIFONT_MAP{$pifont}){
&$mapper($number); }
else {
Error(":undefined:$pifont Unknown pi font $pifont");
"?"; }}
DefConstructor('\Pisymbol{}{Number}', sub {
my($document,$pifont,$code,%props)=@_;
$document->openText(pichar($pifont,$code),$props{font}); });
DefConstructor('\pilist@item[]',
"<ltx:item xml:id='#id'><ltx:tag>#refnum</ltx:tag>",
properties=>sub{
(RefStepItemCounter(),
refnum=>pichar(LookupValue('pilist_pifont'),
LookupValue('pilist_base'))); });
DefConstructor('\piautolist@item[]',
"<ltx:item xml:id='#id' refnum='#refnum'><ltx:tag>#refnum</ltx:tag>",
properties=>sub{
my $lvl = ToString(Tokens(roman(LookupValue('itemlevel'))));
(RefStepItemCounter(),
refnum=>pichar(LookupValue('pilist_pifont'),
LookupValue('pilist_base')
+LookupValue('\c@enum'.$lvl)->valueOf)); });
DefEnvironment('{Pilist}{}{Number}',
"<ltx:itemize xml:id='#id'>#body</ltx:itemize>",
beforeDigest=>sub { beginItemize('pilist'); },
afterDigestBegin=>sub {
AssignValue(pilist_pifont=>ToString($_[1]->getArg(1)));
AssignValue(pilist_base =>$_[1]->getArg(2)->valueOf); },
properties=>sub { RefStepCounter('@itemize'); });
DefEnvironment('{Piautolist}{}{Number}',
"<ltx:itemize xml:id='#id'>#body</ltx:itemize>",
beforeDigest=>sub { beginItemize('piautolist'); },
afterDigestBegin=>sub {
AssignValue(pilist_pifont=>ToString($_[1]->getArg(1)));
AssignValue(pilist_base =>$_[1]->getArg(2)->valueOf); },
properties=>sub { RefStepCounter('@itemize'); });
# Don't know what to do with these.
DefPrimitive('\Piline{}{Number}',undef);
DefPrimitive('\Pifill{}{Number}',undef);
DefMacro('\ding{}','\Pisymbol{pzd}{#1}');
DefEnvironment('{dinglist}{Number}',
"<ltx:itemize xml:id='#id'>#body</ltx:itemize>",
beforeDigest=>sub { beginItemize('pilist'); },
afterDigestBegin=>sub {
AssignValue(pilist_pifont=>'pzd');
AssignValue(pilist_base =>$_[1]->getArg(1)->valueOf); },
properties=>sub { RefStepCounter('@itemize'); });
DefEnvironment('{dingautolist}{Number}',
"<ltx:itemize xml:id='#id'>#body</ltx:itemize>",
beforeDigest=>sub { beginItemize('piautolist'); },
afterDigestBegin=>sub {
AssignValue(pilist_pifont=>'pzd');
AssignValue(pilist_base =>$_[1]->getArg(1)->valueOf); },
properties=>sub { RefStepCounter('@itemize'); });
# Don't know what to do with these.
DefPrimitive('\dingline{Number}',undef);
DefPrimitive('\dingfill{Number}',undef);
1;
|