| 1 |
%% |
| 2 |
%% This is file `lwarp-acro.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `acro') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
|
| 19 |
\LWR@ProvidesPackagePass{acro}[2019/10/12] |
| 20 |
|
| 21 |
\ExplSyntaxOn |
| 22 |
\NewDocumentCommand \LWR@DeclareAcronym {mm} |
| 23 |
{ |
| 24 |
\acro_declare_acronym:nn {#1} {#2} |
| 25 |
\catcode`\$=3% lwarp |
| 26 |
} |
| 27 |
\ExplSyntaxOff |
| 28 |
|
| 29 |
\RenewDocumentCommand{\DeclareAcronym}{}{ |
| 30 |
\catcode`\$=\active% lwarp |
| 31 |
\LWR@DeclareAcronym |
| 32 |
} |
| 33 |
\ExplSyntaxOn |
| 34 |
\cs_new_protected:Npn \LWR@HTML@acro_dot_fill: {\dots\space} |
| 35 |
\LWR@formatted{acro_dot_fill:} |
| 36 |
\ExplSyntaxOff |
| 37 |
\ExplSyntaxOn |
| 38 |
\IfPackageAtLeastTF{acro}{2020/04/29}% |
| 39 |
{}% v3 or later |
| 40 |
{% before v3 |
| 41 |
\IfPackageAtLeastTF{acro}{2019/09/23}% |
| 42 |
{% v2.10 or later |
| 43 |
\cs_gset_protected:Npn \__acro_typeset:nn #1#2 |
| 44 |
{ |
| 45 |
\mode_if_horizontal:F { \leavevmode } |
| 46 |
\group_begin: |
| 47 |
\use:x |
| 48 |
{ |
| 49 |
\bool_if:cTF {l__acro_custom_#1_format_bool} |
| 50 |
{ \exp_not:v {l__acro_custom_#1_format_tl} } |
| 51 |
{ \exp_not:v {l__acro_#1_format_tl} } |
| 52 |
{\exp_not:N\LWR@textcurrentfont{#2}}% lwarp |
| 53 |
} |
| 54 |
\group_end: |
| 55 |
} |
| 56 |
|
| 57 |
\cs_gset_protected:Npn \__acro_ending_format:nn #1#2 |
| 58 |
{ |
| 59 |
\bool_if:NTF \l__acro_include_endings_format_bool |
| 60 |
{ |
| 61 |
\str_case:nn {#1} |
| 62 |
{ |
| 63 |
{long} |
| 64 |
{ |
| 65 |
\bool_if:NTF \l__acro_custom_long_format_bool |
| 66 |
{ \l__acro_custom_long_format_tl } |
| 67 |
{ |
| 68 |
\bool_if:NTF \l__acro_first_instance_bool |
| 69 |
{ \l__acro_first_long_format_tl } |
| 70 |
{ \l__acro_long_format_tl } |
| 71 |
} |
| 72 |
} |
| 73 |
{short} |
| 74 |
{ |
| 75 |
\bool_if:NTF \l__acro_custom_short_format_bool |
| 76 |
{ \l__acro_custom_short_format_tl } |
| 77 |
{ \l__acro_short_format_tl } |
| 78 |
} |
| 79 |
{alt} |
| 80 |
{ |
| 81 |
\bool_if:NTF \l__acro_custom_alt_format_bool |
| 82 |
{ \l__acro_custom_alt_format_tl } |
| 83 |
{ \l__acro_alt_format_tl } |
| 84 |
} |
| 85 |
} |
| 86 |
} |
| 87 |
{ \use:n } |
| 88 |
{\exp_not:N\LWR@textcurrentfont{#2}}% lwarp |
| 89 |
} |
| 90 |
}% v2.10 or later |
| 91 |
{% before v2.10 |
| 92 |
\cs_gset_protected:Npn \acro_write_short:nn #1#2 |
| 93 |
{ |
| 94 |
\mode_if_horizontal:F { \leavevmode } |
| 95 |
\group_begin: |
| 96 |
\bool_if:NTF \l__acro_custom_format_bool |
| 97 |
{ \l__acro_custom_format_tl } |
| 98 |
{ \l__acro_short_format_tl } |
| 99 |
{\LWR@textcurrentfont{#2}}% lwarp |
| 100 |
\group_end: |
| 101 |
} |
| 102 |
|
| 103 |
\cs_gset_protected:Npn \acro_write_alt:nn #1#2 |
| 104 |
{ |
| 105 |
\mode_if_horizontal:F { \leavevmode } |
| 106 |
\group_begin: |
| 107 |
\bool_if:NTF \l__acro_custom_format_bool |
| 108 |
{ \l__acro_custom_format_tl } |
| 109 |
{ \l__acro_alt_format_tl } |
| 110 |
{\LWR@textcurrentfont{#2}}% lwarp |
| 111 |
\group_end: |
| 112 |
} |
| 113 |
|
| 114 |
\cs_gset_protected:Npn \acro_write_long:nn #1#2 |
| 115 |
{ |
| 116 |
\mode_if_horizontal:F { \leavevmode } |
| 117 |
\group_begin: |
| 118 |
\bool_if:NTF \l__acro_custom_long_format_bool |
| 119 |
{ \l__acro_custom_long_format_tl } |
| 120 |
{ \use:n } |
| 121 |
{ |
| 122 |
\use:x |
| 123 |
{ |
| 124 |
\exp_not:n {#1} |
| 125 |
{ |
| 126 |
\bool_if:NTF \l__acro_first_upper_bool |
| 127 |
{ \exp_not:N \__acro_first_upper_case:n { \exp_not:n { |
| 128 |
\LWR@textcurrentfont{#2}% lwarp |
| 129 |
} } } |
| 130 |
{ \exp_not:n {\LWR@textcurrentfont{#2}} }% lwarp |
| 131 |
} |
| 132 |
} |
| 133 |
} |
| 134 |
\group_end: |
| 135 |
} |
| 136 |
}% before v2.10 |
| 137 |
}% before v3 |
| 138 |
\ExplSyntaxOff |
| 139 |
|
| 140 |
|
| 141 |
\endinput |
| 142 |
%% |
| 143 |
%% End of file `lwarp-acro.sty'. |