Discussion:
[scribus] First Line Offset
pezcurrel
2018-01-25 16:37:17 UTC
Permalink
Hi,
I'm working with Scribus 1.4.6 and I need to set all the First Line
Offset for (many) text frames to "Line Spacing", but I can't find a
quick way to do it, I just do it for each new text frame. It would be
great to have a quicker method to do it. Maybe I'm missing something?


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Gregory Pittman
2018-01-25 19:58:14 UTC
Permalink
Post by pezcurrel
Hi,
I'm working with Scribus 1.4.6 and I need to set all the First Line
Offset for (many) text frames to "Line Spacing", but I can't find a
quick way to do it, I just do it for each new text frame. It would be
great to have a quicker method to do it. Maybe I'm missing something?
___
http://lists.scribus.net/mailman/listinfo/scribus
http://wiki.scribus.net
http://forums.scribus.net
I don't think you're missing anything. I don't find anything in
Preferences where you can set that, nor is it part of a Paragraph Style
setting.
What you might try would be making an empty "dummy" text frame, set the
first line offset, then either copy-paste or maybe even put it in the
Scrapbook and get it from there, positioning and resizing as needed.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
pezcurrel
2018-01-26 06:34:13 UTC
Permalink
Post by Gregory Pittman
Post by pezcurrel
Hi,
I'm working with Scribus 1.4.6 and I need to set all the First Line
Offset for (many) text frames to "Line Spacing", but I can't find a
quick way to do it, I just do it for each new text frame. It would be
great to have a quicker method to do it. Maybe I'm missing something?
I don't think you're missing anything. I don't find anything in
Preferences where you can set that, nor is it part of a Paragraph
Style setting.
Yep, and what's strange is that if one selects all text in a text
frames "chain", any other text setting applies to all the text in the
"chain". Only "first line offset" doesn't.
Post by Gregory Pittman
What you might try would be making an empty "dummy" text frame, set
the first line offset, then either copy-paste or maybe even put it in
the Scrapbook and get it from there, positioning and resizing as
needed.
Thank you :)

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
ZASKE Martin
2018-02-02 18:35:52 UTC
Permalink
This post might be inappropriate. Click to display it.
Gregory Pittman
2018-02-02 20:02:02 UTC
Permalink
Post by ZASKE Martin
I know exactly what you are talking about.
When I made an entire book in 2017, I used a power-editor and went into
the XML and used some search and replace to change all First Line
Offsets. In our case I was lucky and could change ALL of them, so
setting it up only took a few minutes.
You should look out inside the document.sla for a
<PAGEOBJECT blablabla settings with your <StoryText> your stuff here
In the list of settings, look for FLOP.
I have marked the FLOP (maybe First Line Offset Property) in the example
below and you got the same options as in the GUI, starting with 0
(Maximum Ascent) so FLOP="2" should give you "Line spacing".
If you are comfortable with this type of mild hacking, you can get a lot
done in Scribus. Scribus is stable with such editing, I never had
unexpected side-effects so far. I would just recommend to close the
document in Scribus, while you edit the .sla file and to pull a
back-up-copy every time before you hack the XML.
Here is something that occurred to me as a workaround for this issue:
using the top distance as a proxy for the first line offset.

If you were starting a document from scratch, you can go to File >
Preferences > Item Tools (Text tab), and set the Top distance to the
equivalent of 5 points (assuming 12-point text). This is equivalent to
what you would see with First Line Offset in Line Spacing mode.

What if you've already made your document? Well, unlike First Line
Offset, Top distance is scriptable. So here is a simple script to do
this. Just select a frame and run the script.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""

© 2018 by Gregory Pittman

settopdistance.py

USAGE

Select a text frame, run script.

