From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: how to replace includegraphics? Date: Wed, 31 May 2017 18:29:46 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGD3k-0002bU-Md for emacs-orgmode@gnu.org; Wed, 31 May 2017 19:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGD3j-0007yJ-Ln for emacs-orgmode@gnu.org; Wed, 31 May 2017 19:29:48 -0400 Received: from mail-it0-x22e.google.com ([2607:f8b0:4001:c0b::22e]:35463) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGD3j-0007y8-FS for emacs-orgmode@gnu.org; Wed, 31 May 2017 19:29:47 -0400 Received: by mail-it0-x22e.google.com with SMTP id f72so22359010ite.0 for ; Wed, 31 May 2017 16:29:47 -0700 (PDT) In-Reply-To: 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: edgar@openmail.cc Cc: emacs-orgmode On Wed, May 31, 2017 at 5:35 PM, wrote: > Hello John, > >> instead of footnotes. Have you considered just changing the definition >> in LaTeX instead? [1] [2] > > Yes, may be the redaction of my request was not very clear, I'm sorry. I did > not want to do that, because I foresee that someone may think that my > \includesvg is the \includesvg from the svg package. However, the two do not > work in the same way, and may lead to problems. I initially saw this: (replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+\.svg}\\)" "\\\\simplesvg\1" contents)) That looked like you wanted to just swap \includegraphics with \simplesvg. Doing that via LaTeX directly seemed like an easy way: #+latex: \let\includegraphics\simplesvg Now that I'm re-examining, you only want to do this for .svgs so that's not nearly as straightforward. > If my previous e-mail was indeed clear, may be I'm not getting what you are > trying to say, sorry. If the above *did* work, I don't see why you couldn't just remove the #+latex line before publishing. Or define it in a setupfile that you load and no one would ever know the contents to get confused. Or perhaps it was a mandatory requirement to do zero changes to the file you publish? The first method you showed appeared to apply elisp code from within the file, so I'd assume an external user would see it but have to ignore/not eval. Filters are intimidating to me (no elisp-fu here!), but they definitely sound like the ticket! Good luck, John P.S. On a last point re. the confusion alone, I'm interpreting you to mean users may think \simplesvg == \includesvg? Or simplesvg is your package *name*, svg is the CTAN package, and they both provide \includesvg? Why not rename your local version's command to a different name? Or do \usepacakge{simplesvg} locally, and in the published version have it commented with a note that it's special? Or make your package available and include a link and instructions to replicate? Just seems like an awful lot of work for a naming convention issue! > Thank you. > > > Edgar > > ------------------------------------------------- > > 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!