Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-20 Thread Ihor Radchenko
Rens Oliemans  writes:

> Ihor Radchenko  writes:
>
>> Thanks! I have incorporated all your suggestions into the new version of
>> the patch (attached).
>
> Thanks, it looks good to me!

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3f539bc3d

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-18 Thread Rens Oliemans
Ihor Radchenko  writes:

> Thanks! I have incorporated all your suggestions into the new version of
> the patch (attached).

Thanks, it looks good to me!

> Yes, it is. Applying diff is easy - easier than manually editing the
> changes according to comments in the email.

Great, good to know.

Best,
Rens



Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-17 Thread Ihor Radchenko
Rens Oliemans  writes:

> Thanks for the patch, it looks good and is an improvement over the
> somewhat terse previous version. I do have some thoughts though so will
> chime in. ...

Thanks! I have incorporated all your suggestions into the new version of
the patch (attached).

>> -  When style is not specified, default style is used
>> +  When style is not specified, default style (=nil=) specified by the
>> +  citation processor is used
>
> I am only slightly familiar with Org's citation handling, and this part
> of the manual is a bit confusing to me. I wrote a small patch on top of
> yours with something that is clearer to me, but perhaps this is unique to
> me.

Your changes look reasonable.

> PS: is such a way of including a patch (that builds upon a discussed
> patch) the best way to communicate changes? 

Yes, it is. Applying diff is easy - easier than manually editing the
changes according to comments in the email.

>From 751d73fd0ae00a9a017cd73d5c6c7b2eb7412b5b Mon Sep 17 00:00:00 2001
Message-ID: <751d73fd0ae00a9a017cd73d5c6c7b2eb7412b5b.1715943408.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Mon, 6 May 2024 11:40:18 +0300
Subject: [PATCH v3] org-manual: Add better opening description to "Citation
 handling" section

* doc/org-manual.org (Citation handling): Rewrite the opening
paragraphs describing citations using less technical description.  The
new version aims to ordinary Org mode users and avoids talking about
Elisp libraries.
(Citations): Unify markup for citation processor names (use verbatim).
Mention that at least one #+PRINT_BIBLIOGRAPHY is mandatory to render
output.  Indicate that default citation style is "nil".
---
 doc/org-manual.org | 99 --
 1 file changed, 70 insertions(+), 29 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index e3a2c9b70..920114f70 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -17493,30 +17493,68 @@ * Citation handling
 #+cindex: citation
 #+cindex: citation processor
 
-The =oc.el= library provides tooling to handle citations in Org via
-"citation processors" that offer some or all of the following
-capabilities:
+While links (see [[*Hyperlinks]]) are often sufficient to refer to
+external or internal information from Org, they have their limitations
+when referring to multiple targets or typesetting printed
+publications.
 
-- activate :: Fontification, tooltip preview, etc.
-- follow :: At-point actions on citations via ~org-open-at-point~.
-- insert :: Add and edit citations via ~org-cite-insert~.
-- export :: Via different libraries for different target formats.
+Org mode provides a more sophisticated markup to "cite" external
+resources.  For example, consider the following Org mode snippet
 
-To use a "citation processor", the user must load them; for example;
+: #+bibliography: citationdata.bib
+:
+: Org mode is used by various communities [cite:teaching: @orgteaching;
+: and TeX: @orgtex].  [cite/author/caps:@orgtex] uses Org mode to simplify
+: writing scientific publications, while [cite/author/caps:@orgteaching]
+: experiment with Org babel to improve teaching.
+:
+: #+print_bibliography:
 
