all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* more global keys in ox-bibtex
@ 2017-01-22 19:21 Sébastien Le Maguer
  2017-02-03 21:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sébastien Le Maguer @ 2017-01-22 19:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

Dear All,

I did a mini-patch to capture completely the key in bibtex export. For example for the following key, in the bibtex2html produced file:

<a name="Balestri1999">Balestri et&nbsp;al., 1999</a>

only Balestri will be captured instead of Balestri et&nbsp;al., 1999

As it is 3 characters, I just submit the patch here and hope it might help :)

Kind regards,
Sébastien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ox-bibtex.el.diff --]
[-- Type: text/x-diff, Size: 608 bytes --]

diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 56dec38..fb34a5e 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -235,7 +235,7 @@ Return new parse tree."
 	      ;; Update `org-bibtex-html-entries-alist'.
 	      (goto-char (point-min))
 	      (while (re-search-forward
-		      "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\(\\w+\\)" nil t)
+		      "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t)
 		(push (cons (match-string 1) (match-string 2))
 		      org-bibtex-html-entries-alist)))
 	    ;; Open produced HTML file, wrap references within a block and

[-- Attachment #3: Type: text/plain, Size: 260 bytes --]


--
Dr. Sébastien Le Maguer
Postdoctorate researcher

Saarland University
Campus C7.4 - room 2.03
D-66123 Saarbrücken
Germany

phone : +49-681-302-70030
Mail: slemaguer@coli.uni-saarland.de
website :  http://www.coli.uni-saarland.de/~slemaguer/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: more global keys in ox-bibtex
  2017-01-22 19:21 more global keys in ox-bibtex Sébastien Le Maguer
@ 2017-02-03 21:21 ` Nicolas Goaziou
  2017-02-05  7:11   ` [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account Sebastien Le Maguer
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-02-03 21:21 UTC (permalink / raw)
  To: Sébastien Le Maguer; +Cc: emacs-orgmode

Hello,

Sébastien Le Maguer <slemaguer@coli.uni-saarland.de> writes:

> I did a mini-patch to capture completely the key in bibtex export. For example for the following key, in the bibtex2html produced file:
>
> <a name="Balestri1999">Balestri et&nbsp;al., 1999</a>
>
> only Balestri will be captured instead of Balestri et&nbsp;al., 1999
>
> As it is 3 characters, I just submit the patch here and hope it might
> help :)

Thank you.

Would you mind sending it using git format-patch and adding a commit
message?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account
  2017-02-03 21:21 ` Nicolas Goaziou
@ 2017-02-05  7:11   ` Sebastien Le Maguer
  2017-02-05  8:23     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Le Maguer @ 2017-02-05  7:11 UTC (permalink / raw)
  To: org mode


* ox-bibtex.el (org-bibtex-process-bib-files)
 solve a bug in which ox-bibtex was not considering enterily keys like "Author et&bsp; al., 1999" as valid.
 
---
 contrib/lisp/ox-bibtex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el
index 56dec38..fb34a5e 100644
--- a/contrib/lisp/ox-bibtex.el
+++ b/contrib/lisp/ox-bibtex.el
@@ -235,7 +235,7 @@ Return new parse tree."
 	      ;; Update `org-bibtex-html-entries-alist'.
 	      (goto-char (point-min))
 	      (while (re-search-forward
-		      "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\(\\w+\\)" nil t)
+		      "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t)
 		(push (cons (match-string 1) (match-string 2))
 		      org-bibtex-html-entries-alist)))
 	    ;; Open produced HTML file, wrap references within a block and
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account
  2017-02-05  7:11   ` [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account Sebastien Le Maguer
@ 2017-02-05  8:23     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2017-02-05  8:23 UTC (permalink / raw)
  To: Sebastien Le Maguer; +Cc: org mode

Hello,

Sebastien Le Maguer <slemaguer@coli.uni-saarland.de> writes:

> * ox-bibtex.el (org-bibtex-process-bib-files)
>  solve a bug in which ox-bibtex was not considering enterily keys like "Author et&bsp; al., 1999" as valid.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-05  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-22 19:21 more global keys in ox-bibtex Sébastien Le Maguer
2017-02-03 21:21 ` Nicolas Goaziou
2017-02-05  7:11   ` [PATCH] ox-bibtex.el: take key with spaces or non-alphabetic characters into account Sebastien Le Maguer
2017-02-05  8:23     ` Nicolas Goaziou

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.