* inlinetask html export template
@ 2011-08-08 7:35 suvayu ali
2011-08-08 8:39 ` Jambunathan K
0 siblings, 1 reply; 5+ messages in thread
From: suvayu ali @ 2011-08-08 7:35 UTC (permalink / raw)
To: org-mode mailing list
Hi,
org exports inlinetasks to HTML as preformatted text, and uses the
style class inlinetask. I wanted to export inlinetasks as a section
("div" ?) but with the same style.
I don't know any HTML, but with some guess work I customised the html
template like this:
(html "<div class=\"inlinetask\"><b>%s%s</b><br />%s</div>"
'((unless (eq todo "")
(format "<span class=\"%s %s\">%s%s</span> " class todo todo priority))
heading content))
This takes care of replacing the preformatted block with a section but
the style isn't applied any more. Any ideas how I can achieve that?
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inlinetask html export template
2011-08-08 7:35 inlinetask html export template suvayu ali
@ 2011-08-08 8:39 ` Jambunathan K
2011-08-08 8:51 ` suvayu ali
0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2011-08-08 8:39 UTC (permalink / raw)
To: suvayu ali; +Cc: org-mode mailing list
suvayu ali <fatkasuvayu+linux@gmail.com> writes:
> Hi,
>
> org exports inlinetasks to HTML as preformatted text, and uses the
> style class inlinetask. I wanted to export inlinetasks as a section
> ("div" ?) but with the same style.
>
> I don't know any HTML, but with some guess work I customised the html
> template like this:
>
>
> (html "<div class=\"inlinetask\"><b>%s%s</b><br />%s</div>"
> '((unless (eq todo "")
> (format "<span class=\"%s %s\">%s%s</span> " class todo todo priority))
> heading content))
>
Put your html file in nxml-mode and do a C-c C-n. You will know the
reason. Basically it produces an invalid xhtml.
--8<---------------cut here---------------start------------->8---
<p>
<span style="text-decoration:underline;">Questions</span>:
<div class="inlinetask"><b>Detector effects</b><br />
</p><ol> ############### PROBLEM HERE
<li>How is the Gaussian used for smearing of proper time resolution
derived? <a href="http://www.google.com">Google</a> this.
</li>
<li>Why is the proper time error PDF needed? Why is
smearing of time resolution not enough?
</li>
</ol>
--8<---------------cut here---------------end--------------->8---
> This takes care of replacing the preformatted block with a section but
> the style isn't applied any more. Any ideas how I can achieve that?
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inlinetask html export template
2011-08-08 8:39 ` Jambunathan K
@ 2011-08-08 8:51 ` suvayu ali
2011-08-08 10:35 ` Jambunathan K
0 siblings, 1 reply; 5+ messages in thread
From: suvayu ali @ 2011-08-08 8:51 UTC (permalink / raw)
To: Jambunathan K; +Cc: org-mode mailing list
Hi Jambu,
On Mon, Aug 8, 2011 at 10:39 AM, Jambunathan K <kjambunathan@gmail.com> wrote:
> Put your html file in nxml-mode and do a C-c C-n. You will know the
> reason. Basically it produces an invalid xhtml.
>
> --8<---------------cut here---------------start------------->8---
> <p>
> <span style="text-decoration:underline;">Questions</span>:
> <div class="inlinetask"><b>Detector effects</b><br />
> </p><ol> ############### PROBLEM HERE
> <li>How is the Gaussian used for smearing of proper time resolution
> derived? <a href="http://www.google.com">Google</a> this.
> </li>
> <li>Why is the proper time error PDF needed? Why is
> smearing of time resolution not enough?
> </li>
> </ol>
> --8<---------------cut here---------------end--------------->8---
>
But fixing that doesn't render the box either.
<p>
<span style="text-decoration:underline;">Questions</span>:
</p>
<div class="inlinetask"><b>Detector effects</b><br />
<ol>
<li>How is the Gaussian used for smearing of proper
time resolution derived?
</li>
<li>Why is the proper time error PDF needed? Why is
smearing of time resolution not enough?
</li>
</ol>
</div>
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inlinetask html export template
2011-08-08 8:51 ` suvayu ali
@ 2011-08-08 10:35 ` Jambunathan K
2011-08-08 11:48 ` suvayu ali
0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2011-08-08 10:35 UTC (permalink / raw)
To: suvayu ali; +Cc: org-mode mailing list
suvayu ali <fatkasuvayu+linux@gmail.com> writes:
> Hi Jambu,
>
> On Mon, Aug 8, 2011 at 10:39 AM, Jambunathan K <kjambunathan@gmail.com> wrote:
>> Put your html file in nxml-mode and do a C-c C-n. You will know the
>> reason. Basically it produces an invalid xhtml.
>>
>> --8<---------------cut here---------------start------------->8---
>> <p>
>> <span style="text-decoration:underline;">Questions</span>:
>> <div class="inlinetask"><b>Detector effects</b><br />
>> </p><ol> ############### PROBLEM HERE
>> <li>How is the Gaussian used for smearing of proper time resolution
>> derived? <a href="http://www.google.com">Google</a> this.
>> </li>
>> <li>Why is the proper time error PDF needed? Why is
>> smearing of time resolution not enough?
>> </li>
>> </ol>
>> --8<---------------cut here---------------end--------------->8---
>>
>
> But fixing that doesn't render the box either.
>
>
> <p>
> <span style="text-decoration:underline;">Questions</span>:
> </p>
>
> <div class="inlinetask"><b>Detector effects</b><br />
> <ol>
> <li>How is the Gaussian used for smearing of proper
> time resolution derived?
> </li>
> <li>Why is the proper time error PDF needed? Why is
> smearing of time resolution not enough?
> </li>
> </ol>
> </div>
May be there is no entry for inlinetask in the default css. For example,
if I add the following to css, I see the entry correctly formatted.
--8<---------------cut here---------------start------------->8---
div.inlinetask {
color: red;
}
--8<---------------cut here---------------end--------------->8---
Btw, you can get the div without any of the xhtml syntactic mess with
the HTML_CONTAINER_CLASS property and a regular outline (instead of a
deeply indented outline)
--8<---------------cut here---------------start------------->8---
** Detector effects :Qn:
:PROPERTIES:
:HTML_CONTAINER_CLASS: inlinetask
:END:
1. How is the Gaussian used for smearing of proper time resolution
derived? [[http://www.google.com][Google]] this.
--8<---------------cut here---------------end--------------->8---
Also note that with org-inlinetask NOT loaded, the headline is formatted
as a list because it is very deep (> H:? entry in #+OPTIONS line)
Jambunathan K.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: inlinetask html export template
2011-08-08 10:35 ` Jambunathan K
@ 2011-08-08 11:48 ` suvayu ali
0 siblings, 0 replies; 5+ messages in thread
From: suvayu ali @ 2011-08-08 11:48 UTC (permalink / raw)
To: Jambunathan K; +Cc: org-mode mailing list
Hi Jambunathan,
On Mon, Aug 8, 2011 at 12:35 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
>
> May be there is no entry for inlinetask in the default css. For example,
> if I add the following to css, I see the entry correctly formatted.
>
[...]
>
> Btw, you can get the div without any of the xhtml syntactic mess with
> the HTML_CONTAINER_CLASS property and a regular outline (instead of a
> deeply indented outline)
>
> --8<---------------cut here---------------start------------->8---
> ** Detector effects :Qn:
> :PROPERTIES:
> :HTML_CONTAINER_CLASS: inlinetask
> :END:
> 1. How is the Gaussian used for smearing of proper time resolution
> derived? [[http://www.google.com][Google]] this.
> --8<---------------cut here---------------end--------------->8---
>
I made a class like this in my custom.css:
div.inlinetask
{
padding:10px;
border:2px solid gray;
margin:10px;
background: WhiteSmoke;
}
Works well. Since I am also using the Worg css, the styling clashes a
little with everything else. Thanks to your pointers, I also found the
styling for "pre" there. I think I can work up a look I am happy with
based on this.
> Also note that with org-inlinetask NOT loaded, the headline is formatted
> as a list because it is very deep (> H:? entry in #+OPTIONS line)
>
Yes, I am aware of that. That is why I load org-inlinetask in my init
file. :) Having org export headlines as deep as an inlinetask (>=15) can
produce really weird section headings. I think it starts becoming weird
at H:4 or 5.
> Jambunathan K.
>
Thank you soo much for the help. :)
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-08-08 11:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-08 7:35 inlinetask html export template suvayu ali
2011-08-08 8:39 ` Jambunathan K
2011-08-08 8:51 ` suvayu ali
2011-08-08 10:35 ` Jambunathan K
2011-08-08 11:48 ` suvayu ali
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).