-#+begin_src emacs-lisp
-(require 'oc-bibtex)
-#+end_src
+Org mode will gather citation metadata from the =#+bibliography=
+database and use it to typeset the exported document in arbitrary
+formats.  For example, the snippet below shows ASCII export output.
+
+: Org mode is used by various communities (teaching: Birkenkrahe, Marcus,
+: 2023, and TeX: Somma, Emmanuele F, 2023).  Somma, Emmanuele F uses Org
+: mode to simplify writing scientific publications, while Birkenkrahe,
+: Marcus experiment with Org babel to improve teaching.
+:
+: Birkenkrahe, Marcus (2023). /Teaching Data Science with Literate
+: Programming Tools/, MDPI.
+:
+: Somma, Emmanuele F (2023). /Simplifying LaTeX with ORG-mode in Emacs/,
+: TUGboat volume.
+
+In addition to export, users can use completion to search and insert
+citations from the bibliography (via ~org-cite-insert~).  Citations
+also act like ordinary links, jumping to the citation metadata when
+"following" them using ~org-open-at-point~.
+
+You can customize every aspect (/capability/) of citation handling
+using built-in or external /citation processors/.
+
+Org mode ships with several built-in citation processors tailored to
+work with LaTeX export and BibTeX bibliographies (=bibtex=,
+=biblatex=, and =natbib= processors), or with more generic formats
+described using [[https://citationstyles.org/][Citation Style
+Language]] (=csl= processor).
+The default citation processor is =basic= - it works with arbitrary
+export formats and recognizes both BibTeX and CSL bibliographies.
+More citation processors are distributed as Emacs packages.
 
 #+vindex: org-cite-activate-processor
 #+vindex: org-cite-follow-processor
 #+vindex: org-cite-insert-processor
 #+vindex: org-cite-export-processor
-They can then configure them with 

Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-14 Thread Rens Oliemans
Thanks for the patch, it looks good and is an improvement over the
somewhat terse previous version. I do have some thoughts though so will
chime in. Note that I am not a native speaker, it might be best if we get
extra eyes from a(nother?) native speaker.

Ihor Radchenko  writes:

> +While [[*Hyperlinks][links]] are often sufficient to refer to external
> +or internal information from Org, they have their limitations when
> +referring to multiple targets or typesetting printed publications.

In Emacs Info, this renders as

   "While see links. are often sufficient ...".

This seems quite unnatural to me. I would suggest using a different way
of referencing (without "see [link].") if possible, or rewording the
sentence otherwise.

> +In addition to export, users can use completion to search and insert
> +citations from the bibliography (via ~org-cite-insert~).  Citations
> +also act like ordinary links, jumping to the citation metadata when
> +"following" them (~org-open-at-point~).

Alternatively:

   when "following" them using ~org-open-at-point~.

For a more natural sentence?

> +Org mode ships with several built-in citation processors tailored to
> +work with LaTeX export and BibTeX bibliographies (=bibtex=,
> +=biblatex=, and =natbib= processors), or with more generic formats
> +described using [[https://citationstyles.org/][Citation Style
> +Language]] (=csl= processor).
> +
> +The default citation processor is =basic= - it works with arbitrary
> +export formats and recognizes both BibTeX and CSL bibliographies.
> +
> +More citation processors are distributed as Emacs packages.

These very small paragraphs read a bit clunky to me, I think that it's
better to merge them into a single paragraph.

> -  When style is not specified, default style is used
> +  When style is not specified, default style (=nil=) specified by the
> +  citation processor is used

I am only slightly familiar with Org's citation handling, and this part
of the manual is a bit confusing to me. I wrote a small patch on top of
yours with something that is clearer to me, but perhaps this is unique to
me.

>From 70fe33fe0012c124fd011011ee77e544e18d50ad Mon Sep 17 00:00:00 2001
From: Rens Oliemans 
Date: Tue, 14 May 2024 20:45:01 +0200
Subject: [PATCH] org-manual: clarify default style

I don't intend this commit to be merged but instead to be squashed in
the existing patch.
---
 doc/org-manual.org | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 50af99c5b..c2f08be17 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -17609,16 +17609,16 @@ identifying a reference in the bibliography.
 
   : [cite/style:common prefix ;prefix @key suffix; ... ; common suffix]
 
-  When style is not specified, default style (=nil=) specified by the
-  citation processor is used
+  When =style= is not specified, one of the two default styles are
+  used
 
-  + either the default style specified in =CITE_EXPORT= keyword (see
-[[*Citation export processors]])
+  + either the default style specified in the =CITE_EXPORT= keyword
+(see [[*Citation export processors]])
 
 : #+cite_export: basic numeric noauthor/bare
 : [cite:@key] is the same as [cite/noauthor/bare:@key]
 
-  + or using default =nil= style
+  + or, if =CITE_EXPORT= is not set, using the default =nil= style
 
 : [cite:@key] is the same as [cite/nil:@key]
 
-- 
2.44.0


Is this understanding of the 'style' specification correct? This is what
I concluded from reading the manual, if it is incorrect, please forgive
me and let me know how exactly I am incorrect, perhaps that can
illuminate this part ;)


