Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Adding Line Numbers to the MIT Shakespeare

by tobyink (Canon)
on Dec 07, 2011 at 23:27 UTC ( [id://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

    Hi,

    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,

    Eduardo

      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 scriptname.pl 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 scriptname.pl 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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://942343]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found