This file is indexed.

/usr/share/perl5/LaTeXML/Package/acronym.sty.ltxml is in latexml 0.8.2-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
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# -*- mode: Perl -*-
# /=====================================================================\ #
# |  acronym                                                            | #
# | 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=/ #
package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;

#======================================================================
DefMacro('\acsfont{}',  '#1');
DefMacro('\acffont{}',  '#1');
DefMacro('\acfsfont{}', '#1');

DefConditional('\ifAC@footnote');
DefConditional('\ifAC@nohyperlinks');
DefConditional('\ifAC@printonlyused');
DefConditional('\ifAC@withpage');
DefConditional('\ifAC@smaller');
DefConditional('\ifAC@dua');    # dua = don't use acronmyms
DefConditional('\ifAC@nolist');
DefConditional('\ifAC@starred');

DefMacro('\AC@placelabel{}', '');
#======================================================================
# Whether an acronym is used or not
DefPrimitive('\lx@AC@used{}', sub {
    AssignValue('ACROUSED@' . ToString($_[1]) => 1, 'global'); });
DefPrimitive('\AC@logged{}', sub { });    # ???

DefMacro('\acused{}',      '\AC@logged{#1}');
DefMacro('\acronymused{}', '\AC@logged{#1}');
DefMacro('\acresetall',    '');                 # ????

DefMacro('\lx@AC@if{}{}{}', sub {
    my ($gullet, $id, $short, $long) = @_;
    my $key = 'ACROUSED@' . ToString($_[1]);
    if (LookupValue($key)) {
      $short->unlist; }
    else {
      AssignValue($key => 1, 'global');
      $long->unlist; } });

#======================================================================
# Acronyms in the Text

# NOTE: replacement of acronyms (short, long, whatever) should EXCLUDE \acroextra
# BUT those should be present in an acronym list!
# Acronym lists can (optionally) only include the acronyms actually used in the text!
DefConstructor('\AC@acs{}',
  "<ltx:glossaryref role='acronym' key='#1' show='short'/>");
DefConstructor('\AC@acl{}',
  "<ltx:glossaryref role='acronym' key='#1' show='long'/>");
DefConstructor('\AC@acsp{}',
  "<ltx:glossaryref role='acronym' key='#1' show='short-plural'/>");
DefConstructor('\AC@aclp{}',
  "<ltx:glossaryref role='acronym' key='#1' show='long-plural'/>");
DefConstructor('\AC@acsi{}',
  "<ltx:glossaryref role='acronym' key='#1' show='short-indefinite'/>");
DefConstructor('\AC@aclI{}',
  "<ltx:glossaryref role='acronym' key='#1' show='long-indefinite'/>");

# Short form
DefMacro('\acs OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acsa');
DefMacro('\acsa{}',              '\@acs{#1}');
DefMacro('\@acs{}',              '\acsfont{\AC@acs{#1}}\ifAC@starred\else\AC@logged{#1}\fi');

# Long form
DefMacro('\acl OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@acl');
DefMacro('\@acl{}',              '\acsfont{\AC@acl{#1}}\ifAC@starred\else\AC@logged{#1}\fi');

