2

This question already has an answer here:

I'm working with Xelatex 3.14159265-2.6-0.99991 (TeX Live 2014/Arch Linux), compiling my .tex file and getting a simple .pdf file.

I'm stuck on the following problem, occuring in a simple Japanese sentence. I want something like :

ABC せんつぶ まいたら ひとつぶに なあれ ひとつぶ まいたら

But all I get is (without any space between the Japanese words) :

ABC せんつぶまいたらひとつぶになあれひとつぶまいたら

I get the spaces only by using the \; "trick" but I would like to avoid it :

ABC せんつ\;ぶまいたら\;ひとつぶに\;なあれ\;ひとつぶ\;まいたら

I'm an absolute newbie and don't know how to handle this problem. Any help would be appreciated !


My .tex file :

\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{Sazanami Mincho}
\setmainfont{Sazanami Mincho}
\usepackage[margin=4cm]{geometry}
\usepackage{amsmath}

\begin{document}
ABC せんつぶ まいたら ひとつぶに なあれ ひとつぶ まいたら
\end{document}

marked as duplicate by Leo Liu, ChrisS, Guido, Symbol 1, R. Schumacher Mar 20 '15 at 2:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

I think I get it, thanks to this post.

Just add \CJKspace this way :

\documentclass{article}

\usepackage{xeCJK}
\setCJKmainfont{Sazanami Mincho}
\setmainfont{Sazanami Mincho}
\usepackage[margin=4cm]{geometry}
\usepackage{amsmath}
\CJKspace
\begin{document}
ABC せんつぶ\;まいたら ひとつぶに なあれ ひとつぶ まいたら
\end{document}
  • Yes, you got it. – Leo Liu Mar 20 '15 at 1:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.