I’m trying to compile into a pdf using Markdown, but when I do, it strips all the line breaks. I’m doing this because in my document, I write italics with
<i>TEXT</i>, but I want to output a pdf where it is TEXT.
My current workflow is that in the compiler, in the project format, in replacements, have
<i> replaced to * and </i> replaced to *. This works great, and all my italicised text is in italics. The problem is that I end up with
> This is a line. <i>here is some italics</i>
> This is another line.
This is a line. here is some italics This is another line.
I’ve tried replacing ctrl+enter with ctrl+enter ctrl+enter, and replacing ctrl+enter with
<br> but neither of those work.
Is there another replacement that needs to be made? Also, this only happens if I convert w/ MMD, the line breaks are fine if I do not do that.
(If it makes a difference, I’m using windows scriv 3)
The question I would have for you is whether this is one spot that you need adjacent lines for, or a larger problem with the entire document. If it is the latter, then you do need to compose proper Markdown in Scrivener for the most part, which includes paragraphs being separated by empty lines.
There is a way around that if you strongly prefer a more “word processor” looking writing environment, but it does take a few steps to set up, so let me know if that interests you.
If what you mean is you want something like a block quote to have two adjacent lines, then it is a common convention in Markdown to put two spaces on the end of the first line. That signals you want a <br/>, basically. In MultiMarkdown (what we use to convert) you can also use a backslash at the end of the line. I’ve drifted toward using this because I like being able to see at a glance whether something like that is going to happen, and two spaces on the end of a line are invisible.
So here is an example:
> The is a line. *here is some italics* \
> This is another line.
The is a line. here is some italics
This is another line.
Now if what you really want is two paragraphs in the same block quote, then:
> The is a line. *here is some italics*
> This is another line.
Thank you! This is for the entire document. For the most part I am posting it to AO3 and I’m used to using html formatting.
So using the compiler to replace the paragraph mark with a
\ does not work either - it has to already be in the document?
There is a better way to fix this if that is what you need. There are two separate tools in the compile settings that we can use to first add visual space between paragraphs, and then with the second tool, use that space to convert it to an actual empty line for Markdown to recognise separate paragraphs.
File/Compile... and double-click on the Format you are using, to edit its settings. If you are not using the “Basic MultiMarkdown” or Pandoc starter, or a custom one made from it, I’d recommend giving it a try first, to see how it is set up.
In the Section Layouts pane, select the layouts that print text, and click the “Override text and notes formatting” option at the bottom for each one.
The “Basic MultiMarkdown/Pandoc” formats are already configured to add visual space between lines. If you’re working from your own that you made from scratch, you may need to add paragraph spacing to the formatting.
Next click on the Transformations pane in the sidebar and tick the Convert to plain text checkbox. The setting that is provided is best, just “Paragraph Spacing”. If you used indents and include that you could end up making everything a code block.
The last thing to be aware of is that if you use styles while writing, you’ll want to go into the Styles pane and make sure that any you use also have paragraph spacing. (Hint: make the compile format designer window wider, if you can’t see the line & paragraph spacing control.)
I would not recommend using Replacements for this, because that will spread apart everything, and that may break some kind of Markdown that need two lines to be together: like tables and definition lists. And so by extension, if you do use those things, it will be a good idea to make styles for them—if only to protect them from having their paragraph spacing changed.
Thank you so much for all your help. I do have it set to ‘override text and notes formatting’ but I don’t see the ‘convert to plain text’ option. I’ve attached screenshots of the settings I have. Is there another setting I should have on?
Oh, we might be thinking of different ways to do things. It looks like you are using the native PDF output, which isn’t designed to do much about Markdown. There is a setting (maybe that is what you are using) that does simple conversion, but if all you want is a PDF, I’d recommend using the MMD→ODT option in the compile type menu. You’d need to load that in LibreOffice to make a PDF out of it.
The rest of the instructions should make more sense (for example even seeing the “Basic MultiMarkdown” compile Format I referred to), once you do that.