emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: emacs-orgmode@gnu.org
Subject: Re: Renaming the thread: orgmode-bibtex/html-export issues
Date: Sat, 10 Nov 2012 07:16:50 +0900	[thread overview]
Message-ID: <20121109221650.GA12344@panahar> (raw)
In-Reply-To: <20121109213223.GA11463@panahar>

> I also do not like the fact that it inserts, at the bottom of every
> page, a footer saying "This file was generated by bibtext2html..". Any
> ideas about how to get rid of that?

I have had some success with this.

I patched org-exp-bibtex.el as follows.

Line 101 to 110 look as follows:

#######

	  (with-temp-buffer
	    (save-match-data
	      (insert-file-contents (concat file ".html"))
	      (goto-char (point-min))
	      (while (re-search-forward (org-re "a name=\"\\([-_[:word:]]+\\)\">\\([[:word:]]+\\)") nil t)
		(setq oebp-cite-plist (cons (cons (match-string 1) (match-string 2)) oebp-cite-plist)))
	      (goto-char (point-min))
	      (while (re-search-forward "<hr>" nil t)
		(replace-match "<hr/>" t t))
	      (concat "\n#+BEGIN_HTML\n<div id=\"bibliography\">\n<h2>References</h2>\n" (buffer-string) "\n</div>\n#+END_HTML\n"))))

#######

I inserted four lines as follows:


#######

	  (with-temp-buffer
	    (save-match-data
	      (insert-file-contents (concat file ".html"))
	      (goto-char (point-min))
	      (while (re-search-forward (org-re "a name=\"\\([-_[:word:]]+\\)\">\\([[:word:]]+\\)") nil t)
		(setq oebp-cite-plist (cons (cons (match-string 1) (match-string 2)) oebp-cite-plist)))
	      (goto-char (point-min))
	      (while (re-search-forward "<hr>" nil t)
		(replace-match "<hr/>" t t))
              (while (re-search-forward "<em>This file was generated by" nil t)
                (replace-match ""))
              (while (re-search-forward "<a href=\"http://www.lri.fr/~filliatr/bibtex2html/\">bibtex2html</a> 1.97.</em>" nil t)
                (replace-match ""))
	      (concat "\n#+BEGIN_HTML\n<div id=\"bibliography\">\n<h2>References</h2>\n" (buffer-string) "\n</div>\n#+END_HTML\n"))))

#######

As you would note, the entire string produced by my version of
bibtex2html (including the version number) is hard coded into the
syntax. Can somebody help improve it to make it more general so that
it would work irrespective of the version.

Vikas

  reply	other threads:[~2012-11-09 22:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05 20:54 error: Execution of bibtex2html Vikas Rawal
2012-11-06 16:43 ` Suvayu Ali
2012-11-06 21:09   ` Vikas Rawal
2012-11-06 21:24     ` Myles English
2012-11-07  2:57       ` Vikas Rawal
2012-11-07  3:24         ` Yagnesh Raghava Yakkala
2012-11-07  4:10           ` Nick Dokos
2012-11-07  9:02             ` Renaming the thread: orgmode-bibtex/html-export issues Vikas Rawal
2012-11-09 21:32               ` Vikas Rawal
2012-11-09 22:16                 ` Vikas Rawal [this message]
2012-11-06 21:26   ` error: Execution of bibtex2html Vikas Rawal
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07 11:16 Batch export to html Vikas Rawal
2011-12-08 19:49 ` Achim Gratz
2011-09-29 16:13 org-mobile-push Vikas Rawal
2011-09-29 16:48 ` org-mobile-push Jambunathan K
     [not found] ` <vikaslists@agrarianresearch.org>
2011-09-29 16:54   ` org-mobile-push Nick Dokos
2011-09-29 23:34     ` org-mobile-push Vikas Rawal
2011-10-01  6:40   ` org-mobile-push Nick Dokos
2011-10-02  3:09     ` org-mobile-push Vikas Rawal
2011-12-07 16:49   ` Batch export to html Nick Dokos
2012-11-06 21:23   ` error: Execution of bibtex2html Nick Dokos
2012-11-07  3:51     ` Vikas Rawal

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=20121109221650.GA12344@panahar \
    --to=vikaslists@agrarianresearch.org \
    --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).