Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] StoryMarkup

Zitat von David Green <dgreen99@xxxxxxxxx>:

- For PDF export, I need better control over the gaps between paragraphs
and lists. For this, I need to know the last paragraph before a list,
the first list item, the last list item and the first paragraph after a
list.

You may find that this is relatively easy to do with XSL-FO.  It could be
that you'll need to implement your own DocumentBuilder to achieve your
goals.  You could take the existing one from WikiText and copy/modify it to
suit your needs.

Sorry, I mixed that up. I need this kind of control for the HTML export. I'm not using XSL-FO, I generate PDF via TeX. XSL-FO looks hideous.

- For these kinds of text, WikiLinks don't make sense. Instead, the
editor should figure out by itself which words should be a link (like
names of places, characters or items). For example, Adviser Rarrarar has
such a unique name, it's really simple to notice and link. It's a bit
more complex for "Rako" (which is the name of a character, a family and
a star system).

Generally the WikiText editor itself doesn't know a lot about links.  It's
the MarkupLanguage that knows where links start and end.

But the editor must style the links and react to clicks on them. I've implemented autolinks yesterday. The various types of pages provide a list of keywords to the project. The project then installs a AutoLinkPattern in the markup language. This is based on a huge regexp (one group which joins all words together, sorted by length and then by comparing the strings, so "Forne Rako" matches before "Forne".

- Novel editors must be smart about "good text". They must highlight
things like repetitive words, paragraphs always starting with the same
word, comma positions (">>," instead of ",>>")

WikiText provides a validation framework that may be of some help here.
 Some good examples of validation can be found in the Textile markup
language.  Take a look at the
org.eclipse.mylyn.wikitext.core.markupValidationRule extension point.

Cool, I'll have a look.

- I have three foreign languages in the text. In one of them, you can't
have "can't", "haven't", "didn't" (i.e. they don't slur words together).
In another, you have extreme slang. For these, I need different spell
checkers in the same line of text.

You're in new territory here.  I don't know how the Eclipse spellchecker is
configured.

I've opened a bug to pull it out of JDT into org.eclipse.workbench or maybe even org.eclipse.core (so it's possible to build command line spell checkers, too).

- Filtering the markup from the text to get a clean text stream to pump
through Lucene.

The easiest way to do this is probably to render HTML and pass that to
Lucene (there are almost certainly good HTML adapters for Lucene).  If that
doesn't work out for you, you could extend DocumentBuilder.

The HTML contains navigation links which I don't want in the index. I guess I could tell the builder to leave them out, though :/

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/


Back to the top