[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-
From: |
Edgar Lux |
Subject: |
Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite |
Date: |
Mon, 23 Jan 2023 21:58:31 +0100 (CET) |
On Jan 23, 2023 at 12:06 PM, Ihor Radchenko <yantar92@posteo.net> wrote:Edgar
Lux <edgarlux@mailfence.com> writes:
> So, what is the problem with LATEX_HEADER approach?
I thought that it would be preferable to have a native Org syntax.
> I do not like passing the options as-is in #+cite_export because not all
> the possible biblatex \usepackage options are affecting the
> bibliography. Options like sortcites, maxcitenames, autocite, etc are
> only affecting the citation style, not the bibliography. And options
> like bibencoding are totally irrelevant to both citation and
> bibliography styles.
That's fair, but it can just as well be used as a line to configure biblatex
(since it is already being used anyway). Besides, there are many other options
which do concern the style or are very needed
(hyperref=true,backref=true,url=true,backend=biber,natbib=true). I'm not
advocating for my suggestion, just showing my reasoning. As I said, I'm fine
with the =#+latex_header:=.
> > 1. case
> > #+begin_src org
> > #+cite_export: biblatex "how/much"
> > #+end_src
> >
> > the result is
> > #+begin_src latex
> > \usepackage[bibstyle=how,citestyle=much]{biblatex}
> > #+end_src
>
> This is actually confusing.
> This code is by Nicolas, but does not seem to be consistent with the
> idea of "BIBLIOGRAPHY STYLE".
>
> I am CCing him in cause if there is something I am missing.
The docstring says:
;; "cite_export" keyword. If you need to use different styles for
bibliography
;; and citations, you can separate them with "bibstyle/citestyle" syntax.
E.g.,
;;
;; #+cite_export: biblatex authortitle/authortitle-ibid
> This is plain abusing.
> We might remove the "/" matching completely and throw an error if there
> are commas inside style name. Users must not rely on such undocumented
> behavior.
Let the user decide (?). If she gets to that point, she surely knows how to
(ab)use it--in her favour.
> whether some of these are broken is up for discussion. The suggested patch
adds one conditional case, which searches for ="syle="=, takes away the
brackets and turns the above cases into:
[I do not see any patch attached]
WTF... again! (sorry)
diff --git a/lisp/oc-biblatex.el b/lisp/oc-biblatex.el
index a27f9e9bf..3e912f2d9 100644
--- a/lisp/oc-biblatex.el
+++ b/lisp/oc-biblatex.el
@@ -99,6 +99,10 @@ Return a string."
(style-options
(cond
((null style) nil)
+ ((string-match "style=" style)
+ (list (replace-regexp-in-string
+ "\\(style=[^/]*\\)/" "\\1,citestyle="
+ (org-unbracket-string "[" "]" style))))
((not (string-match "/" style)) (list (concat "style=" style)))
(t
(list (concat "bibstyle=" (substring style nil (match-beginning
0)))
> Why not storing email locally? Account limits are non-issue then ;)
The server does not allow me to download e-mails! (free as in... half a beer. I
can get the full beer if I pay for it, though). Thanks for the suggestion.
--
Sent with https://mailfence.com
Secure and private email
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite, (continued)
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite, Ihor Radchenko, 2023/01/20
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite, Ihor Radchenko, 2023/01/21
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite, Edgar Lux, 2023/01/22
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite, Ihor Radchenko, 2023/01/23
- Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite,
Edgar Lux <=
- [BUG] #+cite_export: ... bibstyle citestyle cannot be universally used as global defaults (was: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite), Ihor Radchenko, 2023/01/24