emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Lawrence Bottorff <borgauf@gmail.com>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: Soft return in footnote text?
Date: Mon, 12 Mar 2018 13:27:53 -0700	[thread overview]
Message-ID: <CAJcAo8so=m3_ygziqXyT_KfKpJB50D6KPyAtHZqQXPz1JTkrPg@mail.gmail.com> (raw)
In-Reply-To: <CAFAhFSW5PmC5GMj_pX87-GA9ejuxoab51NjkT+KxGqRxxPckWg@mail.gmail.com>

On 3/12/18, Lawrence Bottorff <borgauf@gmail.com> wrote:
> I'm getting carried away with a footnote and want to have it be many
> paragraphs long when I export it to HTML. I can put in latex math formulae,
> and that breaks things up. But is there a way to simply have separate text
> paragraph in an org-mode footnote?

footnotes can be separate or inline.  i think you are using inline.

inline is really good because it keeps the thing referred to with the
thing that is referring to it.  this shared locality helps prevent
footnotes from getting out of sync due to edits.  for this reason, i
use inline footnotes exclusively.

i too use multiple paragraphs in inline footnotes.  in principle, i
think you can use \par or something like that, but that's ugly.  your
idea of soft newlines is really interesting.  i don't recall their
behavior, so i can't answer.

this might be what you are doing?  i much prefer it:

ad faksdn kfsd kfjans kdfn kasdfn kasf kasf [fn::first par

second par.] rest of same paragraph.

however, org no longer supports this directly as of the new org parser.

what i do is use a filter function, which uses the new parser.  this
is slightly modified from something nicolas posted.

  (add-hook 'org-export-before-parsing-hook 'my-org-export-par-in-inline-fn)
  (defun my-org-export-par-in-inline-fn (backend)
    "Fix inline footnote paragraphs."
    (with-no-warnings
      (unless (org-export-derived-backend-p backend 'latex)
        (org-footnote-normalize)
        ;; =alpha i guess it sticks \par in there for you
        (while (re-search-forward "\\\\par\\s-*" nil t)
          (replace-match "\n\n")))))

this works for me.  it restores the previous behavior that i like.

the future concern is fontification.  currently this works perfectly.
however, if the org fontifier starts using the new parser, and does
not accommodate this style, then the inline footnote will not be
fontified correctly.  this has not occurred.

if such a future fontifier accommodates this style, no problem.

dunno if soft newlines for inline footnote paragraphs could fix that
or be possible.

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

  parent reply	other threads:[~2018-03-12 20:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 19:01 Soft return in footnote text? Lawrence Bottorff
2018-03-12 19:45 ` Nicolas Goaziou
2018-03-12 20:27 ` Samuel Wales [this message]
2018-03-13  0:15   ` Samuel Wales

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='CAJcAo8so=m3_ygziqXyT_KfKpJB50D6KPyAtHZqQXPz1JTkrPg@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=borgauf@gmail.com \
    --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).