Diff for /doc/help/texxml2latex.pl between versions 1.8 and 1.9

version 1.8, 2003/07/21 20:32:08 version 1.9, 2003/09/02 18:29:58
Line 66  while (my $token = $p->get_token()) Line 66  while (my $token = $p->get_token())
   
  if ($tag eq 'file') {   if ($tag eq 'file') {
     my $file = $attr->{'name'};      my $file = $attr->{'name'};
     open (LATEX_FILE, $dirprefix . $file);      open (LATEX_FILE, $dirprefix . $file) or 
    ($! = 1, die "Can't find LaTeX file $dirprefix/$file; terminating build.");
     print <LATEX_FILE>;      print <LATEX_FILE>;
     print "\n\n";      print "\n\n";
  }   }
Line 89  while (my $token = $p->get_token()) Line 90  while (my $token = $p->get_token())
     $file = '../../loncom/' . $file;      $file = '../../loncom/' . $file;
     my $filename = substr($file, rindex($file, '/') + 1);      my $filename = substr($file, rindex($file, '/') + 1);
     system ("cp $file $tmpdir\n");      system ("cp $file $tmpdir\n");
       my $latexFile;
       if (index($filename, '.') == -1) {
    # pod2latex *insists* that either the extension of the
    # file be .pl|.pm|.pod or that it be executable. Some
    # extension-less files like "lonsql' are none-of-the-above.
    system ("cd $tmpdir; mv $filename $filename.pm");
    $filename .= ".pm";
    print STDERR $filename . "\n";
       }
     system ("cd $tmpdir; pod2latex -h1level $h1level $section $filename\n");      system ("cd $tmpdir; pod2latex -h1level $h1level $section $filename\n");
     my $latexFile = substr($filename, 0, rindex($filename, '.')) . '.tex';      $latexFile = substr($filename, 0, rindex($filename, '.')) . '.tex';
     open LATEX_FILE, $tmpdir . '/' . $latexFile;      open LATEX_FILE, $tmpdir . '/' . $latexFile or
    ($! = 1, die "Latex file $latexFile not found while trying to use pod2latex, ".
    "terminating build");
     # pod2latex inserts \labels and \indexs for every section,      # pod2latex inserts \labels and \indexs for every section,
     # which is horrible because the section names tend to get      # which is horrible because the section names tend to get
     # reused a lot. This filters those out, so we need to do      # reused a lot. This filters those out, so we need to do
Line 231  texxml2latex.pl will automatically inclu Line 243  texxml2latex.pl will automatically inclu
 beginning and C<Latex_Footer.tex> at the end, to make a complete  beginning and C<Latex_Footer.tex> at the end, to make a complete
 document LaTeX document.  document LaTeX document.
   
 =head2 Rendering texxml X<texxml, rendering>  =head2 Rendering texxml 
   
 =head3 render.texxml.pl X<render.texxml.pl>  =head3 render.texxml.pl 
   
 The C<render.texxml.pl> script takes a .texxml file, and produces  X<texxml, rendering>X<render.texxml.pl>The C<render.texxml.pl> script
 PostScript and PDF files. The LaTeX files will be given access to .eps  takes a .texxml file, and produces PostScript and PDF files. The LaTeX
 files in the C</loncom/html/adm/help/eps/> directory while  files will be given access to .eps files in the
 rendering. Call it as follows, from the C<doc/help> directory:  C</loncom/html/adm/help/eps/> directory while rendering. Call it as
   follows, from the C<doc/help> directory:
   
  perl render.texxml.pl -- author.manual.texxml   perl render.texxml.pl -- author.manual.texxml
   
 substituting the appropriate texxml file.  substituting the appropriate texxml file.
   
 =head3 texxml2latex.pl X<texxml2latex.pl>  =head3 texxml2latex.pl 
   
 texxml2latex.pl is a perl script that takes texxml in and assembles  X<texxml2latex.pl>texxml2latex.pl is a perl script that takes texxml in and assembles
 the final LaTeX file, outputting it on stout. Invoke it as follows:  the final LaTeX file, outputting it on stout. Invoke it as follows:
   
  perl texxml2latex.pl author.manual.texx   perl texxml2latex.pl author.manual.texx