# Full form: Long (short)
DefMacro('\acf OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acfa');
DefMacro('\acfa{}',              '\@acf{#1}');
DefMacro('\@acf{}',
  '\ifAC@footnote\acsfont{\AC@acs{#1}}\footnote{\AC@placelabel{#1} \AC@acl{#1}}
  \else\acffont{\AC@placelabel{#1} \AC@acl{#1} \acfsfont{(\acsfont{\AC@acs{#1}})}}\fi
  \ifAC@starred\else\AC@logged{#1}\fi');

# Italicized long (short)

DefMacro('\acfi OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acfia');
DefMacro('\acfia{}',              '{\itshape\AC@acl{#1} }(\ifAC@starred\acs*{#1}\else\acs{#1}\fi)');

# Auto form
DefMacro('\ac OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@ac');
DefMacro('\@ac{}',
  '\lx@AC@if{#1}{\ifAC@starred\acs*{#1}\else\acs{#1}\fi}{\ifAC@starred\acf*{#1}\else\acf{#1}\fi}');

# Indefinite article form
DefMacro('\iac OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@iac');
DefMacro('\Iac OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@Iac');

DefMacro('\@iac{}', '\@iaci{#1} \ifAC@starred\ac*{#1}\else\ac{#1}\fi');
DefMacro('\@Iac{}', '\@firstupper{\@iaci{#1}} \ifAC@starred\ac*{#1}\else\ac{#1}\fi');
# \@firstupper
# \newcommand*{\@iaci}[1]{%
#    \ifcsname fn@#1@IL\endcsname
#      \ifAC@dua
#         \csname fn@#1@IL\endcsname%
#      \else
#         \expandafter\ifx\csname ac@#1\endcsname\AC@used%
#         \csname fn@#1@IS\endcsname%
#       \else
#         \csname fn@#1@IL\endcsname%
#       \fi
#      \fi
#    \else
#    a%
#    \fi

# Plural forms
DefMacro('\acsp OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acspa');
DefMacro('\acspa{}',              '\@acsp{#1}');
DefMacro('\@acsp{}',              '\acsfont{\AC@acsp{#1}}\ifAC@starred\else\AC@logged{#1}\fi');

DefMacro('\aclp OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@aclp');
DefMacro('\@aclp{}',              '\AC@aclp{#1}\ifAC@starred\else\AC@logged{#1}\fi');

DefMacro('\acfp OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acfpa');
DefMacro('\acfpa{}',              '\@acfp{#1}');
DefMacro('\@acfp{}',
  '\ifAC@footnote\acsfont{\AC@acsp{#1}}\footnote{\AC@placelabel{#1} \AC@aclp{#1}}
 \else\acffont{\AC@placelabel{#1} \AC@aclp{#1} \acfsfont{(\acsfont{\AC@acsp{#1}})}}\fi
  \ifAC@starred\else\AC@logged{#1}\fi');

DefMacro('\acp OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\@acp');
DefMacro('\@acp{}', '\lx@AC@if{#1}{\AC@acsp{#1}}{\AC@aclp{#1}}\ifAC@starred\else\AC@logged{#1}\fi');

DefMacro('\acsu OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\acsua');
DefMacro('\acsua{}',              '\ifAC@starred\acs*{#1}\else\acs{#1}\fi\acused{#1}');
DefMacro('\aclu OptionalMatch:*', '\ifx.#1.\AC@starredfalse\else\AC@starredtrue\fi\aclua');
DefMacro('\aclua{}',              '\ifAC@starred\acl*{#1}\else\acl{#1}\fi\acused{#1}');

#======================================================================
# Defining Acronyms
DefEnvironment('{acronym}[]',
  "<ltx:glossary role='acronym' class='ltx_acronym'>"
    . "<ltx:glossarylist>"
    . "#body"
    . "</ltx:glossarylist>"
    . "</ltx:glossary>",
  beforeDigest => sub { Let('\acro', '\lx@acro@item');
    Let('\acrodef', '\lx@acro@item'); });

DefMacro('\acroextra{}', '#1');

DefMacro('\lx@acro@phrase{}{}{}', '{\let\acroextra\@gobble\lx@@acro@phrase{#1}{#2}{#3}}');
# Let this float up, since it can be used within a glossarylist, but shouldn't end up there.
DefConstructor('\lx@@acro@phrase{}{}{}',
  "^ <ltx:glossaryphrase role='acronym' show='#1' key='#2'>#3</ltx:glossaryphrase>");

# \lx@acro@item{key}{short}{long}
DefMacro('\lx@acro@item{}[]{}',
  '\lx@acro@@item{#1}{\ifx.#2.#1\else#2\fi}{#3}');
DefMacro('\lx@acro@@item{}{}{}',
  '\lx@acro@@@item{#1}{#2}{#3}{{\let\acroextra\@gobble #2}}{{\let\acroextra\@gobble #3}}');
DefConstructor('\lx@acro@@@item{}{}{}{}{}',
  "<ltx:glossaryentry role='acronym' key='#1'>"
    . "<ltx:glossaryphrase show='label'>#2</ltx:glossaryphrase>"
    . "<ltx:glossaryphrase show='short'>#4</ltx:glossaryphrase>"
    . "<ltx:glossaryphrase show='long'>#5</ltx:glossaryphrase>"
    . "<ltx:glossarydefinition>#3</ltx:glossarydefinition>"
    . "</ltx:glossaryentry>");
Tag('ltx:glossaryentry', afterClose => sub { GenerateID(@_, ''); });

# Should these be allowed inside ltx:glossarylist, or float outside it?
DefConstructor('\acrodef{}[]{}',
  "<ltx:glossaryphrase role='acronym' key='#1' show='short'>?#2(#2)(#1)</ltx:glossaryphrase>"
    . "<ltx:glossaryphrase role='acronym' key='#1' show='long'>#3</ltx:glossaryphrase>",
bounded => 1, beforeDigest => sub { AssignValue(inPreamble => 0); });

Let('\newacro', '\acrodef');
Let('\acro',    '\acrodef');

# The following define additional forms of the acronym expansions.
# They should be recorded in the document & scanned in post-processing,
# but need not appear within the acronym glossary.
# Non-standard definite articles
DefMacro('\acrodefindefinite{}{}{}',
  '\lx@acro@phrase{short-indefinite}{#1}{#2}\lx@acro@phrase{long-indefinite}{#1}{#3}');

Let('\acroindefinite',    '\acrodefindefinite');
Let('\newacroindefinite', '\acrodefindefinite');

# Non-standard plural forms
DefMacro('\acrodefplural{}[]{}',
  '\lx@acro@phrase{short-plural}{#1}{\ifx.#2.#1\else#2\fi}\lx@acro@phrase{long-plural}{#1}{#3}');

Let('\acroplural',    '\acrodefplural');
Let('\newacroplural', '\acrodefplural');
#======================================================================
1;