Text importer for loading simple Markdown text into Scribus files.
It must at least support:
- headings
- italics
- bold
- lists
- rendering links in a printer friendly way
- blockquotes as intended paragraph
All information concerning this plugin's code is in src/README.md
.
Clone the scribus-plugin-gettext-markdown
repository and put – or symlink – the src
directory into scribus/plugins/gettext/
as markdown
. Then add
ADD_SUBDIRECTORY(markdown)
to CMakeList
file in scribus/plugins/gettext/
.
This specification follows the structure of (John Gruber's Markdown Syntax](http://daringfireball.net/projects/markdown/syntax) specification.
For a first step we will try to implement the minimal feature set that allows to meaningfully use Markdown for a redaction system in a workflow that uses (also) Scribus.
The plugin will be for the 1.5.0svn version of Scribus.
If they don't exist we will create "standard" styles. In the future we could define a per document (or per frame) way to match to existing styles.
HTML tags will be ignored for now.
In the future, only tags that are clearly useful in a Scribus related workflow will be considered.
Named escaped characters will be converted to the correct caracter.
- & → &
- < → <
- > → >
###Block Elements
Paragraph are separated by consecutive empty lines
Line break is supported with two spaces at the end of the line (we will need two paragraph styles, one for the first paragraph and one for the following ones)
We support the use of "#" to mark headers, up to 6 levels
Paragraphs starting with a ">" are marked as blockquote and indented (by using a specific paragraph style).
In a first version, blocquote cannot contain other paragraph formatting (headings, ...)
We want to support the following formats for lists:
* Red
* Green
* Blue
- Red
- Green
- Blue
1. Red
2. Green
3. Blue
For numerated lists, the number is ignored and a counter is used instead.
Paragraphs intended by at least four spaces or one tab are considered code blocks (using a specific paragraph style).
Ignored.
Links written as [This link](http://example.net)
will be converted to This link (example.net)
.
No "real" link is created as long Scribus does not "really" support them.
Single asterisks and underscores produce italics (emphasis) and double asterisks or underscores bold (strong).
Litteral asterisks and underscore must be prefixed by a backslash.
The forward quote starts a character "code block".
Images are ignore for now.
Automatic links are reformatted by removing the starting and end sign (<, >).
We will support the markdown escaping.
- Hacker News discussion about A Formal Spec for GitHub Flavored Markdown