# How to configure TexStudio editor to use Xindy?

I am using TexStudio editor for LaTeXing, I want to use Xindy engine though for indexing, in the commands of TexStudio, I found there is a default command for texdindy as in the image below. But how to use xindy then? Do I have to use xindy explicitly in texstudio or texindy will do the job? is there any possibility also to assign a dedicated key for using xindy and how to generate an index with that?
I hope the answer would contain a MWE showing the goodies of xindy by using TexStudio editor, with some explanation of how to make sure that xindy, and not other default engines like makeindex, is doing the sorting and collating job.

Notes:

• I am using TexStudio 2.5.2 version
• xindy does not come with MikTeX distribution, you have to install it manually, here is a post for that, although I didn't make it myself, that's why I installed TexLive distribution instead, xindy ships already, and you don't need to install perl separately if you are using windows, or even bother yourself with any other stuff.

-
Under “Build” you can change the “Default Index Tool” to txs:///texindy after changing the texindy.exe command to Xindy. I’m sure, an MWE from the manual or from this site is already available to test it. A short-cut can be assign via “Shortcuts” → “Menus” → “Tools” → “Index” (which uses the index tool selected under “Build”) or → “Commands” → “TexIndy”. If you don’t want to overwrite the “TexIndy” spot, you can always create a “User Command” under “Build”. – Qrrbrbirlbel Jun 12 '13 at 16:37
@Qrrbrbirlbel, i did that but this error appeared:Process started: xindy.exe .....<truncated>....imes) -I / --input-markup (supported: latex, omega, xindy) C:\texlive\2012\bin\win32\runscript.tlu:591: command failed with exit code 1: perl.exe c:/texlive/2012/texmf/scripts/xindy/xindy.pl Process exited with error(s) – doctorate Jun 12 '13 at 17:07
@Qrrbrbirlbel, but when I ran the xelatex -shell-escape <filename.tex> from command line, i got the index file. so how to configure texstudio to call the shell escape with xelatex? – doctorate Jun 12 '13 at 17:12
In that view in your image, scroo up, there are four lines (LaTeX, PdfLaTeX, XeLaTeX and LuaLaTeX), add -shell-escape to the command (just as you’d write it manually). – Qrrbrbirlbel Jun 12 '13 at 17:16

So this can be done in two steps thanks to Qrrbrbirlbel afterall, in order to call xindy for indexing:

1. Set texindy as your default index tool by going to optioins -> Configure TexStudio -> Build, Note: make sure to tick the show advanced options, as in the picture below:

2. You need to use the shell escape for xelatex or pdflatex, I use xelatex compilation engine for the pdf file, go to commands and add the -shell-escape as in the picture below:

Now it's time for Hello World experiment in a MWE, I borrowed one from here:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[finnish]{babel}
%\usepackage[utf8]{inputenc} % cannot be used with xelatex
\usepackage[texindy]{imakeidx}
\makeindex
\begin{document}
Hello world
\index{j\"allivaara}
\index{porvoo}
\index{kirjakielt\"a}
\index{sanota}
\index{vanhaa}
\printindex
\end{document}


Result:

-
\usepackage[texindy]{imakeidx} does it automatically. :) – Harish Kumar Jun 12 '13 at 23:58
@HarishKumar, but one should set texindy as a default tool, otherwise glossary won't show up. – doctorate Jun 13 '13 at 16:12