[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Underscores in "Function:" items
From: |
Ihor Radchenko |
Subject: |
Re: Underscores in "Function:" items |
Date: |
Sat, 26 Oct 2024 08:42:13 +0000 |
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>