En+emdash.py: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(Created page with "{{Scripting Index}} ==Creating en and em dashes from typewriter hyphens== This script is a stripped down and modified version of Autoquote.py. Instead of converting typewrite...")
 
Line 3: Line 3:
This script is a stripped down and modified version of Autoquote.py.
This script is a stripped down and modified version of Autoquote.py.


Instead of converting typewriter quotes to typographic quotes, here we want to set up a system so that we can type and enter '-' when we just want a hyphen, '--' when we want an en-dash, and '---' when we want an em-dash. If you have something like '----' you'll probably end up with an em-dash followed by a hyphen.
Instead of converting typewriter quotes to typographic quotes, here we want to set up a system so that we can type and enter '-' (a single hyphen) when we just want a hyphen, '--' (2 hyphens) when we want an en-dash, and '---' (3 hyphens) when we want an em-dash. If you have something like '----' (4 hyphens) you'll probably end up with an em-dash followed by a hyphen.


There are no dialogs except for the message box at the end.
There are no dialogs except for the message box at the end.


==en+emdash.py==
==en+emdash.py==

Revision as of 02:20, 27 April 2014

This article is part of the Scripts series.

Creating en and em dashes from typewriter hyphens

This script is a stripped down and modified version of Autoquote.py.

Instead of converting typewriter quotes to typographic quotes, here we want to set up a system so that we can type and enter '-' (a single hyphen) when we just want a hyphen, '--' (2 hyphens) when we want an en-dash, and '---' (3 hyphens) when we want an em-dash. If you have something like '----' (4 hyphens) you'll probably end up with an em-dash followed by a hyphen.

There are no dialogs except for the message box at the end.

en+emdash.py