Note that there are some explanatory texts on larger screens.

plurals
  1. POlinenumbering with listings package in latex
    primarykey
    data
    text
    <p>I am trying to insert a code snippet with the listingspackage, and want the lines numbered. However I would like only every 5th line and the first to be numbered (numbers beeing(1,5,10,15,...)) according to the manual:</p> <pre><code>stepnumber=5 </code></pre> <p>should do the trick, however using my minimal example (see bottom), I get the line numbers 1,6,11,16,...</p> <p>May be I misinterpreted he manual 8did that once before), however I am clueless.</p> <p>If a real latex guru is around, there would be something I would like even more, having every linenumber printed however every fifth in bold/ a different style numbers than beeing: 1 2 3 4 <strong>5</strong> 6 7 8 9 <strong>10</strong> 11 ... however since this is not in the doku I am sure it requires some deeper latex/listings knowledge.</p> <p>P.S.: There is one more oddity, eventhough I put "numberfirstline=false" I get the line number 1 ( I get that linenumber as well without setting numberfirstline, which should default to false), it is jsu in there to point out that something is wrong.</p> <p>I am using miktex for compilation, if that helps.</p> <p>Thanks in advance.</p> <pre><code>\documentclass{scrreprt} %[twoside,headings=openright] %Sourcecode formatting \usepackage{listings} \lstset{ numbers=left, % Ort der Zeilennummern stepnumber=5, % Abstand zwischen den Zeilennummern numberfirstline=false } \begin{document} \lstinputlisting{sourcecode/AES/lookupSoftcoded.S} %codefile with 15 lines or so... \end{document} </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload