In my preamble I call xeCJK and ruby in order to add ruby text to Japanese characters. I'm compiling with xetex.
Someone mentioned in an earlier post that ruby calls CJK causing a compile error (the document looks fine, though).
How do I avoid this? The documentation for xeCJK is written in Chinese so I can't read it and I can't find ruby's documentation (lots of stuff on the programming language, though).
Before we go any further, here is a MWE as requested.
\documentclass{article}
\usepackage{ruby}
\usepackage{xeCJK}
%\setCJKmainfont{MS Mincho}
%\setCJKsansfont{MS Gothic}
%\setmainfont{Times New Roman}
%\setsansfont{Calibri}
\begin{document}
%\ruby{日}{に}\\
%\ruby{本}{hon}\\
%語\\
Latin text.\\
\textsf{Latin text.}
\end{document}
The comments are there so that you can play around and see if the errors change given different types of input.
The first error I get (with comments as they are) is:
"xparse/command-already-defined"! See the LaTeX3 documentation for further information.
Swapping the order of xeCJK and ruby produces no errors! Why?
Is there a better package than ruby which will never conflict with xeCJK or a better selection of packages that is less prone to errors?
ruby.stycallingcjk.sty. It is itself part of thecjkpackage and depends essentially oncjk.sty. As far as I can tell, you either find an alternative torubyor you usecjkrather thanxecjk. – cfr May 26 '16 at 01:53ruby.stybe part ofcjk.styif they are separate packages? Are they always distributed together then? – jamesh625 May 26 '16 at 04:21.styfiles. But they are part of the same package in the sense that they are part of a single set of files which constitutes a package in CTAN's sense. Here is the MANIFEST forcjk, which lists all files provided by the package, includingruby.sty. – cfr May 26 '16 at 12:30