Line 256  Note that there is no error handling; if Line 269  Note that there is no error handling; if
 final render, it either could not be found, or you do not have  final render, it either could not be found, or you do not have
 sufficient permissions with the current user to read it.  sufficient permissions with the current user to read it.
   
 =head3 texxml2index.pl X<texxml2index.pl>  =head3 texxml2index.pl 
   
 texxml2index.pl is a perl script that takes texxml in and assembles a  X<texxml2index.pl>texxml2index.pl is a perl script that takes texxml in and assembles a
 file that can be used online to access all the .tex files that are  file that can be used online to access all the .tex files that are
 specified in the .texxml file. For an example of how this looks  specified in the .texxml file. For an example of how this looks
 online, see  online, see
Line 269  C<http://msu.loncapa.org/adm/help/author Line 282  C<http://msu.loncapa.org/adm/help/author
 There are a couple of scripts that you may find useful for creating  There are a couple of scripts that you may find useful for creating
 texxml-based help:  texxml-based help:
   
 =head3 latexSplitter.py X<latexSplitter.py>  =head3 latexSplitter.py 
   
 latexSplitter.py is a Python script that helps you seperate a  X<latexSplitter.py>latexSplitter.py is a Python script that helps you seperate a
 monolithic .tex file into the small pieces LON-CAPA's help system  monolithic .tex file into the small pieces LON-CAPA's help system
 expects. Invoke it like this:  expects. Invoke it like this:
   
Line 295  The idea behind this program is that if Line 308  The idea behind this program is that if
 from scratch, you can use a "real" program like LyX to create the .tex  from scratch, you can use a "real" program like LyX to create the .tex
 file, then easily split it with this program.  file, then easily split it with this program.
   
 =head3 simpleEdit.py X<simpleEdit.py>  =head3 simpleEdit.py 
   
 simpleEdit.py is a python script that takes a .texxml file and shows  X<simpleEdit.py>simpleEdit.py is a python script that takes a .texxml file and shows
 all the tex files that went into in sequence, allowing you to "edit"  all the tex files that went into in sequence, allowing you to "edit"
 the entire document as one entity. Note this is intended for simple  the entire document as one entity. Note this is intended for simple
 typo corrections and such in context, not major modification of the  typo corrections and such in context, not major modification of the
Line 331  you can freely use references, even in o Line 344  you can freely use references, even in o
 LaTeX has a popular index making package called MakeIndex. LON-CAPA's  LaTeX has a popular index making package called MakeIndex. LON-CAPA's
 help system supports this, so you can create indices using the \index  help system supports this, so you can create indices using the \index
 LaTeX command. In perl POD files, use the X command. Note that in both  LaTeX command. In perl POD files, use the X command. Note that in both
 cases the index text is not included in the render, so you need to  cases the index text is not included in the render, so the index must 
 specify the exact index.  be included in addition to the indexed text, and need not match the 
   indexed text precisely.
   
 =head1 Writing POD: Style  =head1 Writing POD: Style
   
Line 370  is read. Line 384  is read.
   
 The remainder should be formatted as appropriate for the file, such  The remainder should be formatted as appropriate for the file, such
 that discarding the NAME, SYNOPSIS, and OVERVIEW sections provides a  that discarding the NAME, SYNOPSIS, and OVERVIEW sections provides a
 useful API overview of the module.  useful API overview of the module. This may be anything from an 
   elaborate discussion of the data structures, algorithms, and design 
   principles that went into the module, or a simple listing of 
   what functions exist, how to call them, and what they return, as
   appropriate.
   
 Routines that are private to the module should B<not> be documented;  Routines that are private to the module should B<not> be documented;
 document them in perl comments, or, as is the style of the time, not  document them in perl comments, or, as is the style of the time, not
 at all, as is appropriate.  at all, as is appropriate.
   
 Method and function names should be bolded when being  Method and function names should be bolded when being
 documented. Indexing should be done as appropriate, using the X  documented. 
 perldoc command. Literal string such as filename should be enclosed in  
   Literal string such as filename should be enclosed in
 the C command, like this: C</home/httpd/lonTabs/>.   the C command, like this: C</home/httpd/lonTabs/>. 
   
   Indexing can be done with the X command in perldoc, and should be used 
   as appropriate. Do not include X commands in the headings, the output 
   from pod2latex screws up some regexes in texxml2latex.pl.
   
 =cut  =cut

Removed from v.1.8  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>