emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kashyap Chamarthy <kashyap.cv@gmail.com>
To: Diego Zamboni <diego@zzamboni.org>
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 19:33:39 +0100	[thread overview]
Message-ID: <CAOaxAcaQPto82MS9p3GfA4o36VvM-9n1tJE1UTWhpwF0ZEiK7g@mail.gmail.com> (raw)
In-Reply-To: <CAGY83Ec0G+iDyJiiz0VCnAOF_AJxzdvEzVRecZF6pSOnPpSycw@mail.gmail.com>

On Sun, Dec 27, 2020 at 4:53 PM Diego Zamboni <diego@zzamboni.org> wrote:
>
> Hi Kashyap,

Hi, Diego

> 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.:

Ah, I see.  So it's any element within a list item that's wrapped in
paragraph tags.

> ------
> 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>

Hmm, that fixes the new line before the "sub bullet under test 3, with
a quote".  However, a new line still remains after the quote ends (and
before the "Test 4" starts).  Is it possible to nuke that too?  If
not, that's okay, I can live with it. :-)

> 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.

Thanks for taking the time to look at the code.

[...]

/kashyap


  reply	other threads:[~2020-12-27 18:34 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
2020-12-27 18:33   ` Kashyap Chamarthy [this message]
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=CAOaxAcaQPto82MS9p3GfA4o36VvM-9n1tJE1UTWhpwF0ZEiK7g@mail.gmail.com \
    --to=kashyap.cv@gmail.com \
    --cc=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    /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).