0

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
1

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}}

You probably want to write a macro for this - for example

\newcommand{\latinindex}[1]{\index{#1@\latin{#1}}}

| improve this answer | |
  • 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

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.