View Issue Details

IDProjectCategoryView StatusLast Update
0001975ScribusGeneralpublic2015-12-08 12:01
Reportersuki Assigned Togpittman  
PrioritynormalSeverityfeatureReproducibilityalways
Status acknowledgedResolutionopen 
PlatformLinuxOSFedora LinuxOS VersionFC 3
Product Version1.3 
Summary0001975: line-numbering in PDF
DescriptionSome people still use paper and print-outs to read things ...
They want line-numbers put in galley-proofs, so the author when he make
correction could say "change this to that in line-number 41", etc.. I know
PDF annotations can do this sort of thing, but as I said they would use
only paper you see ... they find these computers and gadgets bit weird.
Many pagination systems find it difficult to do this sort of thing
because of architectural reasons. Some do it, but when a thing like
table or frame of text comes in between, it all begins to fall apart.
It will be nice if Scribus could to this sort of thing.
Additional InformationFor line-numbers there are basically two ways to do it:

(i) All line-numbers in particular fixed character style
(ii) All line-numbers in the same character style as the text which follows in that line

P.S.: The second one may be easier to implement in that it is like adding some extra characters after the line-break
TagsNo tags attached.
PatchNo

Activities

ringerc

2005-05-11 11:22

reporter   ~0004580

Rather than doing this in the PDF, I imagine line-numbered text frames would be *way* more useful.

I don't think it can currently be done with Python as we lack access to any text metrics such as line break information, line lengths, etc.

plinnell

2005-05-11 20:30

viewer   ~0004587

bumping to 1.3 as a feature request

suki

2005-05-12 02:45

reporter   ~0004591

Sorry, by PDF I actually meant the paginated output. Yes, line-numbered text frames would be the correct thing to do.

The *.sla format is not a postscript kind of graphics format..perhaps SVG export has line-breaks in it, which can be tinkered to add line-numbers?

Kunda

2015-11-28 05:22

updater   ~0037711

This feature can actually be implemented via a Python script. Greg P. wrote one here: http://wiki.scribus.net/canvas/Line_numbering_for_text_frames

Closing ticket

christoph_s

2015-11-28 06:42

developer   ~0037715

Actually this doesn't work as expected, neither in 1.4.6svn, nor in 1.5.1svn.

In 1.4.6svn I get an error message:

Traceback (most recent call last):
  File "", line 8, in
  File "/home/christoph/Line_Numbering.py", line 55, in
    scribus.setLineSpacingMode(1, newframe)
AttributeError: 'module' object has no attribute 'setLineSpacingMode'

After that, the script does what it's expected to do.

In 1.5.1svn the line numbers are placed outside the page.

gpittman

2015-11-28 14:39

developer   ~0037721

Apparently something is wrong with your 1.5.1svn, since it works fine for me on two separate computers. It also works in the released 1.5.0

There apparently is no command setLineSpacingMode() in 1.4.6, but I don't see a need to fix this, at least right now.

The placement of the frame is going to be adjacent and to the left of the frame that is selected. If that frame goes to the left edge of the page, then the new frame will be outside the page. This is one of the issues with the concept.

gpittman

2015-11-28 14:51

developer   ~0037722

I've modified the script so that it checks for the version being at least 1.5.0, and if so, uses the setLineSpacingMode() command, otherwise skips that.
See the wiki page.

gpittman

2015-11-29 01:01

developer   ~0037726

There is now a new version which places the numbering frame on its own layer, to switch on/off visibility.

http://wiki.scribus.net/canvas/Line_numbering_for_text_frames#linenumber.py_Version_2

gpittman

2015-11-29 02:04

developer   ~0037727

Here already is version 3. Now we search an entire document for text frames, making a numbering frame for each.

http://wiki.scribus.net/canvas/Line_numbering_for_text_frames#linenumber_v3.py

gpittman

2015-11-29 14:52

developer   ~0037732

A few more tweaks:
Christoph's problem may have related to page units. This messes up the placement of the frames. The script now switches to points, then back.

I also now check and match the fonts for each text frame. This isn't a complete answer if you have mixed fonts in a frame.

Kunda

2015-12-07 19:43

updater  

line-numbering.gif (279,365 bytes)   
line-numbering.gif (279,365 bytes)   

Kunda

2015-12-07 19:44

updater   ~0037862

Last edited: 2015-12-08 12:01

Uploaded screencast of the script in action. I've also pinged greg to see if we can refine it.

Issue History

Date Modified Username Field Change
2005-05-11 10:41 suki New Issue
2005-05-11 11:22 ringerc Note Added: 0004580
2005-05-11 20:30 plinnell Note Added: 0004587
2005-05-11 20:30 plinnell Status new => acknowledged
2005-05-11 20:30 plinnell Product Version 1.2.1 => 1.3
2005-05-11 20:30 plinnell Additional Information Updated
2005-05-12 02:45 suki Note Added: 0004591
2015-11-28 05:22 Kunda Note Added: 0037711
2015-11-28 05:22 Kunda Status acknowledged => resolved
2015-11-28 05:22 Kunda Fixed in Version => 1.5.1svn
2015-11-28 05:22 Kunda Resolution open => fixed
2015-11-28 05:22 Kunda Assigned To => gpittman
2015-11-28 06:42 christoph_s Note Added: 0037715
2015-11-28 06:42 christoph_s Status resolved => feedback
2015-11-28 06:42 christoph_s Resolution fixed => reopened
2015-11-28 11:24 jghali Patch => No
2015-11-28 11:24 jghali Status feedback => acknowledged
2015-11-28 11:24 jghali Fixed in Version 1.5.1svn =>
2015-11-28 11:24 jghali Resolution reopened => open
2015-11-28 14:39 gpittman Note Added: 0037721
2015-11-28 14:51 gpittman Note Added: 0037722
2015-11-29 01:01 gpittman Note Added: 0037726
2015-11-29 02:04 gpittman Note Added: 0037727
2015-11-29 14:52 gpittman Note Added: 0037732
2015-12-07 19:43 Kunda File Added: line-numbering.gif
2015-12-07 19:44 Kunda Note Added: 0037862
2015-12-08 12:01 Kunda Note Edited: 0037862