emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is It Possible To Target ID And Classes With Org Mode Exports?


From: Samuel Banya
Subject: Re: Is It Possible To Target ID And Classes With Org Mode Exports?
Date: Sat, 19 Feb 2022 10:49:17 -0500
User-agent: Cyrus-JMAP/3.5.0-alpha0-4778-g14fba9972e-fm-20220217.001-g14fba997

Hey there,

I used 'C-h r' and found the man page for this under '13.9.12 CSS support' for the Org Mode manual.

Here's the section:
   In order to add styles to a sub-tree, use the ‘HTML_CONTAINER_CLASS’
property to assign a class to the tree.  In order to specify CSS styles
for a particular headline, you can use the ID specified in a ‘CUSTOM_ID’
property.  You can also assign a specific class to a headline with the
‘HTML_HEADLINE_CLASS’ property.

Thanks for providing this, as I had no idea you can do this, great to know!

Will use this to create some 'flexbox' elements using containers with this in mind :)

Thanks again,

Sam

On Sat, Feb 19, 2022, at 8:22 AM, Ihor Radchenko wrote:
"Samuel Banya" <sbanya@fastmail.com> writes:

> I'm curious, is it possible to specify a 'ID' or 'Class' attribute for a specific header, or link that you create in Org Mode?
>
> Asking since I'm in the process of modifying a CSS stylesheet for a site, but would want more granular control to possible make containers with ID or classes, but it doesn't look possible in Org Mode by default.

For headline class attribute, see Org manual -> Exporting -> HTML Export -> CSS
support (HTML_HEADLINE_CLASS property). For headline ID, you can set
CUSTOM_ID property.

Links are discussed in
87mtinb2vq.fsf@posteo.net/T/#t">https://list.orgmode.org/87mtinb2vq.fsf@posteo.net/T/#t

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]