I’m using Scrivener for writing a large LaTeX file. I’d like to use the editor to write my text in the usual word processor style, i.e. paragraphs have line feeds only at the end and not at the end of each line.
The problem is, when I compile the text for LaTeX output, I only have one single line feed between paragraphs. It would be awesome to be able to replace single line feeds with double line feeds during the compile step.
Long time since I did that but there is a LaTeX variable for inter-paragraph spacing. That’s the thing you need to fiddle with. Maybe you can do that with some LaTeX specific Scrivener Front Matter that inserts necessary LaTeX code to do it.
Yeah, sorry for not making myself clear here. I’ll try to paraphrase.
I’m wanting to write LaTeX source code in Scrivener word processor-style, i.e. ending each “logical” paragraph with one single line break. When I compile such a Scrivener document into plain text, I get exactly this: each paragraph separated by exactly one single line break.
LaTeX, on the other hand, assumes that a paragraph break is two line breaks, since the source code is plain text and plain text lines end with a single line break. So two paragraphs written in my Scrivener file are compiled into one single LaTeX paragraph, because LaTeX sees each Scrivener paragraph as a very long “line”.
It would be awesome to tell Scrivener to separate paragraphs by two line breaks, or, to use white space in custom replace settings in the compile options.
Hope, that’s clearer.
This already should be working. If you hit Opt-Return in the Replace field you will instruct it to look for a single carriage return, then type that in twice into the With field.
Another approach is to convert rich text formatting into raw text formatting. This can be done with Transformations compile option pane. Enable the “Convert to plain text” option, and set it to “Paragraph Spacing”. Now assuming you have more than a half line-height visual padding between paragraphs in the rich text editor, literal empty lines will be inserted between paragraphs. That will of course only work if you prefer to the look of padded paragraphs in a rich text environment. If you prefer indents with no spacing, then there will be nothing for the Transformations pane to work with. This method is however more reliable, as it won’t spread apart things that shouldn’t be spread apart (I don’t think that could pose a problem with LaTeX—is there anything where multiple spaces between lines might break code? I can’t think of any).
The Windows and Linux versions don’t yet support replacing characters like space, tab, and carriage returns in the Compile Replacements, but this is planned for the future. Likewise the ability to use carriage returns as part of Find/Replace or project replace.