[gnumeric] Doc fixes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Doc fixes.
- Date: Wed, 1 Feb 2017 23:33:12 +0000 (UTC)
commit c84ca6cbc99365b6439d2ca5866cb877dcf19b04
Author: Morten Welinder <terra gnome org>
Date: Wed Feb 1 18:31:45 2017 -0500
Doc fixes.
This fixes some problems with non-ascii parameter names, such as
\alpha for BESSELI.
Also fixed is some build issues.
NEWS | 3 +++
doc/.gitignore | 1 -
doc/Makefile.am | 10 +++++-----
doc/{C => }/func.defs | 12 ++++++------
doc/{C => }/functions.xml | 32 ++++++++++++++++----------------
doc/make-func-list.pl | 24 +++++++++++++-----------
6 files changed, 43 insertions(+), 39 deletions(-)
---
diff --git a/NEWS b/NEWS
index dd30e1c..63e1931 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
Gnumeric 1.12.34
+Morten:
+ * Doc fixes.
+
--------------------------------------------------------------------------
Gnumeric 1.12.33
diff --git a/doc/.gitignore b/doc/.gitignore
index 8d483a9..f842e0a 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -15,4 +15,3 @@ gnumeric.lot
gnumeric.pdf
gnumeric.tex
gnumeric.toc
-func.defs
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 52a011d..6a8533f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -539,12 +539,12 @@ uninstall-hook:
$(RM) $$helpdir/index.docbook; \
done
-functions_xml_parts = func.defs func-header.xml func-footer.xml
+functions_xml_parts = func.defs C/func-header.xml C/func-footer.xml
-functions.xml: $(gnumeric_docdir)/make-func-list.pl $(functions_xml_parts)
- (cat $(srcdir)/func-header.xml ; \
- $(PERL) $(gnumeric_docdir)/make-func-list.pl func.defs ; \
- cat $(srcdir)/func-footer.xml \
+functions.xml: $(srcdir)/make-func-list.pl $(functions_xml_parts)
+ (cat $(srcdir)/C/func-header.xml ; \
+ $(PERL) $(srcdir)/make-func-list.pl func.defs ; \
+ cat $(srcdir)/C/func-footer.xml \
) >functions.tmp ; \
if xmllint -noent --format --encode "UTF-8" functions.tmp >functions.out ; then \
mv functions.out $@; rm functions.tmp; \
diff --git a/doc/C/func.defs b/doc/func.defs
similarity index 99%
rename from doc/C/func.defs
rename to doc/func.defs
index 70267e5..8f76d0e 100644
--- a/doc/C/func.defs
+++ b/doc/func.defs
@@ -286,7 +286,7 @@
@{z}: a complex number
@{lower}: if true (the default), the lower incomplete gamma function, otherwise the upper incomplete gamma
function
@{regularize}: if true (the default), the regularized version of the incomplete gamma function
-@NOTE=The regularized incomplete gamma function is the unregularized incomplete gamma function divided by
gamma(@{a})
+@NOTE=The regularized incomplete gamma function is the unregularized incomplete gamma function divided by
gamma(@{a}).
@SEEALSO=GAMMA,IMIGAMMA
@CATEGORY=Complex
@@ -2583,7 +2583,7 @@ The depreciation coefficient used is:
@ARGUMENTDESCRIPTION=@{rate}: effective annual interest rate
@{values}: cash flow
@{dates}: dates of cash flow
-@DESCRIPTION=XNPV calculates the net present value of a cash flow at irregular times
+@DESCRIPTION=XNPV calculates the net present value of a cash flow at irregular times.
@NOTE=If @{type} is 0, the default, payment is at the end of each period. If @{type} is 1, payment is at
the beginning of each period.
@SEEALSO=NPV
@@ -3480,7 +3480,7 @@ The depreciation coefficient used is:
@SHORTDESC=eigenvalues and eigenvectors of the symmetric @{matrix}
@SYNTAX=EIGEN(matrix)
@ARGUMENTDESCRIPTION=@{matrix}: a symmetric matrix
-@NOTE=If @{matrix} is not symmetric, EIGEN returns #NUM! If @{matrix} does not contain an equal number of
columns and rows, EIGEN returns #VALUE!
+@NOTE=If @{matrix} is not symmetric, matching off-diagonal cells will be averaged on the assumption that the
non-symmetry is caused by unimportant rounding errors. If @{matrix} does not contain an equal number of
columns and rows, EIGEN returns #VALUE!
@CATEGORY=Mathematics
@FUNCTION=EVEN
@@ -5007,7 +5007,7 @@ LOGEST returns an array { m{n},m{n-1}, ...,m{1},b }.
@{known_xs}: known x-values
@DESCRIPTION=LOGFIT function applies the “least squares” method to fit the logarithmic equation y = a + b *
ln(sign * (x - c)) , sign = +1 or -1 to your data. The graph of the equation is a logarithmic curve moved
horizontally by c and possibly mirrored across the y-axis (if sign = -1).
LOGFIT returns an array having five columns and one row. `Sign' is given in the first column, `a', `b', and
`c' are given in columns 2 to 4. Column 5 holds the sum of squared residuals.
-@NOTE=An error is returned when there are less than 3 different x's or y's, or when the shape of the point
cloud is too different from a ``logarithmic'' one. You can use the above formula = a + b * ln(sign * (x - c))
or rearrange it to = (exp((y - a) / b)) / sign + c to compute unknown y's or x's, respectively. This is
non-linear fitting by trial-and-error. The accuracy of `c' is: width of x-range -> rounded to the next
smaller (10^integer), times 0.000001. There might be cases in which the returned fit is not the best possible.
+@NOTE=An error is returned when there are less than 3 different x's or y's, or when the shape of the point
cloud is too different from a ``logarithmic'' one. You can use the above formula = a + b * ln(sign * (x - c))
or rearrange it to = (exp((y - a) / b)) / sign + c to compute unknown y's or x's, respectively. This is
non-linear fitting by trial-and-error. The accuracy of `c' is: width of x-range -> rounded to the next
smaller (10^integer), times 0.000001. There might be cases in which the returned fit is not the best possible.
@SEEALSO=LOGREG,LINEST,LOGEST
@CATEGORY=Statistics
@@ -5260,7 +5260,7 @@ If the data set does not contain any duplicates this function returns a #N/A err
@SYNTAX=PERMUTATIONA(x,y)
@ARGUMENTDESCRIPTION=@{x}: total number of objects
@{y}: number of selected objects
-@NOTE=If both @{x} and @{y} equal 0, PERMUTATIONA returns 1. If @{x} < 0 or @{y} < 0, PERMUTATIONA returns
#NUM! If @{x} or @{y} are not integers, they are truncated
+@NOTE=If both @{x} and @{y} equal 0, PERMUTATIONA returns 1. If @{x} < 0 or @{y} < 0, PERMUTATIONA returns
#NUM! If @{x} or @{y} are not integers, they are truncated.
@ODF=This function is OpenFormula compatible.
@SEEALSO=POWER
@@ -6007,7 +6007,7 @@ If the data set does not contain any duplicates this function returns a #N/A err
@ARGUMENTDESCRIPTION=@{x}: number whose rank you want to find
@{ref}: list of numbers
@{order}: 0 (descending order) or non-zero (ascending order); defaults to 0
-@NOTE=In case of a tie, RANK returns the average rank.
+@NOTE=In case of a tie, RANK.AVG returns the average rank.
@EXCEL=This function is Excel 2010 compatible.
@SEEALSO=PERCENTRANK,RANK
diff --git a/doc/C/functions.xml b/doc/functions.xml
similarity index 99%
rename from doc/C/functions.xml
rename to doc/functions.xml
index 1178fb8..1262c94 100644
--- a/doc/C/functions.xml
+++ b/doc/functions.xml
@@ -3667,7 +3667,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>BESSELI</function>(<parameter>X</parameter>,<parameter/>α)</synopsis>
+ <synopsis><function>BESSELI</function>(<parameter>X</parameter>,<parameter>α</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -3705,7 +3705,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>BESSELJ</function>(<parameter>X</parameter>,<parameter/>α)</synopsis>
+ <synopsis><function>BESSELJ</function>(<parameter>X</parameter>,<parameter>α</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -3743,7 +3743,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>BESSELK</function>(<parameter>X</parameter>,<parameter/>α)</synopsis>
+ <synopsis><function>BESSELK</function>(<parameter>X</parameter>,<parameter>α</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -3781,7 +3781,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>BESSELY</function>(<parameter>X</parameter>,<parameter/>α)</synopsis>
+ <synopsis><function>BESSELY</function>(<parameter>X</parameter>,<parameter>α</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -11434,7 +11434,7 @@
</refsect1>
<refsect1>
<title>Note</title>
- <para>If <parameter>matrix</parameter> is not symmetric, <function>EIGEN</function> returns #NUM! If
<parameter>matrix</parameter> does not contain an equal number of columns and rows,
<function>EIGEN</function> returns #VALUE!</para>
+ <para>If <parameter>matrix</parameter> is not symmetric, matching off-diagonal cells will be
averaged on the assumption that the non-symmetry is caused by unimportant rounding errors. If
<parameter>matrix</parameter> does not contain an equal number of columns and rows,
<function>EIGEN</function> returns #VALUE!</para>
</refsect1>
</refentry>
<refentry id="gnumeric-function-EVEN">
@@ -14605,7 +14605,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
-
<synopsis><function>RANDLEVY</function>(<parameter>c</parameter>,<parameter/>α,<parameter/>β)</synopsis>
+
<synopsis><function>RANDLEVY</function>(<parameter>c</parameter>,<parameter>α</parameter>,<parameter>β</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14701,7 +14701,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDLOGNORM</function>(<parameter/>ζ,<parameter/>σ)</synopsis>
+
<synopsis><function>RANDLOGNORM</function>(<parameter>ζ</parameter>,<parameter>σ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14766,7 +14766,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDNORM</function>(<parameter/>μ,<parameter/>σ)</synopsis>
+ <synopsis><function>RANDNORM</function>(<parameter>μ</parameter>,<parameter>σ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14798,7 +14798,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDNORMTAIL</function>(<parameter>a</parameter>,<parameter/>σ)</synopsis>
+
<synopsis><function>RANDNORMTAIL</function>(<parameter>a</parameter>,<parameter>σ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14858,7 +14858,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDPOISSON</function>(<parameter/>λ)</synopsis>
+ <synopsis><function>RANDPOISSON</function>(<parameter>λ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14890,7 +14890,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDRAYLEIGH</function>(<parameter/>σ)</synopsis>
+ <synopsis><function>RANDRAYLEIGH</function>(<parameter>σ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14917,7 +14917,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDRAYLEIGHTAIL</function>(<parameter>a</parameter>,<parameter/>σ)</synopsis>
+
<synopsis><function>RANDRAYLEIGHTAIL</function>(<parameter>a</parameter>,<parameter>σ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14946,7 +14946,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDSNORM</function>(<parameter/>𝛼,<parameter/>𝜉,<parameter/>𝜔)</synopsis>
+
<synopsis><function>RANDSNORM</function>(<parameter>𝛼</parameter>,<parameter>𝜉</parameter>,<parameter>𝜔</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -14984,7 +14984,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>RANDSTDIST</function>(<parameter>df</parameter>,<parameter/>𝛼)</synopsis>
+
<synopsis><function>RANDSTDIST</function>(<parameter>df</parameter>,<parameter>𝛼</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
@@ -20327,7 +20327,7 @@
</refsect1>
<refsect1>
<title>Note</title>
- <para>In case of a tie, RANK.AVG returns the average rank.</para>
+ <para>In case of a tie, <function>RANK.AVG</function> returns the average rank.</para>
</refsect1>
<refsect1>
<title>Microsoft Excel Compatibility</title>
@@ -22879,7 +22879,7 @@
</refpurpose>
</refnamediv>
<refsynopsisdiv>
- <synopsis><function>HPFILTER</function>(<parameter>Sequence</parameter>,<parameter/>λ)</synopsis>
+
<synopsis><function>HPFILTER</function>(<parameter>Sequence</parameter>,<parameter>λ</parameter>)</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Arguments</title>
diff --git a/doc/make-func-list.pl b/doc/make-func-list.pl
index 1bc1a04..4e1c1f1 100755
--- a/doc/make-func-list.pl
+++ b/doc/make-func-list.pl
@@ -17,6 +17,8 @@
use strict;
use warnings;
use diagnostics;
+use open IO => ':utf8';
+binmode STDOUT, ':utf8';
#
# Global state that we need to track
@@ -41,10 +43,10 @@ sub quote_stuff($) {
my ($str) = @_;
# Let's do this one first...
- $str =~ s/\&/\&/g;
+ $str =~ s/\&/\&/gu;
- $str =~ s/</\</g;
- $str =~ s/>/\>/g;
+ $str =~ s/</\</gu;
+ $str =~ s/>/\>/gu;
return $str;
}
@@ -52,9 +54,9 @@ sub markup_stuff($) {
my ($str) = @_;
$str = "e_stuff ($str);
- $str =~ s/\b$curfunc\b/<function>$curfunc<\/function>/g;
- $str =~ s/\@\{([^\}]*)\}/<parameter>$1<\/parameter>/g;
- $str =~ s/\@(\w*)\b/<parameter>$1<\/parameter>/g;
+ $str =~ s/\b$curfunc\b/<function>$curfunc<\/function>/gu;
+ $str =~ s/\@\{([^}]*)\}/<parameter>$1<\/parameter>/gu;
+ $str =~ s/\@(\w*)\b/<parameter>$1<\/parameter>/gu;
return $str;
}
@@ -102,8 +104,8 @@ sub process_category($) {
# And start on the new one
my $cat_id = "CATEGORY_" . $cat;
- $cat_id =~ s/\s+/_/g;
- $cat_id =~ s/[^A-Za-z_]//g;
+ $cat_id =~ s/\s+/_/gg;
+ $cat_id =~ s/[^A-Za-z_]//gu;
print $ws, "<sect1 id=\"$cat_id\">\n";
print $ws, " <title>", "e_stuff ($cat), "</title>\n";
push @tagstack, ('</sect1>');
@@ -200,7 +202,7 @@ sub process_syntax($) {
my ($str) = @_;
my $ws = " " x scalar(@tagstack);
$str = &markup_stuff ($str);
- $str =~ s/([\(\,])(\w*)/$1<parameter>$2<\/parameter>/g;
+ $str =~ s/([\(\,])(\w*)/$1<parameter>$2<\/parameter>/gu;
print $ws, "<refsynopsisdiv>\n";
print $ws, " <synopsis>$str</synopsis>\n";
print $ws, "</refsynopsisdiv>\n";
@@ -219,8 +221,8 @@ sub process_seealso($) {
my ($text) = @_;
my $linktxt = $text;
- $linktxt =~ s/\s//g;
- $linktxt =~ s/\.$//;
+ $linktxt =~ s/\s//gu;
+ $linktxt =~ s/\.$//u;
my @links = split (/,/, $linktxt);
my $ws = " " x scalar(@tagstack);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]