emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: HTML export doesn't convert quote before footnote
Date: Sat, 11 Jan 2014 10:45:41 +0800	[thread overview]
Message-ID: <4e70d163-1f0d-4f4e-9506-ee5237d41fc3@dewdrop-world.net> (raw)
In-Reply-To: <87eh4h9zx8.fsf@gmail.com>

On Thursday, January 9, 2014 7:07:15 PM HKT, Nicolas Goaziou wrote:
> Hello,
>
> James Harkins <jamshark70@gmail.com> writes:
>
>> On Thursday, January 9, 2014 10:13:32 AM HKT, James Harkins wrote:
>  ...
>
> That's because BACKEND is already a symbol, not a real back-end (i.e.
> a defstruct).  Thus, you can use:
>
>   (cdr (assq backend ...) ...)

And, I have a working filter now.

(defun hjh-quote-before-footnote (contents backend info)
  "Convert '\"[fn' to the appropriate closing quote per backend."
  (when (and (and
	      (org-export-derived-backend-p backend 'latex 'html)
	      (plist-get info :with-smart-quotes))
	     (let ((teststring
		    (cdr (assq backend
			       '((latex . "\"\\\\footnote") (html . "\"<sup><a"))))))
	     (string-match teststring contents)))
    (let* ((replacements '((latex . "''\\\\footnote") (html . 
"&rdquo;<sup><a")))
	  (replacement (assoc backend replacements)))
      (replace-match (cdr replacement) nil nil contents))))

Filters are... really cool. Thanks for the help!

Next up: Try to control image sizes when using beamerarticle...

hjh

      reply	other threads:[~2014-01-11  2:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08  2:09 HTML export doesn't convert quote before footnote James Harkins
2014-01-08  5:03 ` Nick Dokos
2014-01-08 15:33 ` Nicolas Goaziou
2014-01-08 15:50   ` James Harkins
2014-01-08 16:37     ` Nicolas Goaziou
2014-01-09  2:13       ` James Harkins
2014-01-09  3:03         ` James Harkins
2014-01-09 11:07           ` Nicolas Goaziou
2014-01-11  2:45             ` James Harkins [this message]

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=4e70d163-1f0d-4f4e-9506-ee5237d41fc3@dewdrop-world.net \
    --to=jamshark70@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@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 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).