Ticket #274: bugtexinfo.lib

File bugtexinfo.lib, 3.2 KB (added by gorzel, 14 years ago)
Line 
1version = "$Id: bug.lib,v 1.0 2010/02/19 q$";
2
3category = "general";
4info =
5"
6LIBRARY: bugtexinfo.lib,
7PURPOSE: Shows a bug with texinfo and lib2doc
8AUTHOR:  Christian Gorzel, University of Muenster
9
10OVERVIEW:
11  This library demonstrates that TeX-commands have to be quoted in the
12  overview part. @*
13  A polynomial is non-constant @math{\iff \deg f \geq 1}. @*
14@texinfo
15@tex
16  A polynomial is non-constant \quad $\iff \deg f \geq 1$.
17@end tex
18@end texinfo
19@*
20  With quoting by a backslah, the text is fine.  @*
21  A polynomial is non-constant @math{\\iff \\deg f \\geq 1}.  @*
22@texinfo
23@tex
24  A polynomial is non-constant \\quad $\\iff \\deg f \\geq 1$.
25@end tex
26@end texinfo
27@*
28  However, in the help-string of a proc, a quoting is not needed --- there,
29  quoting gives incorrect text.  @*
30
31  Futhermore, commands like LIB \"poly.lib\"; need a blank after LIB, otherwise
32  no output will by produced.
33
34
35PROCEDURES:
36
37     is_constant(f;)  checks whether f is constant
38";
39
40// The bug is in pl2doc.pl
41// TeX commands work correctly in help-sting for procs,
42// since it doubles first the backslash (unless \") in texinfo and @math environment,
43
44LIB   "poly.lib";  // here is a blank necessary:  LIB"poly.lib";  cause problems
45///////////////////////////////////////////////////////////////////////////////
46
47proc is_constant(poly f)
48"USAGE: is_constant(f); f poly   
49RETURN: int, 1 if f is constant, 0 otherwise 
50NOTE:         A polynomial f is non-constant @math{\\iff \\deg f \\geq 1}. (with quoting) @*
51
52  A polynomial \"f\" is non-constant @math{\iff \deg f \geq 1}. (without quoting) @*
53@texinfo
54@tex
55  A polynomial is non-constant \quad $\iff \deg f \geq 1$. (without quoting)
56@end tex
57@end texinfo
58EXAMPLE: example is_constant; shows an example
59"
60{
61  return(deg(f)<1);
62}
63example
64{ "EXAMPLE:"; echo =2;
65   ring r = 0,x,dp;
66   is_constant(x+2);
67   is_constant(101);
68   is_constant(0);
69}
70///////////////////////////////////////////////////////////////////////////////
71
72/*
73
74pl2doc.pl   quoted in @texinfo   @math Umgebungen, um anschliessend wieder
75            doppelte backslashes zu entfernen. Dieses automatische quoten
76            fehlt beim info-help-string (Overview) der library.
77
78 This is the result, if above it is written LIB"poly.lib";  without a blank.
79
80libparse -i bugtexinfo.lib > bugtexinfo.perl
81perl ./pl2doc.pl -doc -o bugtexinfo.doc bugtexinfo.perl
82Bareword found where operator expected at bugtexinfo.perl line 31, near "]ERROR"
83  (Might be a runaway multi-line << string starting on line 6)
84        (Missing operator before ERROR?)
85Bareword found where operator expected at bugtexinfo.perl line 31, near "] cannot"
86        (Missing operator before cannot?)
87String found where operator expected at bugtexinfo.perl line 31, near "character ''"
88        (Do you need to predeclare character?)
89Bareword found where operator expected at bugtexinfo.perl line 31, near "'' in"
90        (Missing operator before in?)
91Bareword found where operator expected at bugtexinfo.perl line 31, near "1080979772 to"
92        (Missing operator before to?)
93syntax error at bugtexinfo.perl line 31, near "]ERROR occured"
94Compilation failed in require at ./pl2doc.pl line 37.
95make: *** [bugtexinfo.doc] Fehler 9
96
97Put some remarks in STYLEGUIDE4libdocs
98*/