From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: vertical space Date: Fri, 31 Jan 2014 00:48:48 -0500 Message-ID: <87d2j866rj.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W96yV-000675-TP for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 00:49:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W96yO-0001kg-FK for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 00:49:11 -0500 Received: from plane.gmane.org ([80.91.229.3]:50151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W96yO-0001jj-8p for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 00:49:04 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W96yM-0001LY-Gp for emacs-orgmode@gnu.org; Fri, 31 Jan 2014 06:49:02 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 06:49:02 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jan 2014 06:49:02 +0100 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: emacs-orgmode@gnu.org Rustom Mody writes: > Im having an issue with inconsistent vertical space > > If I do latex export \\es at eol produce blank lines > However with html export they appear in output but not consistently > org version 8.2.5e > emacs version 24.3.1 > > Below a cut-down version from a file I see it happening > ------------ > #+TITLE: Equational Reasoning in Logic > #+AUTHOR: Rusi > #+OPTIONS: toc:nil > * Object and Meta language > Look at the following proof > > #+ATTR_LATEX: :mode math :environment flalign > P \wedge (Q \vee P)\\ > " \wedge distributes over \vee " \\ > = (P \wedge Q) \vee (P \wedge Q) \\ > " Idempotence of \vee " \\ > = P \wedge Q \\ > \\ > \\ > This case is easy: just delete the last two \\ and you are done. I take it that your real case is more complicated. Running org-element-parse-buffer on your buffer might be illuminating: the "internal" \\ get parsed as (line-break (:begin 267 :end 270 :post-blank 0 :parent #3)) but the last one (I used a buffer with just one trailing \\, not two) gets parsed as #("\\\\ " 0 3 (:parent #3)) i.e. a string, so it gets copied to the output. When the output is latex: ,---- | " Idempotence of \(\vee\) " \\ | = P \(\wedge\) Q \\ | \\ | % Emacs 24.3.50.2 (Org mode 8.2.5g) | \end{document} `---- the \\ are processed by pdflatex and become empty lines. When the output is html: ,---- | " Idempotence of ∨ "
| = P ∧ Q
| \\ |

`---- they are processed by the browser which does nothing special with them, so they are shown in the output. Why exactly the last one is parsed as a literal string and not as a line break, I don't know. Nicolas will probably explain all. The only thing I can say is that if there is something other than whitespace on the line before the \\, it gets parsed as a line break; if there is only whitespace (or nothing), it gets parsed as a string. That's probably a rough description and not quite right in all particulars, but I hope it's close enough. -- Nick