From: Thomas S. Dye <tsd@tsdye.com>
To: "Luis Felipe López Acevedo" <felipe.lopez@openmailbox.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Exporting multilingual documents (with Japanese) to PDF
Date: Mon, 07 Sep 2015 15:24:18 -1000 [thread overview]
Message-ID: <m2k2s1put9.fsf@tsdye.com> (raw)
In-Reply-To: <50f675e03f1e1ee53526d58dea829ded@openmailbox.org>
Aloha Luis,
Luis Felipe López Acevedo <felipe.lopez@openmailbox.org> 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
next prev parent reply other threads:[~2015-09-08 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 0:18 Exporting multilingual documents (with Japanese) to PDF Luis Felipe López Acevedo
2015-09-08 1:24 ` Thomas S. Dye [this message]
2015-09-08 5:36 ` Robert Klein
2015-09-08 17:57 ` Luis Felipe López Acevedo
-- strict thread matches above, loose matches on Subject: below --
2015-09-07 20:56 Luis Felipe López Acevedo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k2s1put9.fsf@tsdye.com \
--to=tsd@tsdye.com \
--cc=emacs-orgmode@gnu.org \
--cc=felipe.lopez@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).