Changeset 354f3b in git for doc/doc2tex.pl
- Timestamp:
- Nov 29, 1999, 1:56:11 PM (23 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 6429844b12e9748d6a461099af9e807e552d8950
- Parents:
- 7736c5c981277530fc20586946850a0fe14b5348
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/doc2tex.pl
r7736c5 r354f3b 1 1 #!/usr/local/bin/perl 2 # $Id: doc2tex.pl,v 1. 19 1999-11-24 18:50:40obachman Exp $2 # $Id: doc2tex.pl,v 1.20 1999-11-29 12:56:07 obachman Exp $ 3 3 ################################################################### 4 4 # Computer Algebra System SINGULAR … … 163 163 { 164 164 $line++; 165 166 165 if (/^\@c\s*example/) {&HandleExample; next;} 167 166 if (/^\@c\s*include\s+/) {&HandleInclude; next;} … … 177 176 print TEX $_; 178 177 178 if (! $printed_header && /^\@c/) 179 { 180 $printed_header = 1; 181 print TEX <<EOT; 182 \@comment This file was generated by doc2tex.pl from $doc_file 183 \@comment DO NOT EDIT DIRECTLY, BUT EDIT $doc_file INSTEAD 184 EOT 185 } 186 179 187 if (/^\@bye$/) {last;} 180 188 } … … 189 197 ###################################################################### 190 198 # @c example [error] [no_comp] 191 # -> the text till the next @c example is fe ed into Singular,199 # -> the text till the next @c example is fed into Singular, 192 200 # the text is then substituted by 193 201 # @c computed example $ex_prefix $doc_file:$line … … 265 273 if ($reuse && $cache) 266 274 { 275 my $ok = 1; 267 276 print "<$ex_prefix>" if ($verbose); 268 277 print TEX "\@c reused example $ex_prefix $doc_file:$lline \n"; 269 278 open(INC, "<$inc_file") || Error("can't open $inc_file for reading: $!\n"); 270 while (<INC>){ print TEX $_;} 279 while (<INC>) 280 { 281 if (/error occurred/ && $ok && !error_ok) 282 { 283 Warn("Result file $inc_file contains errors. Force re-computation by removing $inc_file"); 284 $ok = 0; 285 } 286 print TEX $_; 287 } 271 288 close(INC); 272 289 } … … 580 597 } 581 598 599 sub Warn 600 { 601 print "$WARNING $_[0]\n"; 602 } 582 603 # 583 604 # leave this here --otherwise fontification in my emacs gets screwd up
Note: See TracChangeset
for help on using the changeset viewer.