Search code examples
emacsorg-mode

How to add a newline without adding a new paragraph


A simple org-mode document, a * header line, a - Q: line with an intended A: line. After exporting to html, why are Q: and A: in the same line?

* Header line
- Q: questions
  A: answers

Solution

  • According to the manual:

    Paragraphs are separated by at least one empty line. If you need to enforce a line break within a paragraph, use ‘\’ at the end of a line.

    Hence you should write

    * Header line
    - Q: questions\\
      A: answers
    

    which exports, as intended, to

    <ul>
    <li>Q: questions<br/>
      A: answers
    </li>
    </ul>