changeset 9167:1231b1762a9a

Simplify TeXinfo and eliminate use of @iftex in arith.txi
author Rik <rdrider0-list@yahoo.com>
date Fri, 01 May 2009 11:37:36 -0700
parents 69088b7b139c
children 742cf6388a8f
files doc/ChangeLog doc/interpreter/arith.txi scripts/general/del2.m scripts/general/nextpow2.m scripts/specfun/factor.m scripts/specfun/pow2.m src/DLD-FUNCTIONS/gcd.cc src/data.cc src/mappers.cc
diffstat 9 files changed, 30 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog	Fri May 01 14:00:54 2009 -0400
+++ b/doc/ChangeLog	Fri May 01 11:37:36 2009 -0700
@@ -1,7 +1,10 @@
-2009-04-26  Rik  <rdrider0-list@yahoo.com>
+2009-05-01  Rik  <rdrider0-list@yahoo.com>
+	* interpreter/arith.txi: Simplify TeXinfo and eliminate use of @iftex in arith.txi
+
+2009-05-01  Rik  <rdrider0-list@yahoo.com>
 	* interpreter/arith.txi: Update section 17.5 (Utility Functions) of arith.txi
 
-2009-04-26  Rik  <rdrider0-list@yahoo.com>
+2009-04-30  Rik  <rdrider0-list@yahoo.com>
 	* interpreter/arith.txi: Update section 17.4 (Sums and Products) of arith.txi
 
 2009-04-29  Jaroslav Hajek  <highegg@gmail.com>
--- a/doc/interpreter/arith.txi	Fri May 01 14:00:54 2009 -0400
+++ b/doc/interpreter/arith.txi	Fri May 01 11:37:36 2009 -0700
@@ -105,14 +105,12 @@
 
 Octave provides the following trigonometric functions where angles are
 specified in radians.  To convert from degrees to radians multiply by
-@iftex
 @tex
 $\pi/180$
 @end tex
-@end iftex
-@ifinfo
+@ifnottex
 @code{pi/180}
-@end ifinfo
+@end ifnottex
 (e.g., @code{sin (30 * pi/180)} returns the sine of 30 degrees).  As
 an alternative, Octave provides a number of trigonometric functions
 which work directly on an argument specified in degrees.  These functions
--- a/scripts/general/del2.m	Fri May 01 14:00:54 2009 -0400
+++ b/scripts/general/del2.m	Fri May 01 11:37:36 2009 -0700
@@ -29,7 +29,7 @@
 ## @ifnottex
 ## operator.
 ## @end ifnottex
-##  For a 2-dimensional matrix @var{m} this is defined as
+## For a 2-dimensional matrix @var{m} this is defined as
 ##
 ## @tex
 ## $$d = {1 \over 4} \left( {d^2 \over dx^2} M(x,y) + {d^2 \over dy^2} M(x,y) \right)$$
--- a/scripts/general/nextpow2.m	Fri May 01 14:00:54 2009 -0400
+++ b/scripts/general/nextpow2.m	Fri May 01 11:37:36 2009 -0700
@@ -20,13 +20,11 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} nextpow2 (@var{x})
 ## If @var{x} is a scalar, return the first integer @var{n} such that
-## @iftex
 ## @tex
-##  $2^n \ge |x|$.
+## $2^n \ge |x|$.
 ## @end tex
-## @end iftex
 ## @ifnottex
-##  2^n >= abs (x).
+## 2^n >= abs (x).
 ## @end ifnottex
 ##
 ## If @var{x} is a vector, return @code{nextpow2 (length (@var{x}))}.
--- a/scripts/specfun/factor.m	Fri May 01 14:00:54 2009 -0400
+++ b/scripts/specfun/factor.m	Fri May 01 11:37:36 2009 -0700
@@ -20,11 +20,12 @@
 ## @deftypefn  {Function File} {@var{p} =} factor (@var{q})
 ## @deftypefnx {Function File} {[@var{p}, @var{n}] =} factor (@var{q})
 ##
-## Return prime factorization of @var{q}.  That is @code{prod (@var{p})
-## == @var{q}}.  If @code{@var{q} == 1}, returns 1. 
+## Return prime factorization of @var{q}.  That is, @code{prod (@var{p})
+## == @var{q}} and every element of @var{p} is a prime number.  If
+## @code{@var{q} == 1}, returns 1. 
 ##
-## With two output arguments, returns the unique primes @var{p} and
-## their multiplicities.  That is @code{prod (@var{p} .^ @var{n}) ==
+## With two output arguments, return the unique primes @var{p} and
+## their multiplicities.  That is, @code{prod (@var{p} .^ @var{n}) ==
 ## @var{q}}.
 ## @seealso{gcd, lcm}
 ## @end deftypefn
--- a/scripts/specfun/pow2.m	Fri May 01 14:00:54 2009 -0400
+++ b/scripts/specfun/pow2.m	Fri May 01 11:37:36 2009 -0700
@@ -21,24 +21,20 @@
 ## @deftypefn {Mapping Function} {} pow2 (@var{x})
 ## @deftypefnx {Mapping Function} {} pow2 (@var{f}, @var{e})
 ## With one argument, computes
-## @iftex
 ## @tex
-##  $2^x$
+## $2^x$
 ## @end tex
