emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: edgar@openmail.cc
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: how to replace includegraphics?
Date: Wed, 31 May 2017 18:29:46 -0500	[thread overview]
Message-ID: <CA+M2ft_NAmowM624gAZw7nXrErKqOOP_W6Y0jfoF9=enb4d=kw@mail.gmail.com> (raw)
In-Reply-To: <cb2e2ef04c17dc498bb96fbcc6c734dd@openmail.cc>

On Wed, May 31, 2017 at 5:35 PM,  <edgar@openmail.cc> 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!

  reply	other threads:[~2017-05-31 23:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31  3:37 how to replace includegraphics? edgar
2017-05-31 13:55 ` John Hendy
2017-05-31 22:35   ` edgar
2017-05-31 23:29     ` John Hendy [this message]
2017-05-31 17:01 ` Charles C. Berry
2017-05-31 22:36   ` 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

  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='CA+M2ft_NAmowM624gAZw7nXrErKqOOP_W6Y0jfoF9=enb4d=kw@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).