title: Is it possible to enable global double spacing in pandoc for Markdown to RTF conversion?
body: <p>I have a very simple markdown text file, and I can easily convert it to RTF using the following command line call:</p>
  
  <pre><code>pandoc foo.md -o foo.rtf -s
  </code></pre>
  
  <p>Nothing fancy there. When I convert it to PDF (through LaTeX), I know that I can create a template like this</p>
  
  <pre><code>pandoc -D latex &gt; mytemplate.txt
  </code></pre>
  
  <p>and then modify the template to include</p>
  
  <pre><code>\usepackage{setspace}
  \doublespacing
  </code></pre>
  
  <p>in the preamble. </p>
  
  <p>It seems though that in RTF, double spacing is a variable for each paragraph. I have tried to generate a template, as in LaTeX, and then modify it accordingly, but it seems there is no way to enable global double spacing. Moreover, there is no option in pandoc like the --reference-docx and --reference-odt, which let me provide a sample document and then import the styles.</p>
  
  <p>I have also looked to the RTF writer code in pandoc, and found that the paragraph spacing seems to be fixed in code, although I am not completely sure.</p>
  
  <p>Does anybody have any hint on how to solve this? Or should I forget about RTF and go ODT or DOCX?</p>
  
  <p><strong>Update 2014-05-28:</strong></p>
  
  <p>Based on Oliver's response, I have been looking at the documentation, but still there is something I cannot see clearly. It seems that in the Writer for RTF format (<em>Text.Pandoc.Writers.RTF</em>), the spacing for the paragraph is fixed by creating two closures (rtfPar and rtfCompact) with normal spacing and no spacing respectively:</p>
  
  <pre><code>-- | Default paragraph.
  rtfPar :: Int       -- ^ block indent (in twips)
     -&gt; Int       -- ^ first line indent (relative to block) (in twips)
     -&gt; Alignment -- ^ alignment
     -&gt; String    -- ^ string with content
     -&gt; String
  rtfPar = rtfParSpaced 180
  
  -- | Compact paragraph (e.g. for compact list items).
  rtfCompact ::  Int       -- ^ block indent (in twips)
         -&gt;  Int       -- ^ first line indent (relative to block) (in twips)
         -&gt;  Alignment -- ^ alignment
         -&gt;  String    -- ^ string with content
         -&gt;  String
  rtfCompact = rtfParSpaced 0
  </code></pre>
  
  <p>Then, when traversing the JSON Pandoc document and visiting the <em>Para</em> block, these closures are used as-is:</p>
  
  <pre><code>blockToRTF indent alignment (Para lst) =
    rtfPar indent 0 alignment $ inlineListToRTF lst
  </code></pre>
  
  <p>Maybe I am missing something, but I cannot see how a filter could be used to change the JSON representation and then create double-spaced paragraphs if the writer is going to ignore everything related to spacing.</p>