3

I'm using imakeidx and polyglossia packages, main language: french.

I have a nice small index with some \see commands. But the word “voir“ (“see“ in french) printed in the document is not in italics.

I tried out the commands below in the preamble:

\newcommand*\see[2]{\emph{\seename} #1}

or

\renewcommand*{\seename}{\emph{voir}}

but nothing changes.

I made a test by changing the main language to english, and it works well with “see” in italics.

Could someone kindly help me ? Thanks

PS : here is a minimal example…

\documentclass[12pt]{scrreprt}
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase]
\usepackage{xunicode}
\usepackage{polyglossia}
\setmainlanguage{french}

\usepackage{imakeidx} \makeindex

\begin{document}

Bla bla bla\index{word-A}.

\index{word-AA|see{word-A}}
\printindex

\end{document}
2
  • Use this in your preamble: \def\see{\emph{voir}~}.
    – Bernard
    Jan 10 '21 at 20:47
  • @Bernard Thanks for your suggestion, but the inconvenient about this solution is that it adds a page number to the "see" index entry, which is not the desired behavior. But I realized that maybe I didn't expressed myself correctly, because the problem here is not about the \see command, as I said, but the \index command with the following syntax:\index{a|see{b}}. Sorry about it. Jan 11 '21 at 8:48
2

It is a bug in gloss-french.ldf, which has

\def\seename{\emph{voir}}%
\def\alsoname{\emph{voir aussi}}%

in the code for \captionsfrench. The \emph should be removed, because it is already in the standard definition of \see.

What happens is that \see{word-A}{1} in the .ind file becomes, according to the standard definition of \see,

\emph{\seename} word-A

which in turn becomes

\emph{\emph{voir}} word-A

and double emphasis chooses upright type. You can choose one of the following fixes:

  1. \appto\captionsfrench{\def\seename{voir}\def\alsoname{voir aussi}}
  2. \renewcommand{\see}[2]{\seename\ #1}

The former method fixes the wrong setting made by polyglossia; the latter just avoids double emphasis.

2
  • Thanks for your explanations and the proposed solutions. The fix number 1 works perfectly ! However the fix number 2 deletes the space after "voir". Maybe the reason is that the problem here is not exactly about the \see command (see above my reply to Bernard)... Jan 11 '21 at 8:55
  • @gabrielpdp1979 Yes, you're right! A backslash was missing.
    – egreg
    Jan 11 '21 at 9:02

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.