I would like to make a Norwegian index for a book. Is there a MWE which can help me?
Asked
Active
Viewed 69 times
0
1 Answers
3
Run with shell escape enabled or run
xindy -M texindy -L norwegian -C utf8 <filename>.idx
after a LaTeX run.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[norsk]{babel}
\usepackage[xindy]{imakeidx}
\makeindex[options=-M texindy -L norwegian -C utf8]
\begin{document}
xyz
\index{henne}
\index{selv}
\index{denne}
\index{før}
\index{slik}
\index{gikk}
\index{hva}
\index{igjen}
\index{fikk}
\index{man}
\index{alt}
\index{mange}
\index{ingen}
\index{får}
\index{oss}
\index{hvor}
\index{under}
\index{siden}
\index{hele}
\index{dag}
\index{gang}
\index{sammen}
\index{ned}
\index{ångstrom}
\printindex
\end{document}
egreg
- 1,121,712
-
-
It compiled, but ångstrøm was ranked first. I did not follow the instruction on having shell escape enabled, as I do not understand it. – Frode Alfson Bjørdal Nov 04 '17 at 17:40
-
@FrodeBjørdal It means run
pdflatex --shell-escape file.texinstead ofpdflatex file.tex. With that I get ångstrøm in the correct place. – Torbjørn T. Nov 04 '17 at 18:05 -
@TorbjørnT. I use Texstudio, and I do not see how to run either of these. – Frode Alfson Bjørdal Nov 04 '17 at 18:15
-
@FrodeBjørdal
pdflatexwithoutshell-escapeis likely what you're using to generate the PDF now. See https://tex.stackexchange.com/a/99601/ for one way of activatingshell-escapefor a document. – Torbjørn T. Nov 04 '17 at 18:24 -
@Torbjørn T. I tried % !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape] in the preamble, but this did not alter the ranking and ångstrøm is still first. – Frode Alfson Bjørdal Nov 04 '17 at 18:54
-
@FrodeBjørdal I added
% !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]before\documentclass, and when hitting F6, I got a question if I would allow changing the build command, which I agreed to, and then it worked fine. I don't really use TeXstudio, so I'm not that familiar with it, and can't say why it wouldn't work for you (unless you have an older version perhaps). – Torbjørn T. Nov 04 '17 at 20:32 -
@TorbjørnT. Thanks, but even this did not work for me, unfortunately. – Frode Alfson Bjørdal Nov 04 '17 at 23:49

\AErather than using UTF-8 characters, you need to add a merge rule for each of those commands. For example(merge-rule "\\AE *" "Æ" :eregexp :again)– Nicola Talbot Nov 04 '17 at 17:47