1

I am writing Japanese Org mode note and need to convert it into Latex.

I defined the japanese latex class in my config file as follow:

(with-eval-after-load 'org
  (add-to-list 'org-latex-classes
              '("japanese"
                "\\documentclass{jsarticle}
    [NO-DEFAULT-PACKAGES]
    [PACKAGES]
    [EXTRA]"
                ("\\section{%s}" . "\\section*{%s}")
                ("\\subsection{%s}" . "\\subsection*{%s}")
                ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                ("\\paragraph{%s}" . "\\paragraph*{%s}")
                ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

Then, I press C-c C-e l o (export to Latex as PDF file and open). However, I got error as below.

Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55.
Rule 'pdflatex': Rules & subrules not known to be previously run:
  pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -interaction nonstopmode  -recorder  "week3.tex"'
------------
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./week3.tex
LaTeX2e <2018-04-01> patch level 3
Babel <3.20> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/platex/jsclasses/jsarticle.cls

! LaTeX Error: This file needs format `pLaTeX2e'
              but this is `LaTeX2e'.

So, the Org-mode is using the latexmk, but the latexmk is using the pdflatex. As far as I know, the latexmk should automatically use the platex. After the failed org-to-latex process, I ran latekmk name-of-file.tex normally from the terminal with success. What is the problem here? How should I fix it?

I am using emacs 26.1 (spacemacs) and org mode 9.1.14.

Hilman
  • 183
  • 1
  • 6

0 Answers0