2 years, 8 months ago.

Listing line numbers only work upto 99.

Any source code file with more than 99 lines will not show line numbers to the left side above line 99. Possibly an HTML error in the size of the text box used for line numbers?

Thats me stupid! Wrong of me to expect that mbed features work correctly, and that when they don't someone will look into the problem.

posted by Bill Den Beste 23 Feb 2018

1 Answer

2 years, 8 months ago.


I'm using chrome web browser and I can see more than 100 line.



I also see all of the line numbers on screen. But not on the paper printout. I am using the latest version of Firefox. When I tried to print out the listing using Chrome, I couldn't get it to work at all. Same with Internet Explorer.

posted by Bill Den Beste 22 Feb 2018

If the only issue is when printing then you can always copy and paste into a different editor and print from there. A bit of a pain but then how often do you need to print out code.

posted by Andy A 22 Feb 2018


I already tried that. You should too before suggesting it. When you copy and paste you get the line numbers on one set of pages, followed by the actual lines of text on a second set of pages.

posted by Bill Den Beste 22 Feb 2018

I just printed out my source via mbed to a pdf file. And in that file all line numbers including ones with bigger than 100 are present without problem. So I suppose the problem is in your "printer driver." Can you try with other printer driver or try layout setting in that driver?

posted by Motoo Tanaka 23 Feb 2018

Motoo, Thanks. I didn't try exporting via pdf yet. That might be a work-around I can make use of. Instead, I have been looking at the .html that is being generated. It has some issues, one of which is setting the line-number table cell width to 26px, which is not enough for 3 or more digits.

posted by Bill Den Beste 23 Feb 2018


I did try it, it works fine. You misunderstood what I was suggesting.

I didn't mean copy and past the line numbers and code together, that's a stupid idea. Copy and paste just the code into an external text editor that can add line numbers to the file. Just about any code editor can do that for you. My personal preference is visual studio, I like the flexibility to get the auto formatting just how I like it and much as I hate to give Microsoft credit it is a far better IDE than something like Keil.

posted by Andy A 23 Feb 2018