LyXLyX - index in the non-english alphabetical order

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Iohannes
Posts: 1
Joined: Sat Apr 21, 2012 4:17 pm

LyX - index in the non-english alphabetical order

Post by Iohannes »

Hi,
I write my thesis in Czech and I can't manage to create an index in the right alphabetical order for my language.
I think that this problem could be quite common in the another languages that have more letters and/or another alphabetical order than English, so maybe somebody could help me.


The encoding of my file is utf8x and I tried these settings in Document > Settings > Indexes:
- Processor makeindex, no options - our specific letters like ř, ž, č are on the top of the list (right order: "ř" after "r", "ž" after "z", "č" after "c" etc.)[/list]
- Processor texindy, no options - bad order, "ř" under "o", "ž" under "y" etc.
- Processor texindy, options: "-L czech" - a lot of errors, can't proceed
- Processor texindy, options: "-L czech -C utf8x" - nothing happens, no index is visible (same for "-C utf8")
- Processor xindy, no options - nothing happen, no index is visible
- Processor xindy, options: "-L czech" - nothing happens, no index is visible
- Processor xindy, options: "-L czech -C utf8x" - nothing happens

Is there any solution?
In the attachment there are two files, one with the "default encoding" for Czech that actually works with texindy -L czech (but I can't use this non-unicode encoding), and one in utf8x that doesn't work.
Thank you for any advices!
Attachments
czech_indices_utf8.lyx
(4.44 KiB) Downloaded 261 times
czech_indices_iso.lyx
(4.44 KiB) Downloaded 247 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

LyX - index in the non-english alphabetical order

Post by kaiserkarl13 »

I figured out something that might work, though it takes some care. You can define "sort keys" that are special to makeindex through the @ specifier. In your case, the actual word you want (with the accent in it) should appear after said @ sign, while the word you want makeindex to sort on should appear before it. For example,

Code: Select all

\documentclass{article}
\usepackage{makeidx}
\makeindex
\begin{document}
Hello!
\index{Strap}%
\index{Stsap}%
\index{Strapped}%
\index{Strip}%
\index{Strzap@St\v rap}%
\newpage
Hello again!
\index{Jazz}%
\index{Jazzy}%
\index{Jaz}%
\index{Jazzz@Ja\v zz}%
\printindex
\end{document}
This is obviously a contrived example, but the gist of it is there. Here, I have used "Strzap" to make sure that "St\v rap" comes after "Strip" or anything else I could think of but before "Stsap". Similarly, the "zzz" is inserted so that "zzy" will come before "\v zz".
Post Reply