From: Falk Hanisch <hanisch.latex@outlook.com>
To: "edgar@openmail.cc" <edgar@openmail.cc>,
John Kitchin <jkitchin@andrew.cmu.edu>
Cc: John Kitchin <johnrkitchin@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: filter for svg latex-export
Date: Sun, 9 Sep 2018 20:03:19 +0000 [thread overview]
Message-ID: <DB5PR08MB0648A92013597F622171CC18E0060@DB5PR08MB0648.eurprd08.prod.outlook.com> (raw)
Version v2.02 of package svg was installed on CTAN and is available for Tex Live or MiKTeX
> -----Ursprüngliche Nachricht-----
> Von: edgar@openmail.cc <edgar@openmail.cc>
> Gesendet: Freitag, 7. September 2018 03:23
> An: John Kitchin <jkitchin@andrew.cmu.edu>
> Cc: emacs-orgmode@gnu.org; John Kitchin <johnrkitchin@gmail.com>
> Betreff: Re: [O] filter for svg latex-export
>
> Hi,
>
> I want to report that I can use the new version of the SVG (2.00b)
> LaTeX directly. The developer (Falk; Bcc) said that there will be a new
> release soon. I attach an example of the strange things that I can
> achieve. I hope that it's useful :) .
>
> Cheers!
>
> On 2018-01-09 03:34, John Kitchin wrote:
> > If all you are doing is replacing includesvg with simplesvg, then you
> > might try this:
> >
> > #+BEGIN_SRC emacs-lisp
> > (let ((org-export-filter-link-functions '((lambda (txt _ _)
> > (replace-regexp-in-string "includesvg" "simplesvg" txt)))))
> > (org-latex-export-as-latex))
> > #+END_SRC
> >
> > If you are doing more than that (it looks like you are adding options?)
> > then one alternative option is just put a copy of your modified
> > function
> > in your init file after you load org, and then it will shadow the
> > ox-latex function and you might not have to change anything when you
> > update as long as no incompatible changes are in the update. I know,
> > that is hacky, but it works in cases like this.
> >
> >
> >
> > edgar@openmail.cc writes:
> >
> >> 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! ***
> >> 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
> >
> >
> > --
> > Professor John Kitchin
> > Doherty Hall A207F
> > Department of Chemical Engineering
> > Carnegie Mellon University
> > Pittsburgh, PA 15213
> > 412-268-7803
> > @johnkitchin
> > http://kitchingroup.cheme.cmu.edu
>
>
> -------------------------------------------------
>
> 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!
next reply other threads:[~2018-09-09 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-09 20:03 Falk Hanisch [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-08 0:10 filter for svg latex-export edgar
2018-01-09 3:34 ` John Kitchin
2018-01-09 3:47 ` edgar
2018-09-07 1:22 ` edgar
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=DB5PR08MB0648A92013597F622171CC18E0060@DB5PR08MB0648.eurprd08.prod.outlook.com \
--to=hanisch.latex@outlook.com \
--cc=edgar@openmail.cc \
--cc=emacs-orgmode@gnu.org \
--cc=jkitchin@andrew.cmu.edu \
--cc=johnrkitchin@gmail.com \
/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.