Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Adding Line Numbers to the MIT Shakespeare

by tobyink (Abbot)
on Dec 07, 2011 at 23:27 UTC ( #942343=note: print w/replies, xml ) Need Help??

in reply to Adding Line Numbers to the MIT Shakespeare

The id attribute is supposed to be unique per-document. That is, you must not have two elements in the same document with the same value for id.

Try replacing id="lineNum" with class="lineNum" in your HTML, and replacing #lineNum with .lineNum in your stylesheet.

Replies are listed 'Best First'.
Re^2: Adding Line Numbers to the MIT Shakespeare
by Anonymous Monk on Feb 14, 2013 at 18:04 UTC


    Sorry for asking maybe a very simple question, but where should I enter the file (or the name of the file) for parsing?

    Thanks in advance,


      Input: an HTML file using the MIT Shakespeare Format ... die "File must be given as first arg\n";

      Provide the input file when running the script, like this:

      perl inputfile.html

        Thanks for your answer, marto.

        The parsing worked.

        But how to "capture the output into a new html file"?

        I used the following command:

        "perl inputfile.html > result.html".

        In the result.html file that was generated, I added the stylesheet indicated:

        <style type="text/css"> .lineNum { position: absolute; left: 550px; } </style>

        But the result.html file didn't show any line numbers.

        What may I have done wrong?

        P.S. - I've compared the original and the result file, before adding the stylesheet, and they are exactly the same. So the parsing didn't work as it should.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://942343]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2018-04-24 19:26 GMT
Find Nodes?
    Voting Booth?