Skip to main content
deleted 1434 characters in body
Source Link
Malo
  • 213
  • 2
  • 11

here is my question :

Can I modify the presentation of people's names in my index ?

Informations about my document

I am using the package imakeidx with xindy. I have two indexes, people's names in the principal one, and others in a second index called NC.

Peoples names get indexed in three ways :

  • by the option indexing=cite of biblatex
  • by the classical \index{Doe, John} command
  • by some personal commands

The commands look this way :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1}} \newcommand{\nx}[1]{\textsc{#1}\index{#1}} 

Everything is working fine in my index, except I have two problems :

First, The namethat the names appear in the index in this way : "Doe, John". IlI would like them to appear in this way : "DOE John" (DOE being in smallcaps like "\textsc{Doe} John" does)

If there is no first name (the reason why I have a \nx command), for example "Aristotle", I would like it to appear in small caps too.

Second, When the author name is a group, my entry in the biblatex file is looking this way :

author = {{Smart Think Tank}}, 

And the group's name appears in the people's names index. I would like it not to appear (so that I can index it manually in the other index if I want to) or to appear in the NC index.

A solution would be to modify my commands, for example to make something like :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1@\textsc{#2}, #1}} 

But this doesn't work, because when the index entries are coming from the "indexing=cite" option in biblatex, they won't be indexed in small caps, and so they will appear separately according to the way they have been indexed by.

I see two possible solutions, but I don't know how to make any of them :

  • specifying an option to biblatex so that it indexes the names with the small caps already.
  • leaving everything without small caps when writing the document, and adding an order to modify the presentation at the end, when printing the index in the pdf.

Such order would be somethnig like :

  • if entry looks like "Doe, John", then make it like "\textsc{Doe}, John"
  • if entry looks like "Aristotle", then make it like "\textsc{Aristotle}"
  • if entry looks like "SMART THINK TANK", then get it away from the index

And it should not affect my second index, called NC.

Any idea how I could do that ?

Thanks

here is my question :

Can I modify the presentation of people's names in my index ?

Informations about my document

I am using the package imakeidx with xindy. I have two indexes, people's names in the principal one, and others in a second index called NC.

Peoples names get indexed in three ways :

  • by the option indexing=cite of biblatex
  • by the classical \index{Doe, John} command
  • by some personal commands

The commands look this way :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1}} \newcommand{\nx}[1]{\textsc{#1}\index{#1}} 

Everything is working fine in my index, except I have two problems :

First, The name appear in the index in this way : "Doe, John". Il would like them to appear in this way : "DOE John" (DOE being in smallcaps like "\textsc{Doe} John" does)

If there is no first name (the reason why I have a \nx command), for example "Aristotle", I would like it to appear in small caps too.

Second, When the author name is a group, my entry in the biblatex file is looking this way :

author = {{Smart Think Tank}}, 

And the group's name appears in the people's names index. I would like it not to appear (so that I can index it manually in the other index if I want to) or to appear in the NC index.

A solution would be to modify my commands, for example to make something like :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1@\textsc{#2}, #1}} 

But this doesn't work, because when the index entries are coming from the "indexing=cite" option in biblatex, they won't be indexed in small caps, and so they will appear separately according to the way they have been indexed by.

I see two possible solutions, but I don't know how to make any of them :

  • specifying an option to biblatex so that it indexes the names with the small caps already.
  • leaving everything without small caps when writing the document, and adding an order to modify the presentation at the end, when printing the index in the pdf.

Such order would be somethnig like :

  • if entry looks like "Doe, John", then make it like "\textsc{Doe}, John"
  • if entry looks like "Aristotle", then make it like "\textsc{Aristotle}"
  • if entry looks like "SMART THINK TANK", then get it away from the index

And it should not affect my second index, called NC.

Any idea how I could do that ?

Thanks

here is my question :

Can I modify the presentation of people's names in my index ?

Informations about my document

I am using the package imakeidx with xindy. I have two indexes, people's names in the principal one, and others in a second index called NC.

Peoples names get indexed in three ways :

  • by the option indexing=cite of biblatex
  • by the classical \index{Doe, John} command
  • by some personal commands

The commands look this way :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1}} \newcommand{\nx}[1]{\textsc{#1}\index{#1}} 

Everything is working fine in my index, except that the names appear in the index in this way : "Doe, John". I would like them to appear in this way : "DOE John" (DOE being in smallcaps like "\textsc{Doe} John" does)

If there is no first name (the reason why I have a \nx command), for example "Aristotle", I would like it to appear in small caps too.

Any idea how I could do that ?

Thanks

Source Link
Malo
  • 213
  • 2
  • 11

formatting names in an index so that they appear in small caps

here is my question :

Can I modify the presentation of people's names in my index ?

Informations about my document

I am using the package imakeidx with xindy. I have two indexes, people's names in the principal one, and others in a second index called NC.

Peoples names get indexed in three ways :

  • by the option indexing=cite of biblatex
  • by the classical \index{Doe, John} command
  • by some personal commands

The commands look this way :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1}} \newcommand{\nx}[1]{\textsc{#1}\index{#1}} 

Everything is working fine in my index, except I have two problems :

First, The name appear in the index in this way : "Doe, John". Il would like them to appear in this way : "DOE John" (DOE being in smallcaps like "\textsc{Doe} John" does)

If there is no first name (the reason why I have a \nx command), for example "Aristotle", I would like it to appear in small caps too.

Second, When the author name is a group, my entry in the biblatex file is looking this way :

author = {{Smart Think Tank}}, 

And the group's name appears in the people's names index. I would like it not to appear (so that I can index it manually in the other index if I want to) or to appear in the NC index.

A solution would be to modify my commands, for example to make something like :

\newcommand{\n}[2]{#1~\textsc{#2}\index{#2, #1@\textsc{#2}, #1}} 

But this doesn't work, because when the index entries are coming from the "indexing=cite" option in biblatex, they won't be indexed in small caps, and so they will appear separately according to the way they have been indexed by.

I see two possible solutions, but I don't know how to make any of them :

  • specifying an option to biblatex so that it indexes the names with the small caps already.
  • leaving everything without small caps when writing the document, and adding an order to modify the presentation at the end, when printing the index in the pdf.

Such order would be somethnig like :

  • if entry looks like "Doe, John", then make it like "\textsc{Doe}, John"
  • if entry looks like "Aristotle", then make it like "\textsc{Aristotle}"
  • if entry looks like "SMART THINK TANK", then get it away from the index

And it should not affect my second index, called NC.

Any idea how I could do that ?

Thanks