* BUG? unable to surround subtrees with html tag
@ 2021-06-21 19:07 Matt Price
2021-06-21 22:01 ` allow HTML block to escape from outline-text div? WAS: " Matt Price
0 siblings, 1 reply; 6+ messages in thread
From: Matt Price @ 2021-06-21 19:07 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
I'm using the most recent wip-cite-new branch of org, with a recent emacs
git (28.0.50).
I would like to be able to surround some portion of a subtree with a tag,
e.g.:
* parent
some text
#+HTML: <div class="box">
** child 2
some boxed content
** child 2
more boxed content
#+HTML:</div>
** child 3
unboxed content
However, org seems to close the div for me before the ~** child 2~
headline.
Is this the intended behaviour? And if so is there any way for me to do
this?
[-- Attachment #2: Type: text/html, Size: 697 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* allow HTML block to escape from outline-text div? WAS: BUG? unable to surround subtrees with html tag
2021-06-21 19:07 BUG? unable to surround subtrees with html tag Matt Price
@ 2021-06-21 22:01 ` Matt Price
2021-06-22 8:30 ` Richard Lawrence
2021-07-01 16:18 ` Timothy
0 siblings, 2 replies; 6+ messages in thread
From: Matt Price @ 2021-06-21 22:01 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
On Mon, Jun 21, 2021 at 3:07 PM Matt Price <moptop99@gmail.com> wrote:
> I'm using the most recent wip-cite-new branch of org, with a recent emacs
> git (28.0.50).
>
> I would like to be able to surround some portion of a subtree with a tag,
> e.g.:
>
> * parent
> some text
> #+HTML: <div class="box">
> ** child 2
> some boxed content
> ** child 2
> more boxed content
> #+HTML:</div>
> ** child 3
> unboxed content
>
> However, org seems to close the div for me before the ~** child 2~
> headline.
>
> Is this the intended behaviour? And if so is there any way for me to do
> this?
>
Sorry for the noise, I believe this is user error. I misread the exported
source code, and firefox's developer tools added the closing tag for me, so
I kept not seeing my mistake. The error here was not realizing that section
contents get wrapped in their own div with class ~outline-text-N~, so my
~<div class="box">~ resulted in malformed HTML.
I don't know if there is a way to somehow slide my own html in between the
outine-text element and the outline-container element for a child subtree.
If someone knows a way to do this, I'd appreciate a pointer, but for now I
think I have to find another way to accomplish this.
thanks & apologies,
Matt
[-- Attachment #2: Type: text/html, Size: 1875 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: allow HTML block to escape from outline-text div? WAS: BUG? unable to surround subtrees with html tag
2021-06-21 22:01 ` allow HTML block to escape from outline-text div? WAS: " Matt Price
@ 2021-06-22 8:30 ` Richard Lawrence
2021-06-22 16:31 ` Matt Price
2021-07-01 16:18 ` Timothy
1 sibling, 1 reply; 6+ messages in thread
From: Richard Lawrence @ 2021-06-22 8:30 UTC (permalink / raw)
To: Matt Price, Org Mode
Hi Matt,
Matt Price <moptop99@gmail.com> writes:
>> I would like to be able to surround some portion of a subtree with a tag,
>> e.g.:
>>
>> * parent
>> some text
>> #+HTML: <div class="box">
>> ** child 2
>> some boxed content
>> ** child 2
>> more boxed content
>> #+HTML:</div>
>> ** child 3
>> unboxed content
> I don't know if there is a way to somehow slide my own html in between the
> outine-text element and the outline-container element for a child subtree.
> If someone knows a way to do this, I'd appreciate a pointer, but for now I
> think I have to find another way to accomplish this.
Is it important that your two headlines in the boxed content export as <h2>?
If not, you could just use a structure like
* Parent
** Box
*** Boxed Child 1
*** Boxed Child 2
** Unboxed Child
and use something like the ignoreheading filter (see Worg's "Org Hacks"
page) to prevent "Box" from producing a separate header, and maybe
various properties (e.g. UNNUMBERED?) to keep the boxed children from
appearing as part of the main outline.
Otherwise, #+INCLUDE comes to mind as a possible solution.
Would one of those options work for you?
--
Best,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: allow HTML block to escape from outline-text div? WAS: BUG? unable to surround subtrees with html tag
2021-06-22 8:30 ` Richard Lawrence
@ 2021-06-22 16:31 ` Matt Price
0 siblings, 0 replies; 6+ messages in thread
From: Matt Price @ 2021-06-22 16:31 UTC (permalink / raw)
To: Richard Lawrence; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
On Tue., Jun. 22, 2021, 4:30 a.m. Richard Lawrence, <
richard.lawrence@uni-tuebingen.de> wrote:
> Hi Matt,
>
> Matt Price <moptop99@gmail.com> writes:
>
> >> I would like to be able to surround some portion of a subtree with a
> tag,
> >> e.g.:
> >>
> >> * parent
> >> some text
> >> #+HTML: <div class="box">
> >> ** child 2
> >> some boxed content
> >> ** child 2
> >> more boxed content
> >> #+HTML:</div>
> >> ** child 3
> >> unboxed content
>
> > I don't know if there is a way to somehow slide my own html in between
> the
> > outine-text element and the outline-container element for a child
> subtree.
> > If someone knows a way to do this, I'd appreciate a pointer, but for now
> I
> > think I have to find another way to accomplish this.
>
> Is it important that your two headlines in the boxed content export as
> <h2>?
>
> If not, you could just use a structure like
>
> * Parent
> ** Box
> *** Boxed Child 1
> *** Boxed Child 2
> ** Unboxed Child
>
> and use something like the ignoreheading filter (see Worg's "Org Hacks"
> page) to prevent "Box" from producing a separate header, and maybe
> various properties (e.g. UNNUMBERED?) to keep the boxed children from
> appearing as part of the main outline.
>
> Otherwise, #+INCLUDE comes to mind as a possible solution.
>
> Would one of those options work for you?
>
I think the :ignore: hack will not work quite right, but the others I had
not thought of at all, and I will try them out! Thank you,
Matt
>
> --
> Best,
> Richard
>
[-- Attachment #2: Type: text/html, Size: 2428 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: allow HTML block to escape from outline-text div? WAS: BUG? unable to surround subtrees with html tag
2021-06-21 22:01 ` allow HTML block to escape from outline-text div? WAS: " Matt Price
2021-06-22 8:30 ` Richard Lawrence
@ 2021-07-01 16:18 ` Timothy
2021-07-06 3:58 ` Matt Price
1 sibling, 1 reply; 6+ messages in thread
From: Timothy @ 2021-07-01 16:18 UTC (permalink / raw)
To: Matt Price; +Cc: emacs-orgmode
Matt Price <moptop99@gmail.com> writes:
>> I would like to be able to surround some portion of a subtree with a tag,
> Sorry for the noise, I believe this is user error. I misread the exported
> source code, and firefox's developer tools added the closing tag for me, so
> I kept not seeing my mistake. The error here was not realizing that section
> contents get wrapped in their own div with class ~outline-text-N~, so my
> ~<div class="box">~ resulted in malformed HTML.
>
> I don't know if there is a way to somehow slide my own html in between the
> outine-text element and the outline-container element for a child subtree.
> If someone knows a way to do this, I'd appreciate a pointer, but for now I
> think I have to find another way to accomplish this.
As it so happens, this is something which has come up for me too. I
think in the future it could be worth adding a property that can be used
to wrap a section in certain HTML tag(s).
For now though... the best solution would be what Richard suggests.
--
Timothy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: allow HTML block to escape from outline-text div? WAS: BUG? unable to surround subtrees with html tag
2021-07-01 16:18 ` Timothy
@ 2021-07-06 3:58 ` Matt Price
0 siblings, 0 replies; 6+ messages in thread
From: Matt Price @ 2021-07-06 3:58 UTC (permalink / raw)
To: Timothy; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]
On Thu, Jul 1, 2021 at 12:18 PM Timothy <tecosaur@gmail.com> wrote:
>
> Matt Price <moptop99@gmail.com> writes:
>
> >> I would like to be able to surround some portion of a subtree with a
> tag,
>
> > Sorry for the noise, I believe this is user error. I misread the
> exported
> > source code, and firefox's developer tools added the closing tag for me,
> so
> > I kept not seeing my mistake. The error here was not realizing that
> section
> > contents get wrapped in their own div with class ~outline-text-N~, so my
> > ~<div class="box">~ resulted in malformed HTML.
> >
> > I don't know if there is a way to somehow slide my own html in between
> the
> > outine-text element and the outline-container element for a child
> subtree.
> > If someone knows a way to do this, I'd appreciate a pointer, but for now
> I
> > think I have to find another way to accomplish this.
>
> As it so happens, this is something which has come up for me too. I
> think in the future it could be worth adding a property that can be used
> to wrap a section in certain HTML tag(s).
>
I'm dealing with it again tonight, and I do find it a bit teeth-gnashing.
In this case what I'm looking to do is to hide a whole section when the
exported hTML page loads. But right now the subtee children of the
headline remain visible even when the text is hidden.
Whoa! I just realized I can rewrite this myself, since it's a derived
bakend. I guess the export happens from the leafs upwards, so that the
contents are already rendered by the time theadline is being processed. So
in my headline exporter, just had to wrap the contents in an additional
div. It works fine, I feel great about it!
>
> For now though... the best solution would be what Richard suggests.
>
> --
> Timothy
>
[-- Attachment #2: Type: text/html, Size: 2460 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-06 3:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-21 19:07 BUG? unable to surround subtrees with html tag Matt Price
2021-06-21 22:01 ` allow HTML block to escape from outline-text div? WAS: " Matt Price
2021-06-22 8:30 ` Richard Lawrence
2021-06-22 16:31 ` Matt Price
2021-07-01 16:18 ` Timothy
2021-07-06 3:58 ` Matt Price
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).