Changeset 354f3b in git for doc/doc2tex.pl


Ignore:
Timestamp:
Nov 29, 1999, 1:56:11 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
6429844b12e9748d6a461099af9e807e552d8950
Parents:
7736c5c981277530fc20586946850a0fe14b5348
Message:
 Changes to docu and install


git-svn-id: file:///usr/local/Singular/svn/trunk@3933 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/doc2tex.pl

    r7736c5 r354f3b  
    11#!/usr/local/bin/perl
    2 # $Id: doc2tex.pl,v 1.19 1999-11-24 18:50:40 obachman Exp $
     2# $Id: doc2tex.pl,v 1.20 1999-11-29 12:56:07 obachman Exp $
    33###################################################################
    44#  Computer Algebra System SINGULAR
     
    163163{
    164164  $line++;
    165  
    166165  if (/^\@c\s*example/)     {&HandleExample; next;}
    167166  if (/^\@c\s*include\s+/)  {&HandleInclude; next;}
     
    177176  print TEX $_;
    178177
     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
     184EOT
     185  }
     186
    179187  if (/^\@bye$/)            {last;}
    180188}
     
    189197######################################################################
    190198# @c example [error] [no_comp]
    191 #    -> the text till the next @c example is feed into Singular,
     199#    -> the text till the next @c example is fed into Singular,
    192200#       the text is then substituted by
    193201#       @c computed example $ex_prefix $doc_file:$line
     
    265273  if ($reuse && $cache)
    266274  {
     275    my $ok = 1;
    267276    print "<$ex_prefix>" if ($verbose);
    268277    print TEX "\@c reused example $ex_prefix $doc_file:$lline \n";
    269278    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    }
    271288    close(INC);
    272289  }
     
    580597}
    581598
     599sub Warn
     600{
     601  print "$WARNING $_[0]\n";
     602}
    582603#
    583604# leave this here --otherwise fontification in my emacs gets screwd up
Note: See TracChangeset for help on using the changeset viewer.