From da1cdc98ee437aab0f962bae0e48a6b02a0b27c2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 11 Mar 2014 22:16:52 +0000 Subject: glossaries (9mar14) git-svn-id: svn://tug.org/texlive/trunk@33153 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/glossaries/glossaries.perl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/scripts') 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"; -- cgit v1.2.3