Bug Tracker RSS feed

I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)

ID 60🔗
Date: 2014-05-12 00:06:22
Status Closed (Not a Bug)
Category glossaries
Version 4.07
Summary some problems by using glossaries package
OS Linux ubunutu 14.4

Sign in to subscribe to notifications about this report.

Description

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

Download (3.91K)

\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.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

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

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

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=60