I need to compile text out of Scrivener for using with the Typo3 Content Management System, so actually I do a copy&paste.
The result is that a whole text, i.e the text has 10 paragraphs, wrapped at the beginnig and the end with the tags: [code]
10 paragraphs
[/code]
The HTML markup I need is [code]
paragraph one
paragraph two
[/code]and so on
During my experiments with compiling the draft I saw that the normal HTML export do that, but add
<span>
tags which I don’t need.
Is there a possibility to customize the HTML output with MarkDown that every single paragraph is wrapped with the [code]
[/code] tags?
Or customizing the “normal” HTML export behaviour?
Just to verify, you are double-spacing your paragraphs, right? With the MultiMarkdown-XHTML exporter you should be getting every paragraph wrapped in individual paragraph elements and no span elements at all (unless you have annotations turned on, but those are in-line).
Btw, if you need this more often, you should create an Application Service in OS X Snow Leopard for this. Simply copy markdown.pl into a Run-Shell-Script action in Automator, followed by a Copy-to-Clipboard action:
You could also combine this with a script that doubles all your line breaks before they get passed to Markdown. 8)
The last days I have played around with the MMD XSLT files to become a little bit more familiar with the principles MMD works.
And I added the KOMA-Sripts for export with the scrbook and the scrrpt/scrartcl classes.
Now I ask myself how to differentiate the
tags, concrete I have a text as a discussion with questions at the beginning of any subsection.
Beetween the question as the first subsection should be an empty line, beetween the rest of the paragraphs in the answer not.
If I use “Edit/Insert/Line Break” for the line with the question in scrivener, MMD and the LATEX export did not recognize the extra linebreak.
Do you have an idea or suggestion what to do to get the behaviour for MMD Export to LATEX?
I’m not quite sure if I follow what you are wanting, do you basically want an h_space fill? If so, there is no way to do that in MMD. It really only supports a small subset of LaTeX, and most of it is entirely directed toward structural, rather than visual things like this. You’d probably be best off inserting the LaTeX manually inside an HTML comment in the Scrivener project. Or, if the situation is totally predictable (always a space after the second paragraph in a chapter, for instance) you could code an XSLT match that looks for that and inserts the correct LaTeX. Look up XPath syntax on how to do this, it’s pretty simple.
If you want the ability to insert two lines without a full paragraph break, which it almost sounds like, then simply tap the spacebar twice at the end of the first line.
The menu command you referenced inserted RTF codes into the document. These are completely ignored during MMD export.
I solved it by setting latex commands in the scrartcl.xslt file.
The option “parskip=half+” for example has to be set as an option for the document class.
Together with the howto from www.1984produkts.com about Scrivener and MMD, Scrivener is a really powerfull - simply the best - frontend for latex exports and it makes a lot of fun, writing with it.
And at least with Textmate as my prefered editor the workflow is optimal.