1

I'm doing a bilingual dictionnary english-arabic, using the glossaries package, with the option entrycounter.

I define two kinds of entries, by \newglossaryentry{adic-#1} and \newglossaryentry{edic-#1}, for arabic and english words, respectively, and I use it to sort two dictionaries, one sorted by the arabic entries and one sorted by the english ones.

The glslink is defined by the command \defglsentryfmt, is given by the value of the entrycounter for the arabic glossary.

When I generate the two glossaries (by the usual way in command prompt ...):

%% Arabic glossary
makeindex -s filename.ist -t filename.aoc -o filename.aox filename.aoo
%% English glossary
makeindex -s filename.ist -t filename.eoc -o filename.eox filename.eoo

I obtain two glossaries, with numbered entries, (The output is in Right-to-Left form) and I have some problems in the appearence of the two glossaries:

1) The first problem is that I want only the arabic glossary numbered, i.e. I want to find an option which eliminates, in the second glossary sorted by english entries, the numbers from 6. to 10. in bold in my ECM, joint here.

How can I obtain the entries sorted in arabic glossary with counter numbers and without counter numbers for the second glossary, sorted by english entries ?

2) I want to put my glossaries in twocolumn form and one can see that the number of entry (in arabic glossary) is always on the right margin, for the twoculumns so my question is:

How can I put the entrynumber on the left margin in the left column, and on the rightmargin in the right column ?

3) I think that the distance between the entrynumber and the glossary enter is strong, and I want to reduce it.

How can I control the indent between the entrynumber and the glossary enter ?

4) Same question for the indent between the beginning of the column of glossaries (so the beginning of the rule under the enters) and the glossaries enter.

How can I control this distance?

Here is the .tex file I use:

\documentclass{article}

\usepackage{fmultico} %% Right-to-Left doublecolumn
\usepackage{geometry}
\geometry{paperwidth=165mm, paperheight=140mm, top=5mm, bottom=5mm}
\pagestyle{empty}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  ORGANIZE ENTRIES AND GLOSSARIES OF FOOTNOTES
\usepackage[entrycounter,nomain,nonumberlist]{glossaries}
\renewcommand*{\glspostdescription}{}
%%Glossary of footnotes
\newglossary[aoc]{ARDico}{aox}{aoo}{\LR{Sort by arabic entries}}
\newglossary[eoc]{EngDico}{eox}{eoo}{\LR{Sort by english entries}}
\makeglossaries

\newcommand*{\entrydico}[2]
{%
    \newglossaryentry{edic-#1}{type=EngDico,name={},sort={#1},
    description={\LR{\begin{tabular}{p{2 cm}p{2 cm}}
        #1 & \hfill\glsrefentry{adic-#1}\\
        \hline 
                \end{tabular}}} }
    \newglossaryentry{adic-#1}{type=ARDico,name={},text={#2},sort={#2},
    description={\begin{tabular}{p{2 cm}p{2 cm}}
        #2 &\hfill #1\\
        \hline
                \end{tabular}}  }
}
%% The format of the output link
\defglsentryfmt[EngDico]{}
\defglsentryfmt[ARDico]{$^{\glsrefentry{\glslabel}}$}
%% Put the two languages gls in "2 in 1" command
\newcommand{\putgls}[1]{\gls{adic-#1}\gls{edic-#1}}

%% ENTRIES  
\entrydico{population}{مجتمع}
\entrydico{sample}{عينة}
\entrydico{probability}{احتمال}
\entrydico{statistic}{احصاء}
\entrydico{empirical}{تجريبي}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  END GLOSSARIES COMMANDS

%% Set languages
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\setmainfont[Script=Arabic,Scale=1.2]{Traditional Arabic}
%% can use every arabic font instead Traditional Arabic, like Arial or Scheherazade

\begin{document}

\LR{One must choose a sample\putgls{sample} from the population\putgls{population}
\vspace*{5mm}\\ 
Statistic\putgls{statistic} is  empirical\putgls{empirical} probability\putgls{probability}.
\vspace*{5mm}
\hrule
\vspace*{5mm}
\begin{multicols}{2}[]
\RL{\printglossary[type=ARDico]}
\end{multicols}
\vspace*{5mm}
\hrule
\vspace*{5mm}
\LTRdblcol
\begin{multicols}{2}[]
\printglossary[type=EngDico]
\end{multicols}

\end{document}

Here is the glossaries produced: enter image description here

EDIT 1

For the first question the solution, so simple, is to put the option entrycounters=false in the command \printglossary. I give what I obtain with this option

\printglossary[type=EngDico,entrycounter=false]

enter image description here

which is what I want

EDIT 2

For my question 4/, it's so simple too, with the simple command \hspace on the tabular of entries. I give the commands

\newcommand*{\entrydico}[2]
{%
    \newglossaryentry{edic-#1}{type=EngDico,name={},sort={#1},
    description={\LR{\begin{tabular}{p{2 cm}p{2 cm}}
        \hspace*{-6pt}#1 & \hfill\glsrefentry{adic-#1}\hspace*{-6pt}\\
        \hline 
                \end{tabular}}} }
    \newglossaryentry{adic-#1}{type=ARDico,name={},text={#2},sort={#2},
    description={\begin{tabular}{p{2 cm}p{2 cm}}
        \hspace*{-6pt}#2 &\hfill #1\hspace*{-6pt}\\
        \hline
                \end{tabular}}  }
}

which gives the following glossaries, better for me :

enter image description here

  • Try \printglossary[type=EngDico,entrycounter=false] (at least v4.08 required). Alternatively, omit the package option and use \printglossary[type=ARDico,entrycounter=true] (or just \printglossary[type=ARDico,entrycounter]). I don't have the fonts installed to test your example, but that should work. – Nicola Talbot Feb 4 '16 at 18:16
  • Many thanks @NicolaTalbot for the solution. What for my other questions ? (the number of entrycounters in the opposite margins and the indent between the numbers and the entries, and between the entries and the "beginning" of the columns – Faouzi Bellalouna Feb 4 '16 at 20:58
  • Would you see please my second edit for the question 4/ where I push the glossary entries using the command `\hspace*{-6pt}, and I still have another improvement to make for this question. One can see that the width of the glossary has a reduced width with respect to his title and I think that it will be better if the title of the glossary and the glossary itself have the same width. How can I control this ? – Faouzi Bellalouna Feb 4 '16 at 21:17
  • You need to ask each question as a separate post. The site isn't designed for multiple questions per post. (I'm not sure about your other questions. That requires some knowledge of multicols.) – Nicola Talbot Feb 5 '16 at 13:14
  • Ok thanks. I'll ask another question for the appearence in twocolumn... and another one for sorting the entries by chapters. Many thanks – Faouzi Bellalouna Feb 5 '16 at 16:18
1

The entrycounter option can be switched on or off for a particular glossary using the optional argument of \printglossary. For example

\printglossary[entrycounter]

or

\printglossary[entrycounter=true]

or

\printglossary[entrycounter=false]

It's also possible to switch it on or off using \setupglossaries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.