Precompile (Class)

In: rtex.rb
Parent: Object

This class allows som precompile on the given TeX-File(s) Actual a method for listings.sty is implemented.

Attributes

text  [R] 

Public Class methods

This method overwrites the given file with the replacements for listings

Read the contents of the file

Public Instance methods

This function supports the handling of the package listings. Listings.sty allows you the insertion of external lsitings with the command

      \lstinputlisting[firstline=<first>,lastline=<last>]{Programm}

There is one Problem: Whats the value of <first> and <last>? Once a programm is finished, it is no problem. But when the program is still in develpment, you have to adapt the line numbering. It would be much nicer, if you could use something like

      \lstinputlisting[fromlabel=<first>,tolabel=<last>]{Programm}

Well, I understand why it is dificult to make it in listings.sty. This method makes this work. It scans the listing file for the label and replaces it in the source.

This method scan a program file for the string TeXlabel{<label>} or LABEL{<label>} and stores the linenumber. The string can be redefined by a regular expression, $1 must be the label.

[Validate]