-## @end iftex
 ## @ifnottex
-##  2 .^ x
+## 2 .^ x
 ## @end ifnottex
 ## for each element of @var{x}.
 ##
 ## With two arguments, returns
-## @iftex
 ## @tex
-##  $f \cdot 2^e$.
+## $f \cdot 2^e$.
 ## @end tex
-## @end iftex
 ## @ifnottex
-##  f .* (2 .^ e).
+## f .* (2 .^ e).
 ## @end ifnottex
 ## @seealso{log2, nextpow2}
 ## @end deftypefn
--- a/src/DLD-FUNCTIONS/gcd.cc	Fri May 01 14:00:54 2009 -0400
+++ b/src/DLD-FUNCTIONS/gcd.cc	Fri May 01 11:37:36 2009 -0700
@@ -80,16 +80,14 @@
 Optional return arguments @var{v1}, etc., contain integer vectors such\n\
 that,\n\
 \n\
+@tex\n\
+$g = v_1 a_1 + v_2 a_2 + \\cdots$\n\
+@end tex\n\
 @ifnottex\n\
 @example\n\
 @var{g} = @var{v1} .* @var{a1} + @var{v2} .* @var{a2} + @dots{}\n\
 @end example\n\
 @end ifnottex\n\
-@iftex\n\
-@tex\n\
-$g = v_1 a_1 + v_2 a_2 + \\cdots$\n\
-@end tex\n\
-@end iftex\n\
 \n\
 For backward compatibility with previous versions of this function, when\n\
 all arguments are scalar, a single return argument @var{v1} containing\n\
--- a/src/data.cc	Fri May 01 14:00:54 2009 -0400
+++ b/src/data.cc	Fri May 01 11:37:36 2009 -0700
@@ -998,15 +998,19 @@
 \n\
 If called with two output arguments, split @var{x} into\n\
 binary mantissa and exponent so that\n\
-@iftex\n\
 @tex\n\
 ${1 \\over 2} \\le \\left| f \\right| < 1$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{1/2 <= abs(f) < 1}\n\
 @end ifnottex\n\
-and @var{e} is an integer.  If @code{x = 0}, @code{f = e = 0}.\n\
+and @var{e} is an integer.  If\n\
+@tex\n\
+$x = 0$, $f = e = 0$.\n\
+@end tex\n\
+@ifnottex\n\
+@code{x = 0}, @code{f = e = 0}.\n\
+@end ifnottex\n\
 @seealso{pow2, log, log10, exp}\n\
 @end deftypefn")
 {
--- a/src/mappers.cc	Fri May 01 14:00:54 2009 -0400
+++ b/src/mappers.cc	Fri May 01 11:37:36 2009 -0700
@@ -40,11 +40,9 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} abs (@var{z})\n\
 Compute the magnitude of @var{z}, defined as\n\
-@iftex\n\
 @tex\n\
 $|z| = \\sqrt{x^2 + y^2}$.\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 |@var{z}| = @code{sqrt (x^2 + y^2)}.\n\
 @end ifnottex\n\
@@ -177,11 +175,9 @@
 @deftypefn {Mapping Function} {} arg (@var{z})\n\
 @deftypefnx {Mapping Function} {} angle (@var{z})\n\
 Compute the argument of @var{z}, defined as,\n\
-@iftex\n\
 @tex\n\
 $\\theta = atan2 (y, x),$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @var{theta} = @code{atan2 (@var{y}, @var{x})},\n\
 @end ifnottex\n\
@@ -402,11 +398,9 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} conj (@var{z})\n\
 Return the complex conjugate of @var{z}, defined as\n\
-@iftex\n\
 @tex\n\
 $\\bar{z} = x - iy$.\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{conj (@var{z})} = @var{x} - @var{i}@var{y}.\n\
 @end ifnottex\n\
@@ -612,11 +606,9 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} exp (@var{x})\n\
 Compute\n\
-@iftex\n\
 @tex\n\
 $e^{x}$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{e^x}\n\
 @end ifnottex\n\
@@ -652,12 +644,10 @@
 DEFUN (expm1, args, ,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} expm1 (@var{x})\n\
-Compute \n\
-@iftex\n\
+Compute\n\
 @tex\n\
 $ e^{x} - 1 $\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{exp (@var{x}) - 1}\n\
 @end ifnottex\n\
@@ -1221,11 +1211,9 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} log (@var{x})\n\
 Compute the natural logarithm,\n\
-@iftex\n\
 @tex\n\
 $\\ln{(x)},$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{ln (@var{x})},\n\
 @end ifnottex\n\
@@ -1286,11 +1274,9 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} log1p (@var{x})\n\
 Compute\n\
-@iftex\n\
 @tex\n\
 $\\ln{(1 + x)}$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 @code{log (1 + @var{x})}\n\
 @end ifnottex\n\
@@ -1408,13 +1394,11 @@
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} sign (@var{x})\n\
 Compute the @dfn{signum} function, which is defined as\n\
-@iftex\n\
 @tex\n\
 $$\n\
 {\\rm sign} (@var{x}) = \\cases{1,&$x>0$;\\cr 0,&$x=0$;\\cr -1,&$x<0$.\\cr}\n\
 $$\n\
 @end tex\n\
-@end iftex\n\
 @ifnottex\n\
 \n\
 @example\n\