Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Fresh Plugin for Ebook Unicode Support

This repo contains plugins for the Fresh editor.

This plugin that supports use of Unicode Typography used in EPUB book productions. This plugin was created to support my projects for Standard Ebooks.

URL to import as Fresh Package: https://github.com/mandolyte/ebooks-fresh-plugin

To Do

[x] Change italic element i to em for a string

Unicode Helpers for Ebooks

This plugin adds a number of commands to support needed Unicode characters used in ebook typography. These are:

  • Identify Unicode character at cursor
  • Dashes and Quotes
    • Insert Em-Dash
    • Insert En-Dash
    • Insert left single quote
    • Insert right single quote
    • Insert left double quote
    • Insert right double quote
    • Insert vertical ellipsis
  • String Transformations
    • Double quote selection
    • Single quote selection
    • Titlecase (per Chicago Manual of Style)
    • Titlecase per Standard Ebooks (SE)
    • Convert an <i> element to an <em> element.
      • So this: <i>This is emphasized!</i> becomes...
      • This: <em>This is emphasized!</em>
      • Shows status error if string at cursor is an <i> element (no attributes)
      • Shows status error if close element cannot be found (ie, </i> for the opening <i>)
      • Note: this function written to be easily re-used for other matched element conversions
  • Miscellaneous
    • Insert Split Marker: This inserts the split marker at the cursor position <!--se:split-->

Note! The SE Titlecase action requires that the SE Tooling be installed and on the path. Essentially, it runs se titlecase "my book title".

Test String for Unicode Character Identification

This string below was generated by Gemini to provide easy testing.

“ʻHush⁠—⁠’ she whispered… ⸺ it was 1914–1918 ‒ precisely ‑42 and −10. ‘Indeed,’ she said.”

Table of Characters Supported

Character Hex Code Description Role in Nonsense Text
\u201C Left Double Quote Opening of the whole string.
ʻ \u02BB Turned Comma Placed at the start of "Hush".
\u2060 Word Joiner Hugging the em-dash (⁠—⁠).
\u2014 Em-dash Between "Hush" and the quote.
\u2019 Right Single Quote Closing quote after "Hush".
\u2026 Ellipsis After "whispered".
\u22EE Vertical Ellipsis N/A
\u2E3A Two-Em-Dash Between the ellipsis and "it was".
\u2013 En-dash In the date range "1914–1918".
\u2012 Figure Dash Before "precisely".
\u2011 Non-Breaking Hyphen Before "42".
\u2212 Minus Sign Before "10".
** ** \u200A Hair Space Between the period and the next quote (. ‘).
\u2018 Left Single Quote Opening "Indeed".
\u201D Right Double Quote Closing the whole string.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages