emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: Different spacing in html output compared to info and pdf
Date: Tue, 12 Mar 2013 11:34:11 +0100	[thread overview]
Message-ID: <87k3pc52l8.fsf@bzg.ath.cx> (raw)
In-Reply-To: <m14ngh7due.fsf@poto.myhome.westell.com> (Thomas S. Dye's message of "Mon, 11 Mar 2013 12:48:09 -1000")

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

Hi Thomas,

the attached (dirty) patch fixes it.  It's clearly not the right
approach, though.  I hope Nicolas can have a look soon, as the problem
affect all uses of snippets in macros.

Thanks for reporting this,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-fix-snippet-post-blank.patch --]
[-- Type: text/x-patch, Size: 1412 bytes --]

Changes in master
	Modified   lisp/ox-html.el
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9307081..6750ffc 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2024,8 +2024,9 @@ information."
   "Transcode a EXPORT-SNIPPET object from Org to HTML.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
-  (when (eq (org-export-snippet-backend export-snippet) 'html)
-    (org-element-property :value export-snippet)))
+  (if (eq (org-export-snippet-backend export-snippet) 'html)
+      (org-element-property :value export-snippet)
+    (if (< 0 (org-element-property :post-blank export-snippet)) " ")))
 
 ;;;; Export Block
 
	Modified   lisp/ox-latex.el
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index fa66bb4..5362edf 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1337,8 +1337,9 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
 (defun org-latex-export-snippet (export-snippet contents info)
   "Transcode a EXPORT-SNIPPET object from Org to LaTeX.
 CONTENTS is nil.  INFO is a plist holding contextual information."
-  (when (eq (org-export-snippet-backend export-snippet) 'latex)
-    (org-element-property :value export-snippet)))
+  (if (eq (org-export-snippet-backend export-snippet) 'latex)
+      (org-element-property :value export-snippet)
+    (if (< 0 (org-element-property :post-blank export-snippet)) " ")))
 
 
 ;;;; Fixed Width


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

  reply	other threads:[~2013-03-12 10:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 16:52 Different spacing in html output compared to info and pdf Thomas S. Dye
2013-03-11 20:38 ` Achim Gratz
2013-03-11 22:48   ` Thomas S. Dye
2013-03-12 10:34     ` Bastien [this message]
2013-03-13 18:25       ` Nicolas Goaziou
2013-03-21 19:12       ` Nicolas Goaziou
2013-03-25  5:41         ` Bastien
2013-03-25 19:30           ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3pc52l8.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=Stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).