emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Edgar Lux <edgarlux@mailfence.com>
To: emacs-orgmode@gnu.org
Subject: Re: Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite
Date: Mon, 23 Jan 2023 21:58:31 +0100 (CET)	[thread overview]
Message-ID: <1897723911.54727.1674507511254@fidget.co-bxl> (raw)
In-Reply-To: <87tu0h5x33.fsf@localhost>

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


  reply	other threads:[~2023-01-23 21:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 21:31 Patch for \usepackage[ ... natbib = true ...]{...biblatex} with org-cite Edgar Lux
2023-01-20 10:59 ` Ihor Radchenko
2023-01-20 16:57   ` Edgar Lux
2023-01-21  8:37 ` Ihor Radchenko
2023-01-21 20:25   ` Edgar Lux
2023-01-22 11:15     ` Ihor Radchenko
2023-01-22 11:36       ` András Simonyi
2023-01-22 19:47         ` Edgar Lux
2023-01-23 10:43           ` Ihor Radchenko
2023-01-22 19:19       ` Edgar Lux
2023-01-23 11:06         ` Ihor Radchenko
2023-01-23 20:58           ` Edgar Lux [this message]
2023-01-24 10:54             ` [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-02-03  9:33               ` Edgar Lux
2023-02-04 11:31                 ` Ihor Radchenko
2023-02-04 23:14                   ` Edgar Lux

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=1897723911.54727.1674507511254@fidget.co-bxl \
    --to=edgarlux@mailfence.com \
    --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).