From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas S. Dye Subject: Re: Exporting multilingual documents (with Japanese) to PDF Date: Mon, 07 Sep 2015 15:24:18 -1000 Message-ID: References: <50f675e03f1e1ee53526d58dea829ded@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ7eK-0002ko-Gh for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 21:24:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ7eH-00024h-DG for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 21:24:40 -0400 Received: from gproxy10-pub.mail.unifiedlayer.com ([69.89.20.226]:48281) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZZ7eH-00024K-7Q for emacs-orgmode@gnu.org; Mon, 07 Sep 2015 21:24:37 -0400 In-reply-to: <50f675e03f1e1ee53526d58dea829ded@openmailbox.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Luis Felipe =?utf-8?Q?L=C3=B3pez?= Acevedo Cc: emacs-orgmode@gnu.org Aloha Luis, Luis Felipe López Acevedo writes: > Hi, > > I'm using Emacs 24.4.1 on Debian 8. I currently can export to PDF > documents that mix English and Spanish, but a simple document like the > following produces a PDF with no Japanese characters at all. Only the > English and Spanish text is visible. > > #+TITLE: Notes on Japanese > #+DATE: 2015-09-07 > > > * 2015年9月7日 > > - おはようございます! > - Good morning! > - ¡Buenos días! > > The "Org PDF LaTeX Output" shows several errors like this one: > > ! Package inputenc Error: Unicode char \u8:年 not set up for use with > LaTeX. > > The complete log: > https://bitbucket.org/sirgazil/dnd/downloads/nihongo.log > > Searching for a solution on the Web I found this post > http://blogs.fsfe.org/ciaran/?p=150. When I use "pdflatex JIS.tex" as > indicated there, I get a good PDF with Japanese characters. > > So I'm wondering how to get this working on Org mode... The following illustrates one approach. You'll probably have to augment the definition of the LaTeX class by adding fonts, etc., but if you have a working example on your system that should not be hard. Note that the example relies on the setup code, so you'll either need to read the code from its own file or refresh the setup with C-c C-c when point is on one of the #+ lines at the top. #+SELECT_TAGS: export #+EXCLUDE_TAGS: noexport #+CREATOR: Emacs 24.5.1 (Org mode 8.3.1) #+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline #+OPTIONS: author:nil c:nil creator:nil d:(not "LOGBOOK") date:nil e:t #+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t #+OPTIONS: tags:t tasks:t tex:t timestamp:t title:nil toc:nil todo:t |:t #+LATEX_CLASS: japanese * Acevedo example #+attr_latex: :options [dnp]{JIS}{min} #+begin_CJK* I can write this 私はキランです in Japanese. #+end_CJK* * Setup code :noexport: #+name: japanese-class #+header: :results silent #+begin_src emacs-lisp (add-to-list 'org-latex-classes '("japanese" "\\documentclass{scrartcl} [NO-DEFAULT-PACKAGES] [PACKAGES] [EXTRA] \\usepackage{CJK} \\usepackage{hyperref}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) #+end_src * Local variables :noexport: # Local Variables: # coding: euc-japan # eval: (sbe "japanese-class") hth, Tom -- Thomas S. Dye http://www.tsdye.com