emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to in-line change html for specific paragraph only
@ 2024-10-18 15:52 Laurence von Bottorff
  2024-10-18 16:39 ` Laurence von Bottorff
  0 siblings, 1 reply; 2+ messages in thread
From: Laurence von Bottorff @ 2024-10-18 15:52 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

I would like to temporarily suspend a CSS rule on an org-mode export to
html. I have various CSS things going on in my export settings. Finally,
I'm overruling the basic html export behavior with this

#+HTML_HEAD: <style>p { margin-top: 0px; margin-bottom: 0px; text-indent:
2em; } </style>

which is specific to my ox-tufte <https://github.com/ox-tufte/ox-tufte>
html export in order to achieve a not-included "literary" book paragraph
look, i.e., paragraph has first line indented, paragraphs have no gap.
However, I would like to suspend the indentation only once in a while
throughout the document for specific paragraphs, e.g., a first paragraph of
a chapter -- but just for that paragraph. However, if I do an inline
somewhere in the text, e.g.,

@@<style> p > { text-indent: 0em; }</style>@@The sheep and their Cumbrians,
an age-old partnership, together since the ancient Norsemen brought the
hardy Herdwick breed to the high and lonely Lake District...

this changes *all* paragraphs to no indentation everywhere top to bottom.
And reversing this at the end of the paragraph back to 2em just changes
everything everywhere back to 2em. So how can I do a temporary suspension
of the indentation for one paragraph and then turn it back on?
-- 
⨽
Lawrence Bottorff
Grand Marais, MN, USA
borgauf@gmail.com

[-- Attachment #2: Type: text/html, Size: 1834 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to in-line change html for specific paragraph only
  2024-10-18 15:52 How to in-line change html for specific paragraph only Laurence von Bottorff
@ 2024-10-18 16:39 ` Laurence von Bottorff
  0 siblings, 0 replies; 2+ messages in thread
From: Laurence von Bottorff @ 2024-10-18 16:39 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 1744 bytes --]

Just solved it with this in the org-mode file

@@html:<p class="myindent">@@my text here@@html:</p>@@

after adding this to css file

p.myindent {
    text-indent: 0em;
}



On Fri, Oct 18, 2024 at 10:52 AM Laurence von Bottorff <borgauf@gmail.com>
wrote:

> I would like to temporarily suspend a CSS rule on an org-mode export to
> html. I have various CSS things going on in my export settings. Finally,
> I'm overruling the basic html export behavior with this
>
> #+HTML_HEAD: <style>p { margin-top: 0px; margin-bottom: 0px; text-indent:
> 2em; } </style>
>
> which is specific to my ox-tufte <https://github.com/ox-tufte/ox-tufte>
> html export in order to achieve a not-included "literary" book paragraph
> look, i.e., paragraph has first line indented, paragraphs have no gap.
> However, I would like to suspend the indentation only once in a while
> throughout the document for specific paragraphs, e.g., a first paragraph of
> a chapter -- but just for that paragraph. However, if I do an inline
> somewhere in the text, e.g.,
>
> @@<style> p > { text-indent: 0em; }</style>@@The sheep and their
> Cumbrians, an age-old partnership, together since the ancient Norsemen
> brought the hardy Herdwick breed to the high and lonely Lake District...
>
> this changes *all* paragraphs to no indentation everywhere top to bottom.
> And reversing this at the end of the paragraph back to 2em just changes
> everything everywhere back to 2em. So how can I do a temporary suspension
> of the indentation for one paragraph and then turn it back on?
> --
> ⨽
> Lawrence Bottorff
> Grand Marais, MN, USA
> borgauf@gmail.com
>


-- 
⨽
Lawrence Bottorff
Grand Marais, MN, USA
borgauf@gmail.com

[-- Attachment #2: Type: text/html, Size: 2849 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-18 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 15:52 How to in-line change html for specific paragraph only Laurence von Bottorff
2024-10-18 16:39 ` Laurence von Bottorff

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).