# How to add Latin Words into an index

I have the following in my preamble

\usepackage[latin, english]{babel}


(for proper hyphenation) and then

\newcommand{\latin}[1]{\foreignlanguage{latin}{\emph{#1}}}


when I write \latin{ultra vires} it prints correctly.

The issue I am having is if I wish to index this I can do

\latin{ultra vires}\index{ultra vires}


but this outputs without the latin italicised

Is there a way to index with it being printed in the index as it has in the body when i did \latin{ultra vires}

I hope this makes sense, I am new to LaTeX.

• Observe that not always \emph{} will produce the desired font. Try \textit{some \emph{latin here}}. – Sigur Oct 18 '18 at 14:21

You can make anything appear where you want it in an index, by using \index{<sorting position>@<formatted text>}
So for your example, you can input \index{ultra vires@\latin{ultra vires}}
\newcommand{\latinindex}[1]{\index{#1@\latin{#1}}}
• thanks \index{ultra vires@\latin{ultra vires}} didn't work with my setup but writing the new macro you suggested worked perfectly and resolved my problem. Thanks. – PeteMcD18 Oct 19 '18 at 15:17