Prints code listings with line numbers
Contents
Description
This macro produces colored code listings with line numbers.
Bugs/Feature Requests
Existing bugs and feature requests for LinenoMacro are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from here.
Source
You can check out LinenoMacro from here using Subversion, or browse the source with Trac.
Example
Simple java listing with included Lineno macro:
{{{
#!Lineno
#!java
class A {
public static void main(String[] args) {
}
}
}}}
Result:
Install
To install:
sudo easy_install <dir with macro sources>
To enable:
[components] lineno.linenomacro.* = enabled
Recent Changes
- [11954] by rjollos on 2012-09-08 01:22:19
-
Refs #10292: (1.2dev) Modified generation of anchor ids to ensure that the id associated with each line number will be unique for the resource. The ids are of the form a\d-L\d (e.g. a1-L1).
- [11945] by rjollos on 2012-09-07 03:46:02
-
Follow-on to [11944]. Modified match for compatibility with Trac 0.11 and Trac 0.12+, which was necessary after the change to use WikiProcessor._processor_re, which differs between Trac versions.
- [11944] by rjollos on 2012-09-07 02:22:03
-
- Fixed issue in which there would always be a blank line at the start of the code block.
- Making use of WikiProcessor._processor_re and eliminated duplicate variable in LinenoMacro class.
- Added setup.cfg and configured to tag the egg with the SVN revision.
- Added an example to the documentation that is displayed on the WikiMacros page.
- Refactored LinenoMacro.py, removed unused imports and alphabetized methods.
Author/Contributors/License
Author: adamansky
Maintainer: rjollos
Contributors:
License: Apache 2.0
Last modified 3 weeks ago
Last modified on May 25, 2013 8:03:38 PM
Attachments (1)
- linenum.png (4.0 KB) - added by anonymous 5 years ago.
Download all attachments as: .zip