Best,
Rens

PS: is such a way of including a patch (that builds upon a discussed
patch) the best way to communicate changes? 


Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-14 Thread András Simonyi
Dear All,

On Sat, 11 May 2024 at 11:55, Ihor Radchenko  wrote:

> See the attached updated version of the patch with all your comments
> addressed.

Thanks Ihor, the patch looks good to me now!

best wishes,
András



Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-11 Thread Ihor Radchenko
András Simonyi  writes:

> ... Some comments on the proposed changes:
> ...

Thanks for the comments!
See the attached updated version of the patch with all your comments
addressed.

>> At least one =PRINT_BIBLIOGRAPHY= keyword must be present in the
>> document to render citations on export.
>
> That is not true in general, as the csl processor and most probably
> some others too can render citations without a bibliography; there are
> even citation styles (typically, note-based ones) that are designed to
> work without a bibliography and specify all bibliographic data in
> citations. Because of this I suggest removing or at least rewriting
> this sentence.

Right. It is only true in bibtex-based processors, and only when the
citation  command tries to create a link to (missing) bibliography
record. I removed this passage completely.

>From e16e5b2c678a18a772f338162fbfb9d2626b9317 Mon Sep 17 00:00:00 2001
Message-ID: 
From: Ihor Radchenko 
Date: Mon, 6 May 2024 11:40:18 +0300
Subject: [PATCH v2] org-manual: Add better opening description to "Citation
 handling" section

* doc/org-manual.org (Citation handling): Rewrite the opening
paragraphs describing citations using less technical description.  The
new version aims to ordinary Org mode users and avoids talking about
Elisp libraries.
(Citations): Unify markup for citation processor names (use verbatim).
Mention that at least one #+PRINT_BIBLIOGRAPHY is mandatory to render
output.  Indicate that default citation style is "nil".
---
 doc/org-manual.org | 94 +-
 1 file changed, 68 insertions(+), 26 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 3c60f3268..bf9547ae9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -17491,30 +17491,69 @@ * Citation handling
 #+cindex: citation
 #+cindex: citation processor
 
-The =oc.el= library provides tooling to handle citations in Org via
-"citation processors" that offer some or all of the following
-capabilities:
+While [[*Hyperlinks][links]] are often sufficient to refer to external
+or internal information from Org, they have their limitations when
+referring to multiple targets or typesetting printed publications.
 
-- activate :: Fontification, tooltip preview, etc.
-- follow :: At-point actions on citations via ~org-open-at-point~.
-- insert :: Add and edit citations via ~org-cite-insert~.
-- export :: Via different libraries for different target formats.
+Org mode provides a more sophisticated markup to "cite" external
+resources.  For example, consider the following Org mode snippet
 
-To use a "citation processor", the user must load them; for example;
+: #+bibliography: citationdata.bib
+:
+: Org mode is used by various communities [cite:teaching: @orgteaching;
+: and TeX: @orgtex].  [cite/author/caps:@orgtex] uses Org mode to simplify
+: writing scientific publications, while [cite/author/caps:@orgteaching]
+: experiment with Org babel to improve teaching.
+:
+: #+print_bibliography:
 
