0

I have a personal LaTeX class called MyThesis, and I want to be able of exporting from org to LaTeX.

Q: How can I call this class that is not in the main tree of texlive?

I have this in my .emacs

(use-package org
  :defer t
  :config
  (use-package ox-latex
    :defer 5
    :config
    (add-to-list 'org-latex-classes
         '("MyThesis"
           "\\documentclass{MyThesis}"
           ("\\part{%s}" . "\\part*{%s}")
           ("\\chapter{%s}" . "\\chapter*{%s}")
           ("\\section{%s}" . "\\section*{%s}")
           ("\\subsection{%s}" . "\\subsection*{%s}")
           ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
         )
    )
  )

but I don't know how to tell it where if the file! (Shame on me!)

  • 4
    The easiest solution may be to install your personal class in a way that Texlive can see it. This has been answered elsewhere on stackexchange. If that doesn't do what you need, perhaps you can clarify exactly what you're trying to do? – Tyler Feb 13 '17 at 15:32
1

Follow @tyler's advice first for finding locations in your TeX installation, but for the syntax for using use-package in your init.el, use this pared down example below. Note defer is implied.

(use-package org
 :config
    (add-to-list 'org-latex-classes
        '("MyThesis"
               "\\documentclass{MyThesis}"
               ("\\part{%s}" . "\\part*{%s}")
               ("\\chapter{%s}" . "\\chapter*{%s}")
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))

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.