Sb3 : I/O : minor : White-space trimming?

From the changes list:

I’m assuming you mean white-space within the annotation gets trimmed, and not around it, based on a discussion we had some weeks ago. Either way, as far as I can tell no trimming is happening at all, in export or copy & paste.

As discussed, with MMD usage this is less of a deal since multiple spaces do not show up in XHTML or LaTeX – but there is an issue if you have carriage returns inside of your annotation. This can produce invalid XHTML where a span is placed around block level elements,

tags in this scenario.

The latter part is down to MMD to deal with. When you export annotations using MMD, Scrivener automatically inserts tab characters before each newline, as recommended by Fletcher.

Also, although I remember our previous conversation about stripping whitespace within an annotation, I couldn’t remember why we decided this was a good idea. So, I got rid of it, mainly because I didn’t like the output. The output to normal text should be as close a representation of your actual text as possible, I think. For instance, it is better to have this:

Here is some text.[ And here is an annotation ] And back to text.

Than this:

Here is some text.[And here is an annotation] And back to text.

So, that is the thinking.

Fair enough. It will just require discipline in the case of MMD users to realise
that annotations will become span element. It has become a non-issue for me now that I can export to structural formats.

This will have to be dealt with somehow… I think the default from MMD is going to be that paragraph tags do not get placed, and the whole annotation becomes one paragraph.

Remember, support for annotations is sort of a patched together feature, and not for heavy duty use…

We’ll see what happens!

Perhaps a pair of breaks can be inserted wherever there would have been a paragraph, to at least retain visual formatting within the annotation.

Patched together it may be, but let it be said that my book has thousands of them, and when I tested a full output to LaTeX a few days ago, every single one of them (that I saw with a cursory skim anyway) seemed to have made it through flawlessly. I do not have multi-paragraph notes though. I imagine this will create a bit of a headache for those who need them, if there is actually anyone out there that does. Most people use annotations as quick notes to themselves about prose or fact checking.