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?


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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