emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Matt Huszagh <huszaghmatt@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] babel latex headers and image generation commands
Date: Sun, 06 Sep 2020 08:18:31 +0200	[thread overview]
Message-ID: <874kobmnrc.fsf@gnu.org> (raw)
In-Reply-To: <87d034qacb.fsf@gmail.com> (Matt Huszagh's message of "Wed, 02 Sep 2020 11:53:24 -0700")

Hi Matt,

Matt Huszagh <huszaghmatt@gmail.com> writes:

> Matt Huszagh <huszaghmatt@gmail.com> 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 <huszaghmatt@gmail.com>
> 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.


  * 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?  



  reply	other threads:[~2020-09-06  6:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  7:39 babel latex headers and image generation commands Matt Huszagh
2020-02-04 21:19 ` Matt Huszagh
2020-02-04 23:38   ` Matt Huszagh
2020-02-10  7:21     ` Bastien
     [not found]       ` <87y2lynft3.fsf@gmail.com>
2020-08-29  7:02         ` Matt Huszagh
2020-09-02 17:32           ` [PATCH] " Matt Huszagh
2020-09-02 18:53             ` Matt Huszagh
2020-09-06  6:18               ` Bastien [this message]
2020-09-09 19:43                 ` Matt Huszagh
2020-10-24 12:30                   ` Bastien
2020-10-24 16:39                     ` Matt Huszagh
2020-12-14  8:19                       ` Bastien
2020-09-06  5:59             ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kobmnrc.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=huszaghmatt@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).