emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: emacs-orgmode@gnu.org, Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: [bug] org-inlinetask produces invalid xhtml
Date: Wed, 10 Aug 2011 01:47:15 +0200	[thread overview]
Message-ID: <CAMXnza2DbmEcEu4SPU62t+tDkUOJbmVT4SukyuCpRB455Vq+2Q@mail.gmail.com> (raw)
In-Reply-To: <81y5z2p82h.fsf@gmail.com>

Hello Nicolas and Jambu,

On Tue, Aug 9, 2011 at 11:51 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
>> I see. Contents of inline tasks are meant to be interpreted during
>> export. Thus, paragraphs will be marked as <p>, lists as <ul> or
>> whatever...
>>
>> This isn't compatible with the default <pre> tag provided. I can see two
>> possibilities. Come up with a better default value, or provide a way to
>> tell to template that contents will be verbatim (or both).
>>
>> I prefer the first solution, but I can't think of something simple, yet
>> elegant enough, for that value. Do you have any suggestion?
>
> (I am speaking here from purely html/odt perspective)
>
> 1. When org-inlinetask is NOT LOADED, inline tasks are treated as
>   regular headlines and are listified. (The "END" of inlinetask appears
>   as listified headline though)
>
> 2. If inlinetask is LOADED, the exporter could check the headline level
>   against org-inlinetask-min-level and take the following actions:
>
>   - Continue to generate listified entries for inline tasks but
>     surround them with <div class="inlinetask"> ... </div> entries.
>
>   - Strip the "END" list item from being generated

I don't know much html/css but lately I have been fooling around with
export of inlinetasks. I found that for html export having them as a
section with highlighting seemed to serve my purpose well. It seems to
me inline tasks are either used as task reminders in the context of a
larger document or as contextual notes. For either case, it serves the
purpose better if its highlighted or quoted in some coloured box or
something similar.

To achieve this, I modified the default templates for html and latex
export like this:


(html "<div class=\"%s\"><b>%s%s</b><br />%s</div>"
      '("inlinetask"
	(unless
	    (eq todo "")
	  (format "<span class=\"%s %s\">%s%s</span> " class todo todo priority))
	heading content))

;; this requires the todonotes package
(latex "\\todo[inline]{\\textbf{%s %s}\\linebreak{} %s}"
       '((unless
	     (eq todo "")
	   (format "\\textsc{%s%s}" todo priority))
	 heading content))


For html export with the above template one could control the styling by
defining the div.inlinetask class in their custom.css.

To have more control over the styling using multiple css classes, I
tried using HTML_CONTAINER_CLASS with an inline task and altering the
html template to something like this:


(html "<div class=\"%s\"><b>%s%s</b><br />%s</div>"
      '((org-entry-get nil "HTML_CONTAINER_CLASS")
	(unless
	    (eq todo "")
	  (format "<span class=\"%s %s\">%s%s</span> " class todo todo priority))
	heading content))


But that doesn't seem to work at all! I get no errors, just the
inlinetask gets exported with an empty class like this:


<div class=""> ... </div>


Strangely, if I replace the (org-entry-get ..) with (message "bla"), the
exported markup looks something like this:


<div class="bla"> ... </div>


I hope this gives you ideas or scope for improvement for export of
inlinetasks.

-- 
Suvayu

Open source is the future. It sets us free.

  reply	other threads:[~2011-08-09 23:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 16:36 [bug] org-inlinetask produces invalid xhtml Jambunathan K
2011-08-08 16:51 ` Jambunathan K
2011-08-08 18:26   ` Nicolas Goaziou
2011-08-09  5:44     ` Jambunathan K
2011-08-09 11:42       ` Nicolas Goaziou
2011-08-09 21:51         ` Jambunathan K
2011-08-09 23:47           ` suvayu ali [this message]
2011-08-11 10:23           ` Nicolas Goaziou
2011-08-11 11:21             ` Jambunathan K
2011-08-11 11:21             ` Jambunathan K
2011-08-11 12:17               ` Nicolas Goaziou
2011-08-11 20:38             ` Jambunathan K
2011-08-16 19:30               ` Bastien
2011-08-16 19:21             ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMXnza2DbmEcEu4SPU62t+tDkUOJbmVT4SukyuCpRB455Vq+2Q@mail.gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@gmail.com \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).