From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Fwd: Enforcing newlines in plain text export Date: Fri, 26 Sep 2014 08:52:27 -0700 Message-ID: <87r3yybcqs.fsf@berkeley.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXXwm-0001L2-Fz for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 12:00:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXXwh-0002Td-EA for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 12:00:40 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:60967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXXwh-0002SN-9d for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 12:00:35 -0400 Received: by mail-pd0-f169.google.com with SMTP id p10so1253225pdj.0 for ; Fri, 26 Sep 2014 09:00:28 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kaushal Cc: emacs-orgmode@gnu.org Hi Kaushal, I am forwarding your message to the Org mode list; you only sent it to me and Nicolas... Kaushal writes: > I came across > https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00466.html > through this emacs SE page: > http://emacs.stackexchange.com/questions/255/new-line-in-title-of-an-org-mode-exported-html-document > > The question I had asked on stackexchange was: How to export a mid-line > newline consistently in all formats. In paragraphs, all you need to do is end a line with "\\" to force a line break. This works for LaTeX, HTML, and plain text export, at least. This doesn't work in other kinds of syntax, like headlines, but you may not need it there. > But I couldn't figure out how to convey a newline character when exporting > to plain text (ascii). > > I tried, > > #+MACRO: NEWLINE @@latex:\\@@ @@html:
@@ @@ascii:\n@@ > > But that simply puts out "\n" verbatim in the exported txt file. I don't know the answer to this specific issue---you might need to create a custom export filter---but hopefully you can just use "\\" instead of a macro like this. Do you need to enforce line breaks *outside of* a paragraph in plain text export? If so, what case are you worried about specifically? Best, Richard OpenPGP Key ID: CF6FA646 Fingerprint: 9969 43E1 CF6F A646 (See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)