From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vicente Vera Subject: "Minimal" LaTeX export Date: Sat, 16 Dec 2017 16:48:09 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQFdI-0001Rh-47 for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 11:48:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQFdF-0005Kw-3v for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 11:48:14 -0500 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:33755) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQFdE-0005Hn-Uk for emacs-orgmode@gnu.org; Sat, 16 Dec 2017 11:48:13 -0500 Received: by mail-oi0-x22b.google.com with SMTP id w131so8162397oiw.0 for ; Sat, 16 Dec 2017 08:48:11 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode Hello I'm trying to export a simple document to a LaTeX buffer, but just the main content, without a preamble nor the "document" environment. The main objective is to export several Org documents which are parts of a larger LaTeX report. These parts are then included by means of the "input" command. This is what I came up with, but, of course, there are other functions involved that seem too expensive to modify: (defun this-is-just-a-test () (interactive) (require 'ox-latex) (let ((org-export-with-date nil) (org-export-with-toc nil) (org-latex-classes (append org-latex-classes '(("nothing-at-all" "[NO-DEFAULT-PACKAGES] [NO-PACKAGES] [NO-EXTRA]" ;; "book" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))) (org-latex-default-class "nothing-at-all") (org-latex-with-hyperref nil) (org-latex-hyperref-template nil) (org-latex-prefer-user-labels t)) (org-latex-export-as-latex))) Is there a "clean", elispy way to do this?