printFile — Request printing of a file submitted by the student.


printFile {file} {maxlines} [option...]


Called from within a computeMarks script, which would in turn have been called by rst. Used to request that a file submitted by the student be printed. For any other files, use keepFile instead.


The file parameter specifies the filename of the file to be printed, relative to submitdir . maxlines is the maximum number of lines to print; if the file is longer than the specified length, it is truncated. options are optional and may be used to specify certain behaviour. If more than one option is provided, the whole set of options may be enclosed in quotation marks for backwards compatibility with an older version of printFile, but this is not required or recommended. The options are as follows:


Don't show line numbers.


Fold long lines (instead of truncating at the right margin). Using -f is important as having lines truncated can make marking very difficult.


Not yet implemented! Wrap long lines; like fold, except it tries to break at a word boundary.

-h "name"

Override the output header for this file to something other than the default filename header.

-k "keystring"

Primarily for use with deProcessFile. Specify that the key for this file should be something other than what was provided in the file parameter.


Specifies that the file is an EPS file and should be scaled to fit a full page as closely as possible.

-e "params"

Specifies that the file is an EPS file, and that it should be sized according to the LaTeX code params . An example would be:

 -e 'height=0.4\textheight,width=0.9\textwidth,keepaspectratio' 

As part of the process of preparing the file for printing, it is transformed into a LaTeXed version that must be saved for inclusion in the final LaTeX produced for the assignment. An attempt has been made to handle a handful of special characters in a way that makes LaTeX interpret them properly, but there is no guarantee of success for many non-alphanumeric characters.

Topic revision: r1 - 2016-01-11 - YiLee
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback