The styles support in Scrivener is awesome. I’ve got a couple of little wrinkles to figure out though. There are some LaTeX environments that need an argument in order to function. An example is displayquote which can take a reference, and then typesets it nicely on the final line. Ideally I would be able to generate this:
\begin{displayquote}[Isa 8:16]
Bind up the testimony, seal the teaching among my disciples.
\end{displayquote}
I can use a style to generate the \begin{displayquote}…\end{displayquote} fairly easily. But I have no idea how I could do the same with the [Isa 8:16] argument.
There are a few different ways you can go about doing this. For something like this, where the argument is “human content”, so to speak (not a bunch of configuration options), the simplest approach is just type that part into the editor and set up your style so that it does not insert a carriage return after the first line. So you’d be typing in something like this into the editor:
[Attribution]
Content of the quotation...
Another approach is to use a second style, a character style so you can layer them, for the argument line. I describe this method, which I make use of in the user manual, in this discussion.
There are probably other things you could as well with Replacements—but for something very simple like this it would probably be overkill. We might want to see something like that if there are additional attributes to be added based on the type of content and so on—stuff we wouldn’t want to type in or see in the editor, but that isn’t worth creating a whole new style or LaTeX macro for.
That’s very clever. That immediately solves the issue in terms of LaTeX. It occurs to me that with pandoc additional possibilities open up too, as the styles can get mapped to <span>s, and then it’s relatively simple in pandoc to use a Lua filter on the span (even if it isn’t right at the start of the paragraph style in question).