5

I am trying to use pLaTeX to compile documents in Japanese in TexShop. As far as I know, the easiest way to do it is to change the TeXShop Preferences from [Regular] to [pTex (ptex2pdf)], as demonstrated by the screen capture below.

enter image description here

However, when I set it into [pTex (ptex2pdf)], I can no longer compile documents I created under normal LaTeX setting (written in English). Do any one with pTex experience have similar issues before?

My preliminary thought is that: if one can toggle between LaTeX and pTeX in the same way between LaTeX, XeLaTex, and cwTex, things would become much easier. And I am wondering how other people solve this issue. Any thoughts would be greatly appreciated!

enter image description here

For the reference, here are the codes I want to compile:

\documentclass{jsarticle}[20pt]
\begin{document}
こんにちは!
\end{document}
1
  • Thanks for the answer! I also added the code I want to compile so readers would know whether it work
    – carl-pch
    Oct 5, 2015 at 23:16

1 Answer 1

4

Open ~/Library/TeXShop/Engines and duplicate the file XeLaTeX.engine, renaming it pLaTeX.engine.

Then open the new file with TextEdit so it contains

#!/bin/sh
platex  -file-line-error -synctex=1 "$1"

Just copy here and replace the contents.

Now, at the beginning of the file you want to compile with platex, add

% !TEX TS-program = platex

That's all: relaunch TeXShop and when you click on the Typeset button you'll get this console output:

This is e-pTeX, Version 3.14159265-p3.6-141210-2.6 (utf8.euc) (TeX Live 2015) (preloaded format=platex)
 restricted \write18 enabled.
entering extended mode

You can still select the pLaTeX engine from the drop down menu.

enter image description here

2
  • Thanks a bunch, egreg! This helps me to get really close! Now the issue is that instead of compiling a PDF file, output is "written on test2.dvi (1 page, 272 bytes)" according to the log file. Does that also happen to you? I have added my codes to the original question post.
    – carl-pch
    Oct 5, 2015 at 23:55
  • I am now able to compile without issue using this: ptex2pdf -u -l -ot -file-line-error -synctex=1 "$1"
    – carl-pch
    Oct 6, 2015 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .