1

I have to write a Japanese report and my professor asked me to use the document class "jsarticle".

As I usually don't need to write Kanji when using LaTex, I didn't know how to do it and it took me some while to figure out how to get Kanji in the PDF-Output at all. I have tried different engines with different packages and it seems that pLatex is the most convenient choice when writing an entire document in Japanese.

Normally I work with TeXnicCenter, so if possible I'd like to write my report with TeXnicCenter and compile it in pLatex directle from there. Is there a way of adding pLatex to the available engines? And if not, how can I compile it in pLatex after writing it in TeXnicCenter?

Also: If there is a different, simpler way of writing a jsarticle, I'd be happy to do that instead.

  • Welcome to TeX.SX! Seems like upLaTeX engine is a better choice. This guide shows how to set it up in TeXnicCenter. – alwaysask Aug 7 '16 at 5:11
  • Thank you for the answer. I tried what you said, but I wasn't successful. I think a problem might be that TeXnicCenter was set up with MiKTeX when I first got the editor and now I am trying to use an engine from TeX Live. Could that be? And if so, would I have to set up TeXnicCenter solely with TeX Live to fix this? – Valerie Poulain Aug 10 '16 at 3:33
1

First, basic information about Japanese LaTeX (not related to TeXnicCenter):

  1. Japanese version of LaTeX has two variants. pLaTeX is the traditional one, which can handle only characters in the range of JIS X 0208 (a Japanese Industrial Standard defining coded character sets). upLaTeX is the extended version of pLaTeX, which can handle all unicode characters. Also, other engines such as LuaLaTeX, XeLaTeX and pdfLaTeX can be used to produce Japanese documents, but pLaTeX/upLaTeX is the most common and convenient choice for writing an entire document in Japanese.

  2. Your professor asked you to use the document class "jsarticle"; jsarticle supports both pLaTeX and upLaTeX, so you can choose which to use. I recommend upLaTeX because it supports unicode characters, but first you should ask your professor which to use (you may not use upLaTeX when he/she disallows).

  3. Both pLaTeX and upLaTeX can output DVI (not PDF), so you have to convert DVI to PDF using a program dvipdfmx. You should note all the programs (platex.exe, uplatex.exe, dvipdfmx.exe) are included in TeX Live, but not in MiKTeX (MiKTeX has platex.exe too, but it's NOT Japanese pLaTeX).

When you use pLaTeX with jsarticle class, write test.tex

\documentclass{jsarticle}
\begin{document}
こんにちは、日本。
\end{document}

and compile with

> platex test
> dvipdfmx test

When you use upLaTeX with jsarticle class, add [uplatex] class option:

\documentclass[uplatex]{jsarticle}

and compile with

> uplatex test
> dvipdfmx test

You will get test.pdf with Japanese characters (such as kanji). When you like to use packages such as graphicx or color, you have to add driver option [dvipdfmx] to the class options list explicitly.

Then, setting up TeXnicCenter to use upLaTeX or pLaTeX. You should choose output profile "LaTeX => DVI => PDF" and specify paths for uplatex.exe (or platex.exe) and dvipdfmx.exe. Maybe this guide will help.

  • I'm afraid I don't know how to compile the test file without my editor. I've been trying to find a way of doing that and found some other tex.stackexchange sites on that, but I don't really understand the answers. Where would I type in "uplatex test / dvipdfmx test"? On my rxvt terminal? In Uplatex.exe? And if so, how do I explain to the computer exactly which file I mean. Do I have to save the tex-file in the same folder where the terminal respectively uplatex.exe is saved? My OS is Windows 8 and I installed both MikTex (when I first used Latex) and TeX Live (installed it just now). – Valerie Poulain Aug 10 '16 at 3:25
  • To compile the test file without TeXnicCenter, first, save test.tex in Desktop with whatever editor. Second, open terminal called "command prompt" and type "cd Desktop". Then, type "uplatex test" and "dvipdfmx test"; you should get test.pdf on your Desktop. (For more detail, you should search with google; this kind of knowledge is not related to TeX, but related to the basic knowledge of Windows computer). – Hironobu YAMASHITA Aug 11 '16 at 2:53
  • (continued from above comment) TeXnicCenter is a helper software, which is capable of doing almost exactly the same thing automatically, only when you set it up correctly. You should set up TeXnicCenter profiles with TeX Live properly (the path for "LaTeX" should be C:\texlive\2016\bin\win32\uplatex.exe, and similar for others), but you don't have to uninstall MiKTeX, I think. – Hironobu YAMASHITA Aug 11 '16 at 3:23
  • I am trying to use Tex2img. It seems to be looking for platex.exe. When installing Tex Live I chose a "medium" installation, and it seems that platex.exe is not included. The Tex Live Manager has no package named platex (or uplatex). Which package should I install to get these? – garyp Mar 28 '18 at 15:11
  • Assume you are using latest Windows version (2.0 or later) of TeX2img. First, TeX2img does not necessarily need platex (though the default is platex, simply because the software is developed by Japanese). You can switch from platex.exe to pdflatex.exe etc in Menu -> [Tools] -> [Option]. If you change to pdflatex.exe, you also have to change preamble setting; Menu -> [View] -> [Preamble window] shows current preamble, so you should change from \documentclass[...]{jsarticle} to \documentclass{article} for English. – Hironobu YAMASHITA Mar 30 '18 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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