From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Subject: filter for svg latex-export
Date: Mon, 08 Jan 2018 00:10:44 +0000 [thread overview]
Message-ID: <f6b41f3cdcc5010070e7d21e4a0e4698@openmail.cc> (raw)
[-- Attachment #1: Type: text/plain, Size: 588 bytes --]
Hello,
I once tried to create a filter (is that the name?) to modify the
function which exports SVG files. Verdict: I suck! Thus, I keep
modifying the ox-latex.el every time that I upgrade (see attached).
Would someone please tell me what is the right way to achieve that
(without modifying the code, please? Thanks!
-------------------------------------------------
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
[-- Attachment #2: ox-latex-svg.diff --]
[-- Type: text/plain, Size: 1036 bytes --]
*** org-20180103/ox-latex.el 2018-01-07 16:53:43.477464348 -0700
--- plugins/ox-latex.el 2018-01-07 16:39:52.117462098 -0700
***************
*** 2425,2434 ****
(t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code (replace-regexp-in-string "^\\\\includegraphics"
! "\\includesvg"
! image-code
! nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
"}"
image-code
--- 2425,2437 ----
(t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code
! (format "\\simplesvg%s{%s}"
! (cond ((not (org-string-nw-p options)) "")
! ((string-prefix-p "," options)
! (format "{%s}" (substring options 1)))
! (t (format "{%s}" options)))
! path))
(setq image-code (replace-regexp-in-string "\\.svg}"
"}"
image-code
next reply other threads:[~2018-01-08 0:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 0:10 edgar [this message]
2018-01-09 3:34 ` filter for svg latex-export John Kitchin
2018-01-09 3:47 ` edgar
2018-09-07 1:22 ` edgar
-- strict thread matches above, loose matches on Subject: below --
2018-09-09 20:03 Falk Hanisch
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6b41f3cdcc5010070e7d21e4a0e4698@openmail.cc \
--to=edgar@openmail.cc \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.