kehyoe@umn-cs.CS.UMN.EDU (Ong Keh Yoe) (11/30/89)
Does anyone know how to get the current input file and line number in TeX? I want to create a small running header on top of the output page which reads something like File: Chapter-1/Section-2.tex Lines: 123-456 Something like this I would find very useful when making corrections. Of course, this information wouldn't be printed on the final copy. Keeping track of file names is not hard -- I can define my own \input macro which first saves its argument before doing the real \input. But I haven't found any way of getting the current input line -- like the one TeX prints out when it encounteres an error. Any suggestions?
smithda@cpsvax.cps.msu.edu (J. Daniel Smith) (12/01/89)
In article <17388@umn-cs.CS.UMN.EDU> cps3xx!eecae!tank!uwvax!umn-d-ub!umn-cs!kehyoe kehyoe@umn-cs.CS.UMN.EDU (Ong Keh Yoe) writes: >Does anyone know how to get the current input file and line number in TeX? >[..] >found any way of getting the current input line -- like the one TeX prints >out when it encounteres an error. Any suggestions? This one seems easy: install the new version of TeX (2.999something now, soon to be 3.0) The following is from Knuth's note describing the extensions to TeX: 9. Looking at the Line Number. ... TeX has a new parameter \inputlineno which contains the number of the line that TeX would show on an error message if an error occured now. ... That seems to be the answer to this question Dan ========================================================================= J. Daniel Smith Internet: smithda@cpsvax.cps.msu.edu Michigan State University BITNET: smithdan@msuegr Usenet: uunet!frith!smithda God created the integers; all the rest is the work of man. - Leopold Kronecker =========================================================================