#125 Labels in \lstinputlisting doesn't show

open
nobody
texmakerx (140)
5
2013-10-24
2010-12-14
Casper Hansen
No
1 up votes | 0 down votes | 100%
1 comment

When using \lstinputlisting{firstline=x, lastline=x, firstnumer=x, caption={xtz},label={TESTLABEL}] {filename.xyz}
then the label (TESTLABEL) does not show in structure window, and it does not pop up when using \ref

Discussion

  • well , maybe it is because it is a rather uncommon construction.
    tmx looks for \label-commands. So if the backslash is missing, it is no command for tmx.
    Where does the command \lstinputlisting come from anyway ?

     
  • Casper Hansen
    Casper Hansen
    2010-12-17

    It comes from the listnig package. It is used to insert source code to document.

    ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf