Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID60
StatusClosed (Not a Bug)
Categoryglossaries
Version4.07
Summarysome problems by using glossaries package

Report

I am trying to upgrade my latex codes, to new glossaries version (4.07). But still have several warnings, that can't remove them. 1- "Package glossaries Warning: sanitize={name} package option deprecated on input". In my document, if I remove "sanitize={name=false}" from package options, the name and plural of the last word repeats instead of all name and plural of all other words in my glossaries. 2- "package glossaries Warning: Deprecated command \glossarystyle.", I remove the line in my code, but still see this warning in the log file.

MWE

\documentclass{book}

\usepackage{hyperref}

\usepackage[sanitizesort=false,xindy,acronym]{glossaries}

%% The pack­age sup­ports Per­sian type­set­ting, us­ing the Per­sian Modern fonts, by de­fault.
\usepackage{xepersian}


%% ================================= Glossaries setting
\makeatletter
\let\oldglspl\glspl
\let\oldsglspl\sglspl
\let\oldglsuseri\glsuseri
\let\oldnewglossaryentry\newglossaryentry

%% Persian to English glossary style
\newglossarystyle{mylistFa}{
%	\glossarystyle{list}
	\renewenvironment{theglossary}{}{}
	\renewcommand*{\glossaryheader}{}
	\renewcommand*{\glsgroupheading}[1]{\vskip 12mm\section*{  \glsgetgrouptitle{##1}} }
	\renewcommand*{\glsgroupskip}{}
	\renewcommand*{\glossaryentryfield}[5]     {\noindent \Glsentryname{##1} \dotfill \space \Glsentryplural{##1} \vskip 0mm}
	\renewcommand*{\glossarysubentryfield}[6]{\glossaryentryfield{##2}{##3}{##4}{##5}{##6}}
}%

%% English to Persian glossary style
\newglossarystyle{mylistEn}{
%	\glossarystyle{list}
	\renewenvironment{theglossary}{}{}
	\renewcommand*{\glossaryheader}{}
	\renewcommand*{\glsgroupheading}[1]{\vskip 12mm\begin{LTR} \section*{\lr{\glsgetgrouptitle{##1}}} \end{LTR}}
	\renewcommand*{\glsgroupskip}{}
	\renewcommand*{\glossaryentryfield}[5] {\noindent \Glsentryplural{##1}  \dotfill \space  \Glsentryname{##1} \vskip 0mm}
	\renewcommand*{\glossarysubentryfield}[6]{\glossaryentryfield{##2}{##3}{##4}{##5}{##6}}
}%


\newglossary[glg]{english}{gls}{glo}{واژه‌نامه انگلیسی به فارسی}
\newglossary[blg]{persian}{bls}{blo}{واژه‌نامه فارسی به انگلیسی}


\def\@plpl{plural}
\renewcommand{\newglossaryentry}[2]{%
	\setkeys{glossentry}{#2}%
	\let\thename\@glo@name
	\let\theplural\@glo@plural
	\let\thedesc\@glo@desc
	\ifx\@glo@type\@plpl
		\oldnewglossaryentry{#1}{name={\lr{\thename}} ,plural={\theplural} , description = {\thedesc}}
	\else
		\oldnewglossaryentry{fa-#1}{type = persian,  name={\theplural},  plural={\lr{\thename}} , description={\thedesc}}
		\oldnewglossaryentry{#1}{type = english,  name={\lr{\thename}} ,plural={\theplural} , description = {\thedesc}}	
	\fi	
}%

\makeglossaries
\glsdisablehyper

%% make footnote in the first place
\defglsentryfmt[english]{\glsgenentryfmt\ifglsused{\glslabel}{}{\LTRfootnote{\glsentryname{\glslabel}}}}

\renewrobustcmd*{\glspl}{\@ifstar\@msglspl\@mglspl}
\newcommand*{\@mglspl}[1] {\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\oldglspl{#1}\oldglsuseri{fa-#1}}{\oldglspl{#1}}}
\newcommand*{\@msglspl}[1]{\ifthenelse{\equal{\glsentrytype{#1}}{english}}{\glsentryplural{#1}\oldglsuseri{#1}\oldglsuseri{fa-#1}}{\oldglspl{#1}}}

\makeatother

%% ================================= Define words and abbr
\newglossaryentry{Accuracy}
{name={Accuracy}, 
plural={دقت},
description={}
}

\newglossaryentry{Actions}
{name={Actions}, 
plural={کنش‌ها},
description={}
}


\begin{document}


با سلام این یک مثال از وارد کردن ‎\glspl{Accuracy}‎ است. این هم یک مثال است با وارد کردن واژه ‎\glspl{Actions}‎ و یک مثال از  ‎\glspl{Accuracy}‎‎ است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. وارد کردن  ‎\glspl{Actions}‎ این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. این یک مثال است. ا



\glossarystyle{mylistEn}
\printglossary[type=english]
	
\glossarystyle{mylistFa}
\printglossary[type=persian]

\end{document}

Evaluation

You can use \glssetexpandfield{name} to switch on the name key expansion (but make sure you protect fragile commands). It's likely that it's the lack of expansion that's causing the repetition of all the name fields. To remove the warning
Package glossaries Warning: Deprecated command \glossarystyle.
 I recommend you switch to \setglossarystyle unless you want to maintain backward compatibility
just replace \glossarystyle with \setglossarystyle.

Closed because warning messages aren't bugs and the expansion needs to be switched on.

Add comment.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs