Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've got a problem because I need to work with XeLaTeX to typeset in Brill fonts and would very much like to use imakeidx to have my two indexes/indices. What should I do?

This is my code:

% XeLaTeX can use any Mac OS X font. See the setromanfont command below.
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.

% The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[11pt]{book}
\usepackage{ledmac}
\usepackage{fancyhdr}
\pagestyle{myheadings}
\usepackage{hanging}
\textheight = 180.5 mm
\textwidth = 108.5 mm
\pagenumbering{arabic}

\usepackage{imakeidx} 
\makeindex[name=nominum, title=Index nominum, columns=2]
\makeindex[name=rerum, title=Index rerum, columns=2]


\input{style}
\raggedbottom


\newcommand*{\LeftWidth}{3.0cm}%
\newcommand*{\RightWidth}{\dimexpr\linewidth-\LeftWidth-2em\relax}%
\newcommand{\AlignedBrace}[2]{%
    \medskip\par\noindent%
    \parbox{\LeftWidth}{\raggedleft\textbf{#1}\strut~}%
    $\left\{~\parbox{\RightWidth}{\strut\textit{#2}\strut}\right.$%
}%


%\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
%\geometry{a4paper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
%\renewcommand %These two commands are for double-spacing
%\baselinestretch{2}

% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Brill}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}
\frenchspacing


\begin{document}
................................
\backmatter
\printindex[nominum]
\printindex[rerum]
\end{document}

And this is the log file:

! Undefined control sequence.
\imki@decide ...ndexname \ifnum \imki@shellescape 
                                                  =\tw@ \@tempswatrue \fi \f...
l.7465 \printindex[nominum]

? ! Missing number, treated as zero.
<to be read again> 
                   =
l.7465 \printindex[nominum]

? ! Undefined control sequence.
\imki@decide ... \fi \fi \ifnum \imki@shellescape 
                                                  =\@ne \@tempswatrue \fi \f...
l.7465 \printindex[nominum]

? ! Missing number, treated as zero.
<to be read again> 
                   =
l.7465 \printindex[nominum]

? (./nominum.ind) [165] [166]
! Undefined control sequence.
\imki@decide ...ndexname \ifnum \imki@shellescape 
                                                  =\tw@ \@tempswatrue \fi \f...
l.7466 \printindex[rerum]

? ! Missing number, treated as zero.
<to be read again> 
                   =
l.7466 \printindex[rerum]

? ! Undefined control sequence.
\imki@decide ... \fi \fi \ifnum \imki@shellescape 
                                                  =\@ne \@tempswatrue \fi \f...
l.7466 \printindex[rerum]

? ! Missing number, treated as zero.
<to be read again> 
                   =
l.7466 \printindex[rerum]

? (./rerum.ind)

Package imakeidx Warning: Remember to run xelatex again after calling
(imakeidx)                `makeindex nominum.idx'
(imakeidx)                or call xelatex with -shell-escape.


Package imakeidx Warning: Remember to run xelatex again after calling
(imakeidx)                `makeindex rerum.idx'
(imakeidx)                or call xelatex with -shell-escape.

[167] (./medlyeM2.aux) )
Output written on medlyeM2.pdf (189 pages).
Transcript written on medlyeM2.log.
share|improve this question
1  
You're going to need to enable --shell-escape to allow this to work (it's a potential security exposure). I'm afraid I don't know enough details to provide a better answer... – Brent.Longborough Jul 21 '12 at 17:48
Thanks Brent. I've just seen this to enable shell escape: scrolls.mafgani.net/2011/03/latex-shell-escape \documentclass{article} \begin{document} \immediate\write18{date > tmpdate.tex} \input{tmpdate} \immediate\write18{rm tmpdate.tex} \end{document} Does this work? – Guillaume Coatalen Jul 21 '12 at 19:13
1  
I don't get any error; I tried with TeX Live 2010, 2011 and 2012, without enabling shell-escape. Please add information about your TeX distribution and also the version of imakeidx you're using. – egreg Jul 21 '12 at 23:50
Silly me: I've got Tex Live 2007! – Guillaume Coatalen Jul 22 '12 at 10:45

closed as too localized by percusse, lockstep, diabonas, Marco Daniel, Joseph Wright Sep 1 '12 at 21:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.