* Underscores in "Function:" items
@ 2024-10-22 13:09 8dcc
2024-10-26 8:42 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: 8dcc @ 2024-10-22 13:09 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
Hello,
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
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>
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.
This is not a huge issue, since the user can just add some CSS (which I
personally use in my blog):
dl.org-dl dd p:nth-child(1) {
margin-top: 0px;
}
dl.org-dl dd p:nth-last-child(1) {
margin-bottom: 0px;
}
Thank you.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Underscores in "Function:" items
2024-10-22 13:09 Underscores in "Function:" items 8dcc
@ 2024-10-26 8:42 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-10-26 8:42 UTC (permalink / raw)
To: 8dcc; +Cc: emacs-orgmode
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-26 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 13:09 Underscores in "Function:" items 8dcc
2024-10-26 8:42 ` Ihor Radchenko
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).