emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: 8dcc <8dcc.git@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Underscores in "Function:" items
Date: Sat, 26 Oct 2024 08:42:13 +0000	[thread overview]
Message-ID: <87bjz7w90a.fsf@localhost> (raw)
In-Reply-To: <87wmi09tdx.fsf@gmail.com>

8dcc <8dcc.git@gmail.com> writes:

> When exporting the following Org file to Texinfo:
>
>     - Function: foo_bar arg ::
>       Contents.
>
> The part after the underscore is completely skipped:
>
>     @defun foo
>     Contents.
>     @end defun

Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cff9c45afb

> And, if I export it to HTML, the `bar' part is shown as a subscript, and
> I don't know if it's intended:
>
>     <dt>Function: foo<sub>bar</sub> arg</dt>
>     <dd>Contents.</dd>

This is intended. _ is syntax for subscript in Org markup.
See https://orgmode.org/manual/Subscripts-and-Superscripts.html
That section of the manual also talks how to modify export behavior wrt
sub/superscripts if you need to use underscore often.

> Another small detail, which might not be important, is that when
> exporting to HTML, the description of the function is only wrapped in
> <p> tags if it has more than one paragraph. This kind of makes sense,
> but results in inconsistent spacing when multiple functions are close:
>
>     Here's a list of functions:
>     - Function: foo arg ::
>       This has multiple paragraphs.
>
>       Another paragraph.
>     - Function: bar arg ::
>       Just one line.
>     - Function: baz arg ::
>       One line, again.
>     Here's some text after the list.

Wrapping into <p> is intentional. Not doing it will break other
scenarios...

However, see https://list.orgmode.org/orgmode/875ydracnq.fsf@localhost/
There are some cases when <p> is indeed creating awkward rendering. But
I have no idea what we can do.

It would be nice if someone with better HTML-foo chimed in with ideas.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      reply	other threads:[~2024-10-26  8:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 13:09 Underscores in "Function:" items 8dcc
2024-10-26  8:42 ` Ihor Radchenko [this message]

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=87bjz7w90a.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=8dcc.git@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).