diff options
Diffstat (limited to 'Master/texmf-dist/scripts/glossaries/glossaries.perl')
-rw-r--r-- | Master/texmf-dist/scripts/glossaries/glossaries.perl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/glossaries/glossaries.perl b/Master/texmf-dist/scripts/glossaries/glossaries.perl index d615d83ab08..ba6fdd5c5a8 100644 --- a/Master/texmf-dist/scripts/glossaries/glossaries.perl +++ b/Master/texmf-dist/scripts/glossaries/glossaries.perl @@ -1532,7 +1532,7 @@ sub do_cmd_glsnamefont{ sub do_cmd_newacronym{ local($_) = @_; - local($label,$abbrev,$long,$opt); + local($label,$abbrev,$long,$opt,$shortplural,$longplural); ($opt,$pat) = &get_next_optional_argument; @@ -1543,6 +1543,12 @@ sub do_cmd_newacronym{ $long = &missing_braces unless (s/$next_pair_pr_rx/$long=$2;''/eo); + ($longplural,$opt) = &get_keyval('longplural', $opt); + ($shortplural,$opt) = &get_keyval('shortplural', $opt); + + $longplural = $long.'s' unless ($longplural); + $shortplural = $abbrv.'s' unless ($shortplural); + local($cmd) = "\\newglossaryentry"; local($id); $id = ++$global{'max_id'}; @@ -1558,9 +1564,9 @@ sub do_cmd_newacronym{ $id = ++$global{'max_id'}; $entry .= "first=$OP$id$CP$long ($abbrv)$OP$id$CP,"; $id = ++$global{'max_id'}; - $entry .= "plural=$OP$id$CP${abbrv}s$OP$id$CP,"; + $entry .= "plural=$OP$id$CP$shortplural$OP$id$CP,"; $id = ++$global{'max_id'}; - $entry .= "firstplural=$OP$id$CP${long}s (${abbrv}s)$OP$id$CP"; + $entry .= "firstplural=$OP$id$CP$longplural ($shortplural)$OP$id$CP"; $id = ++$global{'max_id'}; $cmd .= "$OP$id$CP$entry,$opt$OP$id$CP"; |