[scribus] Converting hyphens to en and em dashes
Gregory Pittman
gpittman at iglou.com
Sun Apr 27 02:32:01 UTC 2014
Here is a script that accomplishes something simpler than Autoquote.py:
http://wiki.scribus.net/canvas/En%2Bemdash.py
It's actually a step-child of Autoquote,py, in that I started with that
script, then stripped out the insides and gave it a different task, this
time turning a 2-hyphen sequence into an en dash, and a 3-hyphen
sequence into an em dash.
The trickiness of the scripting job is to detect hyphens, but then save
the memory of them until you're sure whether you have 1, 2, or 3 in a
row. Meanwhile, you have to manage the counting that goes on with the
text manipulation of the frame.
I hope you can find uses for this.
Greg
More information about the scribus
mailing list