Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible addition of new language #26

Closed
mcondarelli opened this issue May 16, 2019 · 1 comment
Closed

Possible addition of new language #26

mcondarelli opened this issue May 16, 2019 · 1 comment

Comments

@mcondarelli
Copy link

Hi,
I am implementing a new markup language (something akin to Markdown, but geared towards novel publishing).
I think it would be extremely useful to add some kind of integrated editor (right now I'm focused on command-line utilities to convert from markup to LaTeX/XHTML).
Features I have in mind, in increasing order of complexity, are below.
Real question is:
In Your opinion, is ExCo the right tool to use?
If so: what will be the effort required?
Thanks in advance.

Features:

  • Syntax Highlighting: there are a few commands, possibly nested, all with the general structure:
    @command[param1][param2]{contents, possibly very long and containing @nested[]{commands}}
  • Syntax substitution: since all commands have a semantic value (e.g.: @speech for direct speech or @standout for some kind of visual enhancement) it would be nice to render on-screen with some convention (e.g.: different font or color) hiding labels that are distracting.
  • Commands to wrap selected text in a command.
  • A browser keeping track of book structure (the usual division: book, part, chapter, scene) with possibility to jump to corresponding place in text.
  • Spell checker (better if something like Languagetool is available).
  • Details pane: to keep track of characters, places, objects: once defined these should be highlighted in text.
  • Commands to call my processing programs to export to the various output formats (currently XHTML/ePUB and LaTeX/PDF), possibly with some preview (might be external).
  • Some configuration pages to customize defaults (e.g.: direct speech style: guillemots/inverted quotes/em-dash).

Any insight welcome

@matkuki
Copy link
Owner

matkuki commented May 17, 2019

Hi,

I don't think the QScintilla editing component, is the right tool for this, as it is meant to be a source code editor. All editor widgets inside ExCo use the QScintilla editing component.
Things that should not be a problem:

  • Syntax Highlighting (different fonts, background/foreground color, ...)
  • A browser keeping track of book structure
  • Spell checker
  • Details pane
  • Commands to call my processing programs
    All other things concerning advanced styling of text like Syntax substitution and Command wrapping are not supported by default, so you would have to somehow implement them manually in QScintilla, which is probably not that trivial.

Another solution would be to create a new formatting component using QTextEdit with some additional processing code and then integrating it into ExCo (integration would be quite simple, the formatting component would probably be quite complex). QTextEdit supports rich text styling, which is a subset of HTML 4.0, if that is flexible enough for you:
https://doc.qt.io/qt-5/richtext-html-subset.html

But with regards to adding a new language with just the standard stuff, I would be glad to add it if you provide me with a specification (keywords, operators, special characters/words, ...) and an icon.

Regards

@matkuki matkuki closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants