emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* annotations (not the remember kind)
@ 2008-05-30 21:31 Adam Spiers
  2008-06-11  5:36 ` Dominik, C.
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Spiers @ 2008-05-30 21:31 UTC (permalink / raw)
  To: org-mode mailing list

I have a straight-forward text document that I would like to export as
HTML, but I would also like to add my own annotations to various bits
of it, so that they end up something like this:

  <div class="myannotation">
    This bit still needs some work.
    <span class="attribution">Adam</span>
  </div>

Is this easily achievable using any existing org functionality?  I
couldn't think of anything obvious other than embedding raw HTML.  It
would be really cool if it could be attained starting from something
like

  * Sample headline.
  ** This is the bit that's going to be annotated
  *** ANNOTATION This bit still needs some work.        :Adam:

or similar.

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

* RE: annotations (not the remember kind)
  2008-05-30 21:31 annotations (not the remember kind) Adam Spiers
@ 2008-06-11  5:36 ` Dominik, C.
  2008-06-11 10:57   ` Adam Spiers
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik, C. @ 2008-06-11  5:36 UTC (permalink / raw)
  To: Adam Spiers, org-mode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1773 bytes --]

Hi Adam.

hmm, I can see nothing that would help you directly with this.

However, there is org-export-preprocess-hook.

This hook runs before the export conversion of a buffer is attempted.
If you add a function to this hook it will be called in a temporary
buffer containing the entire file or section to be exported.
There will be a variable `htmlp' telling you if export
is to HTML, and similarly variables `latexp' and `asciip'.

Your function could go through the buffer, find sections with
the ANNOTATION keyword and/or tags, and convert them to raw
HTML, surrounded by #+BEGIN_HTML ... #+END_HTML

HTH

- Carsten


-----Original Message-----
From: emacs-orgmode-bounces+dominik=science.uva.nl@gnu.org on behalf of Adam Spiers
Sent: Fri 5/30/2008 11:31 PM
To: org-mode mailing list
Subject: [Orgmode] annotations (not the remember kind)
 
I have a straight-forward text document that I would like to export as
HTML, but I would also like to add my own annotations to various bits
of it, so that they end up something like this:

  <div class="myannotation">
    This bit still needs some work.
    <span class="attribution">Adam</span>
  </div>

Is this easily achievable using any existing org functionality?  I
couldn't think of anything obvious other than embedding raw HTML.  It
would be really cool if it could be attained starting from something
like

  * Sample headline.
  ** This is the bit that's going to be annotated
  *** ANNOTATION This bit still needs some work.        :Adam:

or similar.


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 2590 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: annotations (not the remember kind)
  2008-06-11  5:36 ` Dominik, C.
@ 2008-06-11 10:57   ` Adam Spiers
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Spiers @ 2008-06-11 10:57 UTC (permalink / raw)
  To: org-mode mailing list

On Wed, Jun 11, 2008 at 07:36:43AM +0200, Dominik, C. wrote:
> Hi Adam.
> 
> hmm, I can see nothing that would help you directly with this.
> 
> However, there is org-export-preprocess-hook.
> 
> This hook runs before the export conversion of a buffer is attempted.
> If you add a function to this hook it will be called in a temporary
> buffer containing the entire file or section to be exported.
> There will be a variable `htmlp' telling you if export
> is to HTML, and similarly variables `latexp' and `asciip'.
> 
> Your function could go through the buffer, find sections with
> the ANNOTATION keyword and/or tags, and convert them to raw
> HTML, surrounded by #+BEGIN_HTML ... #+END_HTML

Yes, that would do perfectly ... if only I had a headline iteration
API to make it easy to go through the buffer looking for ANNOTATION
keywords ;-)

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

end of thread, other threads:[~2008-06-11 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 21:31 annotations (not the remember kind) Adam Spiers
2008-06-11  5:36 ` Dominik, C.
2008-06-11 10:57   ` Adam Spiers

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