Notes, again -- two suggestions

I am currently in the midst of a project that involves lengthy notes, and it is clear to me that two things would be very helpful.

The first one is the possibility of having more than one notes stream, and being able to define the properties of each stream when exporting the draft (e.g., stream one could be set to export as footnotes, and stream two to export as endnotes). Mellel allows a number of different note streams, and it would be very useful if I could build those streams while working in Scrivener, since this would allow me to only turn to Mellel at a late stage in the production of the manuscript.

The second one: it would be wonderful if we could have at least two (ideally, configurable) text styles, one for main text and the other for note streams. Same way as annotations appear in red, notes would show on screen with both smaller line spacing and smaller font size than the main text. This would compensate in part for the impossibility of hiding notes by, at least, making bulky notes take less space on screen.

Thanks for considering these suggestions.

I am guessing here, but I’m pretty sure that multiple notation streams are not even part of the RTF specifications. In other words, even if Scrivener had some way of generating them—nothing would know how to read them, not even Mellel.

RTF does allow for both endnotes and footnotes, I think, but I’m afraid I won’t be adding any such support. I have just spent a week overhauling, bug-fixing and tweaking Scrivener’s RTF export, and I don’t want to go back there for some time. :slight_smile: I think this really falls outside of Scrivener’s remit, anyway - it’s pretty rare to see endnotes and footnotes used in the same document or article, so I think it’s fair to expect to have to use a more specialised academic program for that sort of thing.
All the best,
Keith

I use multiple note streams often. I often cite intro quotes for chapters as footnotes, in-chapter notes as endnotes. But Mellel handles this perfectly, so I recommend it for those needing this capability.

The MMD->LaTeX export is quite flexible. I’ve modified xhtml2latex.xslt to use annotations for margin notes, but the same principal should also work for endnotes:

<xsl:template match="html:span[starts-with(@style,'color:')]"> <xsl:variable name="mpar" select="node()"/> <xsl:text>\marginpar{</xsl:text> <xsl:value-of select="substring($mpar,2,string-length($mpar)-2)"/> <xsl:text>}</xsl:text> </xsl:template>

With MMD, you could actually craft multiple streams with ease, using annotations. Since the colour of the annotation is sent to the XHTML file it generates, you can have the XSLT look for specific colours and do different things with them depending upon that. You needn’t even stay within the constraints of note streams. Green annotations could be indexed words; red could be comments; blue endnotes.

Brilliant idea! Here’s another pedestrian example that turns blue annotations into \index-commands:

<xsl:template match="html:span[starts-with(@style,'color:')]"> <xsl:variable name="annotation" select="node()"/> <xsl:variable name="ancolor" select="./@style"/> <xsl:choose> <xsl:when test="contains($ancolor,'#0000FF')" > <xsl:text>\index{</xsl:text> <xsl:value-of select="substring($annotation,2,string-length($annotation)-2)"/> <xsl:text>}</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>\marginpar{</xsl:text> <xsl:value-of select="substring($annotation,2,string-length($annotation)-2)"/> <xsl:text>}</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:template>

Bit of a shame though that we cannot use this for exports to Mellel. :neutral_face:

…looks good but it`s full of flaws… :frowning:

Take care,
Fluff

I’m not sure I see the color of my annotations showing up in the XHTML. How do I set the color of the annotations?

Thanks!

You should be getting something like this:

<span class="annotation" style="color:#FF0000">Content of annotation</span>

Hence the match code above. If you are just getting paragraph text in brackets, then check your relevant compile options.

I was actually stuck on how to set the annotation color, got it now, thanks!

The technique in this thread is really neat.