I am currently struggling with creating a Japanese glossary in Japanese alphabetical order. I've checked and tried this: glossarieswithcjkcharacters however it seems not to work with Lualatex (which I was using for my entire paper), and -- on a sidenote -- when I tried to test, it gave me an error
(! Package inputenc Error: Unicode character 繝 (U+7E5D)
(inputenc) not set up for use with LaTeX.)
So I tried to work with Lualatex and created a rather simple glossary. However the sorting neither follows the alphabetic order in english or japanese, nor the order of "first appearance" or the order of the list where they were created. Therefore I do not know how to bring them in an order. Most preferably would be the japanese alphabet, which is different from the english one - just a quick example for the first ones: (a, i, u, e, o, ka, ki, ku, ke, ko, sa, shi, su, se, so...)
so this is my code example:
\documentclass[12pt,a4paper,headings=standardclasses,numbers=noenddot]{scrreprt}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm]{geometry}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[no-math]{fontspec}
\newfontface\cjkfont{MogaHMinEx90}
\usepackage[no-math,match]{luatexja-preset}
\setmainjfont{MogaHMinEx90}
\usepackage{luatexja-ruby}
\ltjsetparameter{jacharrange={-3}}
\usepackage[record]{glossaries-extra}
\newrobustcmd{\cjkname}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\glsnoexpandfields
\GlsXtrLoadResources[
src={entries},% data in entries.bib
sort=ja,% sort according to Japanese alphabet
category=japanese
]
\glssetcategoryattribute{japanese}{glossnamefont}{textcjk}
\glssetcategoryattribute{japanese}{glossdescfont}{textcjk}
\glssetcategoryattribute{japanese}{textformat}{textcjk}
\begin{document}
オイルショック
\gls{oilshock} abc
\printunsrtglossary
\end{document}
This is my glossary entry
\newglossaryentry{oilshock}{name={\cjkname{オイルショック}},
description={\cjkname{《和 oil+shock》アラブ産油国の原油生産削減と価格の大幅引き上げが、石油を主なエネルギー資源とする先進工業諸国に与えた深刻な経済的混乱のこと。第一次は昭和48年(1973)、第二次は昭和54年(1979)。石油危機。}}}
\newglossaryentry{fms}{name={cjkname{\ltjruby[]{多|品|種少|生産}{た|ひんしゅ|しょう|せいさん}}},
description={\cjkname{工場における生産様式の一つで,同一の工場において類似性の低い製品を多品種にしかも1品目あたりは少量生産するもの。}}}
Is there a neat solution for this or is this completely over-engineering an only 15 page long paper? (I actually really liked the example I linked above, where you could also add dual languages with different ordering)
Sorry, if there are any open questions, as I am still pretty new to LaTeX. Please feel free to ask :) And thank you in advance!
glossary
package. I'm guessing you meantglossaries
, but it's a good idea to compile your MWE before posting. The default setting for theglossaries
package is to usemakeindex
which isn't designed for UTF-8. As I mentioned in my answer to the linked question,xindy
doesn't provide support for Japanese, so the best solution is to usebib2gls
withglossaries-extra
.luatexja-ruby
installed, so I can't test it with that. I'll see if I can produce an answer with a trimmed down version of your MWE.