From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sMW/M1J/VF+xCgAA0tVLHw (envelope-from ) for ; Sun, 06 Sep 2020 06:18:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uOZ3L1J/VF8VXwAAbx9fmQ (envelope-from ) for ; Sun, 06 Sep 2020 06:18:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4422A9403CB for ; Sun, 6 Sep 2020 06:18:58 +0000 (UTC) Received: from localhost ([::1]:39504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEo0u-0002S5-TW for larch@yhetil.org; Sun, 06 Sep 2020 02:18:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEo0Y-0002Rz-Cj for emacs-orgmode@gnu.org; Sun, 06 Sep 2020 02:18:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46976) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEo0X-0001do-Kp; Sun, 06 Sep 2020 02:18:33 -0400 Received: from lns-bzn-32-82-254-31-120.adsl.proxad.net ([82.254.31.120]:56074 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1kEo0X-0007Es-BA; Sun, 06 Sep 2020 02:18:33 -0400 Received: by guerry (Postfix, from userid 1000) id D5FA21A60D69; Sun, 6 Sep 2020 08:18:31 +0200 (CEST) From: Bastien To: Matt Huszagh Subject: Re: [PATCH] babel latex headers and image generation commands Organization: GNU References: <874kw6ztr9.fsf@gmail.com> <871rrayrsc.fsf@gmail.com> <87y2thylcb.fsf@gmail.com> <87r1z29abl.fsf@gnu.org> <87y2lynft3.fsf@gmail.com> <87zh685bl4.fsf@gmail.com> <87d034qacb.fsf@gmail.com> Date: Sun, 06 Sep 2020 08:18:31 +0200 In-Reply-To: <87d034qacb.fsf@gmail.com> (Matt Huszagh's message of "Wed, 02 Sep 2020 11:53:24 -0700") Message-ID: <874kobmnrc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: wI8molun2yU8 Hi Matt, Matt Huszagh writes: > Matt Huszagh writes: > >> I've added a few changes to the patch that additionally allow custom the >> begin and end document environments. The purpose here is to allow latex >> code within the document environment that is ignored by the body >> export. For instance, I can set the page color with >> {\color{some-color}...} and this doesn't mess up latex exports. > > I've fixed a minor bug with the previous patch. Thanks -- that'd be for after 9.4 of course. > From 1bcd1d28dde6625d0c648c92243260b46433e1eb Mon Sep 17 00:00:00 2001 > From: Matt Huszagh > Date: Fri, 28 Aug 2020 22:26:05 -0700 > Subject: [PATCH] ob-latex.el: Make latex to svg compilation very customizable > > * lisp/ob-latex.el (org-babel-latex-preamble): Add latex preamble > customization. > (org-babel-latex-begin-env): Add latex document environment begin > customization. > (org-babel-latex-end-env): Add latex document environment end > customization. > (org-babel-latex-pdf-svg-process): Add customization for converting a > pdf to svg. > (org-babel-execute:latex): Add specific case for svg generation from > latex block. Prefer * lisp/ob-latex.el (org-babel-latex-preamble): New option for LaTeX preamble customization. "New option" is quite standard, an "option" being a customizable variable. In this case, "New option" would probably be enough, given the name of the option is quite self-explanatory. Also, some find it pedantic, but "LaTeX" is the correct spelling in a changelog I guess. > +(defcustom org-babel-latex-preamble > + (lambda (_) > + "\\documentclass[preview]{standalone} > +\\def\\pgfsysdriver{pgfsys-tex4ht.def} > +") > + "Closure which evaluates at runtime to the latex preamble. It > +takes 1 argument which is the parameters of the source block." > + :group 'org-babel > + :type 'function) The first line of the docstring should contain a sentence, so you'd need to have a new paragraph after "runtime to the LaTeX preamble." > +(defcustom org-babel-latex-pdf-svg-process > + "inkscape --pdf-poppler %f -T -l -o %O" > + "Command used to convert a PDF file to an SVG file when > +executing a latex source block." > + :group 'org-babel > + :type 'string) What for users who don't have inkscape? Thanks, -- Bastien