emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use custom preamble from tex file for latex export


From: reza
Subject: Re: Use custom preamble from tex file for latex export
Date: Tue, 21 Feb 2023 08:40:57 +0000

> Yes, should be possible.  Check out info manual: (emacs) File Variables

I did manage to patch together a working example, but when I tried to 
move into an setupfile it doesn't work anymore. Is this intended or did 
I do something wrong?

template.org

# -*- org-export-allow-bind-keywords: t; -*-
#+BIND: org-latex-classes (my-latex-classes)
#+BIND: org-latex-hyperref-template nil
#+LATEX_CLASS: from-file
#+BEGIN_SRC emacs-lisp :exports results :results none
   (defun my-latex-classes
     '(("from-file"
        "\\RequirePackage{preamble}\n[NO-DEFAULT-PACKAGES]"
        ("\\section{%s}" . "\\section*{%s}")
        ("\\subsection{%s}" . "\\subsection*{%s}")
        ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
        ("\\paragraph{%s}" . "\\paragraph*{%s}")
        ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
#+END_SRC

report.org

# -*- org-export-allow-bind-keywords: t; -*-
#+title: A dummy report
#+subtitle: This is a dummy report
#+setupfile: ../template.org

* Title

asdasd

This gives me an error, unknown latex class "from-file" and checking the 
variable "org-latex-classes" with C-h v looks like it was not set.

Thanks for any help.

Cheers,
Reza

Attachment: OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]