4

I'm trying to index all the words from my old conlang, whose alphabetical order goes aæbcçdðefghijklɬłnñŋməoœœ̄pqrsßtťþuůvwxyz instead of the regular abcdefghijklmnopqrstuvwxyz we're all familiar with.

There are also secondary rules for diacritics that only kick in when two words are identical except for the accents; I'll include them below.

  • I can't find anything that lets me redefine the alphabetical order so that I can automatically sort all the vocab entries the way I need to.
  • Theoretically, I could make a sorting algorithm with xstring but I really don't want to because the sheer amount of work involved sounds extremely unpleasant, and it would take an obnoxiously long time to compile.
  • I've tried using xindy as well but it's not cooperating at all and at this point using it feels like significantly more trouble than it's worth.
  • I'm on overleaf if that helps at all.
  • I don't have any working code for entries; I've been using just a stylistic command \entry (source below).

Rules for diacritics: when two words have identical spelling except for diacritics (e.g. chazín and ĉhazín), the word without the diacritic goes first, and then the diacritics will go in the following order: a, à, á, â, ǎ, ä, ã, å, ȧ, ă. (Note to anyone who also does this stuff: yes, I'm fully aware that this is not a great way to go about things.)

\entry code: \newcommand\entry[6]{\textbf{#1}\defsep\textit{#2}\defsep[#3]\defsep#4\defsep#5\defsep#6\par} with \defsep being \newcommand\defsep{\hspace{0.05in}$\cdot$\hspace{0.05in}}

Edit: Ok so I wholly and totally forgot to add an MWE; sorry about that. I'm not sure if this is exactly what I'm supposed to do for these but here goes. Ideally what I'd be able to do is something like

\entry{word=idyr,tr=between,IPA=idɪɾ,etym=from Irish *idir*,pos=prep}
\entry{word=ðormaï,tr=bedroom,IPA=d̪ð͡oɾma.i,etym=from Spanish *dormitorio*,pos=noun}
\entry{word=ŷ,tr=to be,IPA=aj,etym=from Spanish *hay*,pos=verb,irr=infinitive is ŷ instead of ŷín}
\entry{word=ə́lunfr̂at,tr=alliance,IPA=ˈəlunfʀat,etym=unknown,pos=noun,irr=none}
\entry{word=ĉhazin,tr=to do,IPA=xazˈin,etym=ultimately from Portuguese *fazer*,pos=v,irr=none}

and have it spit out the entries formatted and in the right order, which would look something like


ĉhazin v. (pr. [xazˈin]) to do, ultimately from Portuguese fazer. Regular conjugation.

ðormaï n. (pr. [d̪͡ðoɾma.i]) bedroom, from Spanish dormitorio.

idyr prep. (pr. [idɪɾ]) between, from Irish idir.

ə́lunfr̂at n. (pr. [ˈəlunfʀat]) alliance, unnknown etymology.

ŷ v. (pr. [aj]) to be, from Spanish hay. Infinitive is ŷ instead of ŷín.


I can handle the formatting fine; it's just the sorting itself I need help with. Thanks again!

  • Is a LuaTeX solution acceptable? –  Mar 22 '21 at 22:43
  • @JairoA.delRio Overleaf has support for LuaLaTex; idk how different that is but yes I can use it – generallyconfuzzled Mar 22 '21 at 22:45
  • It's best if you add a so-called "MWE", see https://tex.meta.stackexchange.com/questions/228. This helps others and yourself. – Dr. Manuel Kuehner Mar 22 '21 at 23:34
  • Is this helpful: https://tex.stackexchange.com/questions/153858 – Dr. Manuel Kuehner Mar 22 '21 at 23:38
  • @Dr.ManuelKuehner Ok I added the MWE (or my best attempt at it); hope that helps. And the link wasn't particularly helpful just because it seemed to rely mostly on babel and the fact that Swedish is already incorporated in it, which doesn't really help me. If I'm just being dense pls let me know, and thanks for your help :) – generallyconfuzzled Mar 23 '21 at 00:47
  • 1
    The MWE should be compilable (self contained but yet minimal) as described in https://tex.meta.stackexchange.com/questions/228 – Dr. Manuel Kuehner Mar 23 '21 at 01:04
  • @generallyconfuzzled https://tex.stackexchange.com/q/672292 (you might want to keep a track of this question). – Niranjan Jan 20 '23 at 07:49

0 Answers0