Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This concerns the "lineno" package. The \linelabel directive works within the ordinary linenumbers environment. How to create a line number label within a internallinenumbers environment to be able to reference a line number? I need this to be able to refer to a line in the pseudocode in a figure.

Or, alternatively - is there an environment like figure in which the ordinary linenumbers and \linelabel work?

share|improve this question

1 Answer 1

The package fancyvrb provides a line numbering facility (on p. 15 of its documentation is an example for labeling a line number for reference).

More powerful for displaying code is the listings package, which comes with an extensive documentation. It provides line numbering and labeling; its environments can go into a floating environment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.