I think this would be best kept as a user customisation, because there is at least one case created by Scrivener which would create superfluous line breaks: When you opt to not have Annotations in the output, and some of your annotations exist within their own paragraphs. This would create a series of empty lines in the output, which would be retained by any conversion to
Given that it looks like you know how to do it, I would suggest altering the scripts in Scrivener, and adding your Perl script to the primary Perl scripts that Keith is calling for your intended output.
Are you sure about this? I must say I fail to see how losing these line breaks could be considered acceptable to any user. It at least tends to mange most of my texts – especially those with a lot of dialogue (and consequently a lot of soft line breaks).
Er – I really wouldn’t know how to tweak Keith’s scripts myself. The code posted above if shamelessly lifted from the vastness of cyberspace – I’m a pearl idiot myself. But I suppose I could learn…
Also to consider is the conflict of philosophies. In XHTML, you are encouraged to use style to adjust the appearance of a document, rather than embedding the appearance into the content. So instead of using successive
tags, you would create a “lastparagraph” class with an extra large margin-bottom, and apply that to your last paragraph. LaTeX has an even more strict philosophy of “don’t do anything about appearance, I’m the layout designer, that is my job.” Of course you can, but you are encouraged not to.
I am guessing that it is for this very reason that neither MMD nor Markdown have any syntax for forcing empty lines. Just a guess. You might be able to come up with some work-around using code blocks or something.
Ok. I see what you mean. Let me illustrate what I’m concerned about:
Using Scriveners MMD output transformes
Ett par meter framfÃ¶r kvinnan gick en pojke och en flicka och hÃ¶ll varandra i handen. Den vithÃ¥riga kvinnan sneglade lÃ¤ngtansfullt pÃ¥ det unga paret.
"KÃ¤rleken ligger verkligen i luften. Vart man Ã¤n tittar ser man fÃ¶rÃ¤lskade par. Kanske Ã¤r det vÃ¤rmen som sÃ¤tter hormonerna i svallning?"
"Ã„r du avundsjuk?"
"Avundsjuk? Nej, pyttsan! Jag har minsann inte alltid varit ensam", sa kvinnan, "Jag -- om nÃ¥gon -- har verkligen kÃ¤nt Ã¤kta kÃ¤rlek".
"JassÃ¥?" sa den manliga vÃ¤nnen med lÃ¥tsad fÃ¶rvÃ¥ning.
"Jo, dÃ¥. Till och med jag har som ung fÃ¶rlorat mig i passionens vÃ¥gsvall -- men visst har jag redan trÃ¥kat ut dig med den historien?"
"Kanske -- men den tÃ¥l sÃ¤kert att hÃ¶ras igen."
[code]Ett par meter framfÃ¶r kvinnan gick en pojke och en flicka och hÃ¶ll varandra i handen. Den vithÃ¥riga kvinnan sneglade lÃ¤ngtansfullt pÃ¥ det unga paret. â€
Oh! Yes. MMD requires a full paragraph space between things to keep them as paragraphs. So in other words, Scrivener’s (and by extension, RTF’s) soft line breaks are ignored. What you really want in this particular situation, is to use MMD’s soft break, which is to apply two spaces to the end of each line.
I wonder if it is possible for Keith to make it so that RTF soft breaks get converted into two spaces like this? That would be a much better solution, as it would allow intentional breaking to be preserved, without adding a wild garden of
s all over the place in unintentional spots.
Great tip about the double space at the end of lines. I had no idea. Hopefully there will be some other way around this, since I think it’s a bit counter-intuitive having to add extra spaces like this. It kind of disrupts the writing experience.
This would perhaps be something for Fletcher to ponder, rather than Keith? I would think it better to straighten this out within MMD – not within Scrivener itself. Or – as you just suggested – perhaps Scrivener could temporarily convert these soft line breaks into double spaces during export.
This would best be categorized as a misunderstanding of how Markdown, and by extension, MultiMarkdown work.
It is designed to work like this. This is to allow a plain text file that has been line wrapped (to 72 or 80 characters for instance) to be handled properly.
If you desire a new paragraph, then you use two newlines, leaving a blank line in between paragraphs.
If you want to force a single hard return, then you use “space-space-newline.” This is NOT used to indicate a new paragraph. This is used when you have some special formatting needs, such as a list of text items that for some reason you do not want formatted as a list. Or if you need to insert a line break in some metadata (an address for instance).
Again, paragraphs are separated by a blank line (e.g. two newlines).
Markdown, and more specifically MultiMarkdown, are powerful approaches to formatting text with minimal markup. The MultiMarkdown web pages (google it) include several examples showing how a single plain text file can be transformed into high quality XHTML, LaTeX, pdf, or (sometimes) RTF output. I highly recommend using it for writing documents that you wish to format yourself into production quality PDF’s. But, as much as I avoid RTFM myself, I would suggest it in this case. There are lots of tricks you can use to get the output you desire, but for many users there may be a philosophical shift that needs to occur first. It’s a very different approach than a typical word processor.
I beg to differ. I use it all the time when writing dialogue, and I think a lot of English-speaking-writers do as well.
MD/MMD is a solid product, and I really respect the concept behind it. That does however not mean that Scrivener wouldn’t benefit from a somewhat more intuitive implementation when it comes to line breaks and such. At least not in my humble opinion. But then again, I’ve never really used MMD for anything else than web copy before and I tend to write a little differently for that medium.
If he wants to use verse formatting for dialogue (something I have never seen before, but then even Joyce had problems with typical dialogue formatting), then it would seem to me that the usage of what you are referring to as list spacing, would be desired. There are numerous cases where such formatting would be desired, such as in verse and poetry, where you would not want full paragraph spacing or indenting to occur. Why, in these cases, is the use of MMD’s ability to generate a verse style section philosophically opposed to M/MD?
And incidentally, this is a primary purpose of the “soft” line break in Scrivener.
I categorically refuse to have anything to do with this. Scrivener only does a very basic export to MMD - and this is my intention. If you are using MultiMarkdown to export to any format, then it is up to you, the user, to ensure that you are using the correct MultiMarkdown syntax to get the results you require. It is not Scrivener’s job to second-guess any more than parsing annotations and footnotes.
I don’t really understand why. You wanted MultiMarkdown, didn’t you? And now you have it. Scrivener doesn’t remove any line breaks at all. Not at all. It just takes your text and compiles it into a normal MMD file. So, what is the problem? If you wanted MultiMarkdown, then surely you wanted to use the syntax to create your documents? Sorry, but I don’t really understand the issue here. MultiMarkdown has certain demands that you need to meet to format a document. If these are a problem, then they need to be addressed by Fletcher, not me - like I say, it is not Scrivener’s place to alter your text too much if you have told it that you are using MultiMarkdown…
Bewildered (well, okay, just a little confused),
That is how I usually see it. When the conversation switches speakers a new paragraph is used. There are exceptions, of course, but I think this would be more of a typographical artistic style than a writer’s choice.
Hi Joakim, sorry if I came across as a bit grumpy - I just came home from a long day at work and was trying to deal with all the beta issues. I wonder if Fletcher has a solution? Is dialogue handled with soft line breaks in German, then, rather than full paragraph breaks?
Why would you not use separate paragraphs for each speaker? It’s been a while since I took a formal writing course, but this is standard practice in all the books I read.
Now, whether you want to indent the first line of a paragraph is an entirely separate matter, and that is between you and LaTeX. Not MultiMarkdown. But everything I have read on LaTeX suggests the default behavior (but I am not an expert on this.)
But if I am mistaken, or misunderstanding you, please let me know.