Commit c84ca6cb authored by Morten Welinder's avatar Morten Welinder

Doc fixes.

This fixes some problems with non-ascii parameter names, such as
\alpha for BESSELI.

Also fixed is some build issues.
parent 798755af
Gnumeric 1.12.34
Morten:
* Doc fixes.
--------------------------------------------------------------------------
Gnumeric 1.12.33
......
......@@ -15,4 +15,3 @@ gnumeric.lot
gnumeric.pdf
gnumeric.tex
gnumeric.toc
func.defs
......@@ -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; \
......
......@@ -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
......
......@@ -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>
......
......@@ -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/\&/\&amp;/g;
$str =~ s/\&/\&amp;/gu;
$str =~ s/</\&lt;/g;
$str =~ s/>/\&gt;/g;
$str =~ s/</\&lt;/gu;
$str =~ s/>/\&gt;/gu;
return $str;
}
......@@ -52,9 +54,9 @@ sub markup_stuff($) {
my ($str) = @_;
$str = &quote_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>", &quote_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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment