Question and a bug (footnote style)

I’ve been using Scrivener for a long time – wrote my diss. and a book in it, mostly in plain latex that afterwards I compiled separately.
But I’m finding more and more the need to have my text easily exportable also to markdown and to doc (for those colleagues…), and while I can mess with pandoc, I try to avoid it. I’ve got a pretty good workflow in Scrivener, but as I was trying to change it up, encountered a problem.

Basically, I try to write with as little code as possible these days (don’t mind the code that much, but find it ugly when writing, and when needing to convert to md or doc or whatever). So I have some styles that get converted to various things during the compilation process to latex – emphasis to \emph{} etc. (And the same thing gets converted differently when compiling to markdown.)

I was experimenting with whether I could also do that for citekeys. E.g., set up a style for citations, which then gets coverted into \cite{}. But here’s my problem. In footnotes (not the inline kind) you can’t use styles. A possible workaround I tried is that there’s an option, under the compiler “Markup” column, to set “enclosing markers for unstyled italics”. But here is the bug: to whatever I set that to, in the footnote, that will appear twice.

E.g., if I set it to \emph{}, then in the regular body text I get the wanted \emph{xx}, but if the text is in a footnote, I get \footnote{\emph{\emph{xx}}}. And it doesn’t matter what the enclosing markers are; in the compiled footnote, it will always appear twice.

So, I have two questions. 1) Anyone else has encountered this? I’m using the latest Scrivener and the latest MacOS.
2) Any other workaround for being able to mark out styles in a footnote?

Thanks.

(EDIT: an obvious workaround of course is to use inline footnotes. Which I may do if there’s no better solution, but it tends to get pretty cluttered with them.)

OP here. I guess I have resolved to use inline footnotes, since the best solution here would require style-support for inspector footnotes. (I found a wish list item for that; strongly support it.)
One curious thing: while inspector footnotes don’t support styles, they still remember it. In experimenting, I converted some inline footnotes to inspector ones, and then converted them back, and the original styles (emphasis, citation, etc.) were remembered. Which suggests to me that there is at least some way that that information is being stored (but I’m no programmer).

The “unstyled italics” behavior described above still seems like a bug.

Thanks, I was able to reproduce the italic marker bug easily, and will get that written up.

As for using styles and footnotes together, yes the only way of applying them is within inline footnotes. You wouldn’t need to use inline footnotes everywhere of course, just for those that have content requiring styles, and as you note if you convert them to inspector footnotes after the fact, it works fine. It even stores fine on the disk, compiles correctly and has every indication of being intentional—so I’m not sure why the UI simply doesn’t allow the application of character styles (I do understand why paragraph styles wouldn’t be the best).

By the way, it sounds like you’re already far enough into configuration that it may not be worthwhile to consider using it for this project, but you might find some good ideas in it. There is a “General Non-Fiction (LaTeX)” project template that demonstrates a number of techniques you can use to minimise syntax in the writing space.

1 Like

Great, thank you! And good to know that the compilation works fine when they are converted to inspector footnotes as well (I just tested it, and yes, it keeps the styles even if they aren’t visible). This basically solves my problem.
Except for a minor thing. For some reason, the keyboard shortcut for “insert inline footnote” doesn’t work for me (I left it at the default). I checked the systems preferences and there doesn’t seem to be a conflict – but I’m really not an expert in setting up these shortcuts, so not 100% sure. Any suggestions about what to check? (The “insert inspector footnote” shortcut does work.)

I looked at that project template a while ago, and it was quite helpful (in my previous work, I didn’t use styles at all, just plane latex, but this is so much better!). I think most of my current compilation setup is based on that.

Thanks again!!!

(EDIT: never mind the shortcut. I set up a new one in Systems Preferences and it works :slight_smile: .)

1 Like