-#+begin_src emacs-lisp
-(require 'oc-bibtex)
-#+end_src
+Org mode will gather citation metadata from the =#+bibliography=
+database and use it to typeset the exported document in arbitrary
+formats.  For example, the snippet below shows ASCII export output.
+
+: Org mode is used by various communities (teaching: Birkenkrahe, Marcus,
+: 2023, and TeX: Somma, Emmanuele F, 2023).  Somma, Emmanuele F uses Org
+: mode to simplify writing scientific publications, while Birkenkrahe,
+: Marcus experiment with Org babel to improve teaching.
+:
+: Birkenkrahe, Marcus (2023). /Teaching Data Science with Literate
+: Programming Tools/, MDPI.
+:
+: Somma, Emmanuele F (2023). /Simplifying LaTeX with ORG-mode in Emacs/,
+: TUGboat volume.
+
+In addition to export, users can use completion to search and insert
+citations from the bibliography (via ~org-cite-insert~).  Citations
+also act like ordinary links, jumping to the citation metadata when
+"following" them (~org-open-at-point~).
+
+You can customize every aspect (/capability/) of citation handling
+using built-in or external /citation processors/.
+
+Org mode ships with several built-in citation processors tailored to
+work with LaTeX export and BibTeX bibliographies (=bibtex=,
+=biblatex=, and =natbib= processors), or with more generic formats
+described using [[https://citationstyles.org/][Citation Style
+Language]] (=csl= processor).
+
+The default citation processor is =basic= - it works with arbitrary
+export formats and recognizes both BibTeX and CSL bibliographies.
+
+More citation processors are distributed as Emacs packages.
 
 #+vindex: org-cite-activate-processor
 #+vindex: org-cite-follow-processor
 #+vindex: org-cite-insert-processor
 #+vindex: org-cite-export-processor
-They can then configure them with ~org-cite-activate-processor~,
-~org-cite-follow-processor~, ~org-cite-insert-processor~, and
-~org-cite-export-processors~ respectively.
+Multiple citation processors can be mixed to meet 

Re: [PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-10 Thread András Simonyi
Dear Ihor,

thanks for working on this, I agree that the current version,
especially the introduction, was too technical, so that is a  very
good direction to take. Some comments on the proposed changes:

> Org mode will gather citation metadata from =#+bibliography= database
> and use it to typeset the exported document in arbitrary formats.
> For example, below snippet shows ASCII export output.

Hopefully native speakers will chime in, but the phrase "below
snippet" sounds strange to me, I feel that "the snippet below"  would
be a better solution. Also, maybe a "the" could be inserted before
"=#+bibliography= database".

> Org mode ships with several built-in citation processors tailored to
> work with LaTeX export and BiBTeX bibliographies (=bibtex=,
> =biblatex=, and =natbib= processors), or with more generic Citation
> Style Language bibliographies (=csl= processor).

Perhaps the second part of the sentence would be a bit more precise
along the following lines:
"or with more generic bibliography and citation formats described
using/in the Citation Style Language (=csl= processor)"
and maybe "Citation Style Language" could link to the CSL site
https://citationstyles.org/.

> The default citation processor is =basic= - it works with arbitrary
> export formats and recognized both BiBTeX and CSL bibliographies.

Here I think there is a typo as "recognized" should be "recognizes".

> At least one =PRINT_BIBLIOGRAPHY= keyword must be present in the
> document to render citations on export.

That is not true in general, as the csl processor and most probably
some others too can render citations without a bibliography; there are
even citation styles (typically, note-based ones) that are designed to
work without a bibliography and specify all bibliographic data in
citations. Because of this I suggest removing or at least rewriting
this sentence.

best wishes,
András

On Mon, 6 May 2024 at 10:44, Ihor Radchenko  wrote:
>
> Hi,
>
> The current version of Citation handling section of the manual is rather
> technical. I tried to rewrite it aiming for ordinary users not familiar
> with Org mode internals.
>
> Please, let me know if it reads better.
>
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



[PATCH] org-manual: Rewrite opening section in Citation handling

2024-05-06 Thread Ihor Radchenko
Hi,

The current version of Citation handling section of the manual is rather
technical. I tried to rewrite it aiming for ordinary users not familiar
with Org mode internals.

Please, let me know if it reads better.

>From 89e5bd96a1219e85f8e6be7a6eabb840257b021a Mon Sep 17 00:00:00 2001
Message-ID: <89e5bd96a1219e85f8e6be7a6eabb840257b021a.1714984945.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Mon, 6 May 2024 11:40:18 +0300
Subject: [PATCH] org-manual: Add better opening description to "Citation
 handling" section

* doc/org-manual.org (Citation handling): Rewrite the opening
paragraphs describing citations using less technical description.  The
new version aims to ordinary Org mode users and avoids talking about
Elisp libraries.
(Citations): Unify markup for citation processor names (use verbatim).
Mention that at least one #+PRINT_BIBLIOGRAPHY is mandatory to render
output.  Indicate that default citation style is "nil".
---
 doc/org-manual.org | 89 ++
 1 file changed, 66 insertions(+), 23 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 1feb5ed60..59663a90f 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -17490,30 +17490,68 @@ * Citation handling
 #+cindex: citation
 #+cindex: citation processor
 
-The =oc.el= library provides tooling to handle citations in Org via
-"citation processors" that offer some or all of the following
-capabilities:
+While [[*Hyperlinks][links]] are often sufficient to refer to external
+or internal information from Org, they have their limitations when
+referring to multiple targets or typesetting printed publications.
 
-- activate :: Fontification, tooltip preview, etc.
-- follow :: At-point actions on citations via ~org-open-at-point~.
-- insert :: Add and edit citations via ~org-cite-insert~.
-- export :: Via different libraries for different target formats.
+Org mode provides a more sophisticated markup to "cite" external
+resources.  For example, consider the following Org mode snippet
 
-To use a "citation processor", the user must load them; for example;
+: #+bibliography: citationdata.bib
+:
+: Org mode is used by various communities [cite:teaching: @orgteaching;
+: and TeX: @orgtex].  [cite/author/caps:@orgtex] uses Org mode to simplify
+: writing scientific publications, while [cite/author/caps:@orgteaching]
+: experiment with Org babel to improve teaching.
+:
+: #+print_bibliography:
 
-#+begin_src emacs-lisp
-(require 'oc-bibtex)
-#+end_src
+Org mode will gather citation metadata from =#+bibliography= database
+and use it to typeset the exported document in arbitrary formats.
+For example, below snippet shows ASCII export output.
+
+: Org mode is used by various communities (teaching: Birkenkrahe, Marcus,
+: 2023, and TeX: Somma, Emmanuele F, 2023).  Somma, Emmanuele F uses Org
+: mode to simplify writing scientific publications, while Birkenkrahe,
+: Marcus experiment with Org babel to improve teaching.
+:
+: Birkenkrahe, Marcus (2023). /Teaching Data Science with Literate
+: Programming Tools/, MDPI.
+:
+: Somma, Emmanuele F (2023). /Simplifying LaTeX with ORG-mode in Emacs/,
+: TUGboat volume.
+
+In addition to export, users can use completion to search and insert
+citations from the bibliography (via ~org-cite-insert~).  Citations
+also act like ordinary links, jumping to the citation metadata when
+"following" them (~org-open-at-point~).
+
+You can customize every aspect (/capability/) of citation handling
+using built-in or external /citation processors/.
+
+Org mode ships with several built-in citation processors tailored to
+work with LaTeX export and BiBTeX bibliographies (=bibtex=,
+=biblatex=, and =natbib= processors), or with more generic Citation
+Style Language bibliographies (=csl= processor).
+
+The default citation processor is =basic= - it works with arbitrary
+export formats and recognized both BiBTeX and CSL bibliographies.
+
+More citation processors are distributed as Emacs packages.
 
 #+vindex: org-cite-activate-processor
 #+vindex: org-cite-follow-processor
 #+vindex: org-cite-insert-processor
 #+vindex: org-cite-export-processor
-They can then configure them with ~org-cite-activate-processor~,
-~org-cite-follow-processor~, ~org-cite-insert-processor~, and
-~org-cite-export-processors~ respectively.
+Multiple citation processors can be mixed to meet your preferences.
+Configure ~org-cite-activate-processor~, ~org-cite-follow-processor~,
+~org-cite-insert-processor~, and ~org-cite-export-processors~ to
+select which processor to use for every citation capability:
 
-The included "basic" processor provides all four capabilities.
+- activate :: Fontification, tooltip preview, etc.
+- follow :: At-point actions on citations via ~org-open-at-point~.
+- insert :: Add and edit citations via ~org-cite-insert~.
+- export :: Via different libraries for different target formats.
 
 ** Citations
 
@@ -17567,7 +17605,8 @@ ** Citations
 
   : [cite/style:common