Closed sandersk closed 8 years ago
Added handling to toggle on line numbering for code listings, e.g., change the following:
<pre data-type="programlisting" data-line-numbering="numbered">if css_filename options[:css_filename] ||= css_filename open(css_filename, "w") {|css_file| css_file.write(result)} nil else result end</pre>
to:
<pre data-type="programlisting" data-line-numbering="numbered"><span class="line-number">1 </span>if css_filename <span class="line-number">2 </span> options[:css_filename] ||= css_filename <span class="line-number">3 </span> open(css_filename, "w") {|css_file| css_file.write(result)} <span class="line-number">4 </span> nil <span class="line-number">5 </span>else <span class="line-number">6 </span> result <span class="line-number">7 </span>end</pre>
Line numbering can be turned on in one of two ways:
<xsl:param name="number.code.lines" select="1"/>
data-line-numbering="numbered"
All line numbers are wrapped in <span class="line-number"> to facilitate styling via CSS if desired.
<span class="line-number">
Added handling to toggle on line numbering for code listings, e.g., change the following:
to:
Line numbering can be turned on in one of two ways:
data-line-numbering="numbered"
à la DocBook XML.All line numbers are wrapped in
<span class="line-number">
to facilitate styling via CSS if desired.