Mercurial > octave
annotate scripts/miscellaneous/citation.m @ 31247:3dae836c598c
doc: Expand and edit documentation for memoization (bug #60860)
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Fri, 30 Sep 2022 06:38:59 -0400 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 ## |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
3 ## Copyright (C) 2013-2022 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
7 ## |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
8 ## This file is part of Octave. |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
9 ## |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
13 ## (at your option) any later version. |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
14 ## |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
15 ## Octave is distributed in the hope that it will be useful, but |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
18 ## GNU General Public License for more details. |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
19 ## |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
20 ## You should have received a copy of the GNU General Public License |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
21 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 ## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
25 |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
26 ## -*- texinfo -*- |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20164
diff
changeset
|
27 ## @deftypefn {} {} citation |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20164
diff
changeset
|
28 ## @deftypefnx {} {} citation @var{package} |
16810
62fa28af2842
doc: add citation() to documentation.
Rik <rik@octave.org>
parents:
16178
diff
changeset
|
29 ## Display instructions for citing GNU Octave or its packages in publications. |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
30 ## |
16810
62fa28af2842
doc: add citation() to documentation.
Rik <rik@octave.org>
parents:
16178
diff
changeset
|
31 ## When called without an argument, display information on how to cite the core |
20164
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19833
diff
changeset
|
32 ## GNU Octave system. |
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19833
diff
changeset
|
33 ## |
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19833
diff
changeset
|
34 ## When given a package name @var{package}, display information on citing the |
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19833
diff
changeset
|
35 ## specific named package. Note that some packages may not yet have |
df437a52bcaf
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19833
diff
changeset
|
36 ## instructions on how to cite them. |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
37 ## |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
38 ## The GNU Octave developers and its active community of package authors have |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
39 ## invested a lot of time and effort in creating GNU Octave as it is today. |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
40 ## Please give credit where credit is due and cite GNU Octave and its packages |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
41 ## when you use them. |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
42 ## |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
43 ## @end deftypefn |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
44 |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
45 ## Author: Carnë Draug <carandraug+dev@gmail.com> |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
46 ## Idea and documentation from R's citation() (also under GPL) |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
47 |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
48 function citation (package = "octave") |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
49 |
28789
28de41192f3c
Eliminate unneeded verification of nargin, nargout in m-files.
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
50 ## function takes care of validating PACKAGE input |
28de41192f3c
Eliminate unneeded verification of nargin, nargout in m-files.
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
51 display_info_file ("citation", package, "CITATION"); |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
52 |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
53 endfunction |
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
54 |
16810
62fa28af2842
doc: add citation() to documentation.
Rik <rik@octave.org>
parents:
16178
diff
changeset
|
55 |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
56 ## Test input validation |
16178
3a93af21d206
New function citation() to display citation information (patch #7960)
Carnë Draug <carandraug@octave.org>
parents:
diff
changeset
|
57 %!error <citation: PACKAGE must be a string> citation (1) |
28789
28de41192f3c
Eliminate unneeded verification of nargin, nargout in m-files.
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
58 %!error <citation: package .* is not installed> |
28de41192f3c
Eliminate unneeded verification of nargin, nargout in m-files.
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
59 %! citation ("__NOT_A_VALID_PKG_NAME__"); |