emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Diego Zamboni <diego@zzamboni.org>
To: Kashyap Chamarthy <kashyap.cv@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: A way to avoid unwanted new lines when using paragraph quotes?
Date: Sun, 27 Dec 2020 16:52:58 +0100	[thread overview]
Message-ID: <CAGY83Ec0G+iDyJiiz0VCnAOF_AJxzdvEzVRecZF6pSOnPpSycw@mail.gmail.com> (raw)
In-Reply-To: <CAOaxAcYNasdn=_E8CekaMs3ZevMqM3542wBASPoeJ_jS_5bX_w@mail.gmail.com>

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

Hi Kashyap,

The problem seems to be that when the HTML exporter finds more than one
element within a list item, it wraps each one in its own set of
=<p>...</p>= tags, which creates the additional space. You can see that
this has nothing to do with the quotes, just inserting a second paragraph
within the list item triggers this, e.g.:

------
3. Test 3
   - sub bullet under test 3, with a quote:

     another paragraph within the bullet
------

As Juan Manuel suggested, one way to fix the visual difference is with CSS.
To be more selective, you could style only <p> items with a <li>, like this:

#+HTML_HEAD: <style>li p { margin: 0em; }</style>

In my test, this eliminates the spacing before those items, making them all
look the same in the browser.

Looking at the ox-html code, there doesn't seem to be a way to prevent this
from happening at the moment, a plain paragraph is always wrapped in <p>
tags.

Hope this helps,
--Diego


On Sun, Dec 27, 2020 at 2:03 PM Kashyap Chamarthy <kashyap.cv@gmail.com>
wrote:

> Hi, folks —
>
> First of all, many thanks to the contributors for their work on
> Org-Mode.  I'm a happy (novice) user; first time poster here. :-)
>
> I have a seemingly trivial aesthetic problem. I've attached the
> reproducer .org file and its HTML export to demonstrate it.  I'm sure
> advanced users might recognize the problem immediately. As you notice
> in my HTML export: An unwanted new line is added between "Test 3" and
> "sub bullet under test 3, with a quote" (which uses
> BEGIN_QUOTE/END_QUOTE in the .org file). Likewise, a new line is added
> before "Test 4" starts.   And yet again, a new line under "Test 6" and
> its sub bullet.
>
> Is there a way to avoid the said new lines in the above mentioned
> examples? (NB: A space right _before_ the quote starts is okay.)  Or
> alternatively, is there a way to consistently force a new line in the
> HTML export, after each of "Test 1", "Test 2", et al?
>
> Many thanks in advance!
>
> Regards,
> Kashyap
>

[-- Attachment #2: Type: text/html, Size: 2721 bytes --]

  parent reply	other threads:[~2020-12-27 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27 13:02 A way to avoid unwanted new lines when using paragraph quotes? Kashyap Chamarthy
2020-12-27 13:55 ` Juan Manuel Macías
2020-12-27 15:52 ` Diego Zamboni [this message]
2020-12-27 18:33   ` Kashyap Chamarthy
2020-12-27 19:17     ` Juan Manuel Macías
2020-12-27 21:15       ` Kashyap Chamarthy
2020-12-27 21:25     ` Diego Zamboni

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=CAGY83Ec0G+iDyJiiz0VCnAOF_AJxzdvEzVRecZF6pSOnPpSycw@mail.gmail.com \
    --to=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=kashyap.cv@gmail.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).