"""

import scribus

textbox = scribus.getSelectedObject()
units = scribus.getUnit()
scribus.setUnit(scribus.UNIT_POINTS)
scribus.setRedraw(False)

distances = scribus.getTextDistances(textbox)
linespace = scribus.getLineSpacing(textbox)
scribus.setTextDistances(distances[0],distances[1],5.00,distances[3],textbox)
scribus.moveObject(-4,0,textbox)
scribus.moveObject(4,0,textbox)
scribus.setUnit(units)
scribus.setRedraw(True)

Notice in the fifth line from the bottom the distance is hard coded, and
this can be changed or you could set up a valueDialog with a default of
5.00 -- note that input from a valueDialog is always a string, so you
would need to convert to float. Even if your page units aren't points,
this works because I change the page units to points, then change back
to what they were before.

Look at the fourth and third lines from the bottom...what are these?! It
turns out if you don't have these, the top distance is set, but the
document doesn't show the text shifted (just a display issue). Since I
found out on the main canvas that if you move the frame slightly, then
move it back, you then see the change. I just added these two lines to
move the frame, then move it back, and it works!

The line beginning with 'linespace =' is an unused variable, but could
be used to calculate a top distance, but you would have to experiment to
see what works (is it 5/12 of the linespacing?).

You can also modify the script to get all the text frames in a document,
then perform this on every one...this takes a lot more lines to
accomplish, since you have to get all the objects, then sift through
them for the text frames. Also note that if you run this after selecting
another kind of frame, it will look like you've destroyed your document
-- the frames go blank. Just save your document and reload, and you'll
be back where you were.

Greg

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http:/
Lars Behrens
2018-02-05 08:08:52 UTC
Permalink
Post by Gregory Pittman
© 2018 by Gregory Pittman
What exactlys does your copyright mean here?

Cheerz,
Lars

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5373 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20180205/0d482be5/attachment.bin>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://w
Gregory Pittman
2018-02-05 14:24:43 UTC
Permalink
Post by Lars Behrens
Post by Gregory Pittman
© 2018 by Gregory Pittman
What exactlys does your copyright mean here?
I'd say it's more of a timestamp. No restrictions on usage, copying, etc.

Greg


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.n
ale rimoldi
2018-02-06 15:22:43 UTC
Permalink
hi greg
Post by Lars Behrens
Post by Gregory Pittman
© 2018 by Gregory Pittman
What exactlys does your copyright mean here?
greg said that it means nothing...
his explicit will counts... but...

...but to me the (c) means that the script is
copyrighted and you're not allowed to copy, modify, or distribute it
without a further explicit agreement from the copyright holder (greg).

of course, if there were no (c) sign, you would have exactly the same
(absence) of rights: you are not allowed to copy, change, distribute
anything you find in the internet, except when the author explicitly
gives you the rights to do anything with it.

so, greg, i would suggest you to add a little world after that (c), one
that match your will.

if you want everybody to be able to do anything they want with the
script you can write:

(c) bsd 2018 by GP

or

(c) mit 2018 by GP

if you want people to be forced to further share the changes they are
doing you can add

(c) gpl 2018 by GP

of course you can use longer names for those licenses and / or add links
to the full license text to be even more explicit.

but, at least, you should put the abbreviation after the copyright sign
to tell the people that the default copyright rules do not apply to the
script.

btw, i would suggest you to use the bsd or mit licenses, since not
everybody is comfortable with the gpl. but it's up to you.

ciao
a.l.e

(and, since we're talking about the header of the script, please, remove
that "#!/usr/bin/env python" from the first line of the script: that
line means that one can run the script as a standalone program, and
this is not the case: one has to run it from inside of scribus.)

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scri
Gregory Pittman
2018-02-06 15:51:44 UTC
Permalink
Post by ale rimoldi
hi greg
Post by Lars Behrens
Post by Gregory Pittman
© 2018 by Gregory Pittman
What exactlys does your copyright mean here?
greg said that it means nothing...
his explicit will counts... but...
...but to me the (c) means that the script is
copyrighted and you're not allowed to copy, modify, or distribute it
without a further explicit agreement from the copyright holder (greg).
of course, if there were no (c) sign, you would have exactly the same
(absence) of rights: you are not allowed to copy, change, distribute
anything you find in the internet, except when the author explicitly
gives you the rights to do anything with it.
so, greg, i would suggest you to add a little world after that (c), one
that match your will.
I should have left it out, since like I say, it was just for my own
purposes. As you can imagine I have a large number of scripts, and it's
helpful in retrospect to see when I wrote or last edited them, since
that may help understand what Scribus version they were written for.

I think you're assigning too much weight to someone stating '© Gregory
Pittman', since these days there are so many kinds of copyright, from
'all rights reserved' to full liberality. One of the reasons people
sometimes label something as copyrighted is so that someone else can't
claim rights on it.

In the end, in this situation, we're talking about a sequence of freely
available and open Python commands, both inside and outside of Scribus,
so what would one expect to be able to claim rights to?

Greg


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See
Joe Zeff
2018-02-06 16:04:22 UTC
Permalink
Post by Gregory Pittman
I should have left it out, since like I say, it was just for my own
purposes. As you can imagine I have a large number of scripts, and it's
helpful in retrospect to see when I wrote or last edited them, since
that may help understand what Scribus version they were written for.
If so, change it to "written on X/Y/Z by FOO" and "last edited on..."

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Peter Nermander
2018-02-07 09:00:15 UTC
Permalink
Post by Gregory Pittman
I think you're assigning too much weight to someone stating '© Gregory
Pittman', since these days there are so many kinds of copyright, from
'all rights reserved' to full liberality. One of the reasons people
sometimes label something as copyrighted is so that someone else can't
claim rights on it.
No, there really is only one kind of copyright, and in almost all countries
it applies no matter if you state it or not (becuase of the Berne
Convention).

https://en.wikipedia.org/wiki/Berne_Convention

The copyright holder can of course allow the work to be shared freely, but
the copyright holder can make that decision only because of the copyright.

If you don't hold the copyright, you have no right do decide what may be
done or not with the work.

/Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20180207/7d0b24a6/attachment.html>
___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scri
ale rimoldi
2018-02-07 21:13:11 UTC
Permalink
hi greg
Post by Gregory Pittman
I think you're assigning too much weight to someone stating '© Gregory
Pittman', since these days there are so many kinds of copyright, from
'all rights reserved' to full liberality. One of the reasons people
sometimes label something as copyrighted is so that someone else can't
claim rights on it.
as far as i know the default is "all right reserved".
if you put nothing or just a (c) this is what is valid.
Post by Gregory Pittman
In the end, in this situation, we're talking about a sequence of
freely available and open Python commands, both inside and outside of
Scribus, so what would one expect to be able to claim rights to?
you're right, it's not about you claiming rights.

it's about other people knowing that they are entitled to modify and
further publish the scripts.

if the permission to do so is missing from the file / script you don't
know if the author will be proud of remixes showing up or will rather
be upset and get mad at you.

the internets are full of people using the nc and nd cc variants.
the times are changing but in the graphics and arts world, there is
still a (huge) majority that thinks other people should not appropriate
their work (i know, it's crazy: at the same time they give themselves
this same right to get "inspiration" from other people; one of the
best examples is the way andy warhol's works are managed: the
creative commons organization has got a cease and desist because
they were using the campbell soup cans on t-shirts!).

as you say: it does not matter that much, but if you already put a line
in there, just set it to

(c) MIT Gregory Pittman 2018

- it's short
- it's very clear what you mean
- people can mention where they took inspiration from
- they know how old a script is, and who can be asked if there are
issues / improvements.

you don't have to do that, but it sometimes would be helpful if you
would.

ciao
a.l.e

___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wi

ZASKE Martin
2018-02-07 19:12:53 UTC
Permalink
Hi Greg,

we always put copyright on all our stuff so that evil people cannot grab
it and lock it up. And then we also give as generous a licence as we can
(depending on funding and what is inside a certain document).

I just want to write a very explicit thank you note for having drafted a
helpful script and having is shared here. And for the creative
work-around-idea in the first place. You probably did not expect this to
turn into a legal-chat, eh?

You are holding the copyright, on anything you create whether you
mention it or not. And since you did NOT write to not use it, and since
this was shared in an e-mail list about Scribus (which is a very open
and generous context), I would have not hesitated to try out or adapt or
use the script.

I appreciate all the other input and I am still learning lots in this
area. We just need to be extra-nice to Greg - so that he keeps sending
the goodies... You are my scripting hero and role-model Greg. :)

greetings,

Martin


___
Scribus Mailing List: ***@lists.scribus.net
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net
Loading...