emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Option for minimalist html file
@ 2012-05-18 17:59 Endak A
  2012-05-19 17:14 ` Ian Barton
  2012-05-22 20:00 ` Endak A
  0 siblings, 2 replies; 5+ messages in thread
From: Endak A @ 2012-05-18 17:59 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

Can there be an option like

#+OPTIONS: html-minimal:t


which does not have 


<script type="text/javascript">
...

</script>

 
<div id="preamble">
...

</div>


<div id="postamble">
...
</div>


or any of the meta tags except :
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

or <div id="content"> and the accompanying </div> but obviously the stuff in-between. 


If I want to, I can insert any of the html code that is missing from the minimalist version that I want using #+HTML: or #+STYLE:


Best wishes,

Enda

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

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

* Re: Option for minimalist html file
  2012-05-18 17:59 Option for minimalist html file Endak A
@ 2012-05-19 17:14 ` Ian Barton
  2012-05-22 20:00 ` Endak A
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Barton @ 2012-05-19 17:14 UTC (permalink / raw)
  To: emacs-orgmode

On 18/05/12 18:59, Endak A wrote:
> Can there be an option like
>
> #+OPTIONS: html-minimal:t
>
> which does not have
>
> <script type="text/javascript">
> ...
> </script>
> <div id="preamble">
> ...
> </div>
>
> <div id="postamble">
> ...
> </div>
>
> or any of the meta tags except :
> <meta http-equiv="Content-Type" content="text/html; " />
>
> or <div id="content"> and the accompanying </div> but obviously the
> stuff in-between.
>
> If I want to, I can insert any of the html code that is missing from the
> minimalist version that I want using #+HTML: or #+STYLE:
>
>

You can achieve this by using the bodyonly option when exporting and the 
putting in the rest your self using #+HTML:

Ian.

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

* Option for minimalist html file
  2012-05-18 17:59 Option for minimalist html file Endak A
  2012-05-19 17:14 ` Ian Barton
@ 2012-05-22 20:00 ` Endak A
  2012-05-22 21:32   ` Nick Dokos
  2012-05-23 11:47   ` Jambunathan K
  1 sibling, 2 replies; 5+ messages in thread
From: Endak A @ 2012-05-22 20:00 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

Can there be an option like


#+OPTIONS: html-minimal:t


which does not have 


<script type="text/javascript">
...

</script>

 
<div id="preamble">
...

</div>


<div id="postamble">
...
</div>


or any of the meta tags except :
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

or <div id="content"> and the accompanying </div> but obviously the stuff in-between. 


If I want to, I can insert any of the html code that is missing from the minimalist version that I want using #+HTML: or #+STYLE:


Best wishes,

Enda

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

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

* Re: Option for minimalist html file
  2012-05-22 20:00 ` Endak A
@ 2012-05-22 21:32   ` Nick Dokos
  2012-05-23 11:47   ` Jambunathan K
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2012-05-22 21:32 UTC (permalink / raw)
  To: Endak A; +Cc: emacs-orgmode@gnu.org

Endak A <enda_k2@yahoo.com> wrote:

> Can there be an option like
> #+OPTIONS: html-minimal:t
> 
> which does not have
> 
> <script type="text/javascript">
> ...
> </script>
>  
> <div id="preamble">
> ...
> </div>
> 
> <div id="postamble">
> ...
> </div>
> 
> or any of the meta tags except :
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> 
> or <div id="content"> and the accompanying </div> but obviously the stuff in-between.
> 
> If I want to, I can insert any of the html code that is missing from the minimalist version that I want using #+HTML: or #+STYLE:
> 

This is the second time you asked this question and Ian Barton has
already provided an answer the first time. Did you see that?

Be that as it may, I have a question to the list re. Ian's response:
afaik, there is no ``bodyonly'' option (at least not in the way that the
OP would have liked it). The only way I know of restricting the output
to body-only is to call the export routine explicitly and pass a t for
the body-only arg, e.g.

--8<---------------cut here---------------start------------->8---
; define a wrapper function
(defun my-org-export-as-html-body-only ()
  (interactive)
  (org-export-as-html nil nil nil nil t nil))

; ... and bind it to some key
(define-key <some-keymap> <some-key> (function my-org-export-as-html-body-only))
--8<---------------cut here---------------end--------------->8---

Am I missing an easier way to do this?

Thanks,
Nick

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

* Re: Option for minimalist html file
  2012-05-22 20:00 ` Endak A
  2012-05-22 21:32   ` Nick Dokos
@ 2012-05-23 11:47   ` Jambunathan K
  1 sibling, 0 replies; 5+ messages in thread
From: Jambunathan K @ 2012-05-23 11:47 UTC (permalink / raw)
  To: Endak A; +Cc: emacs-orgmode@gnu.org

Endak A <enda_k2@yahoo.com> writes:

> Can there be an option like
> #+OPTIONS: html-minimal:t
>
> which does not have
>
> <script type="text/javascript">
> ...
> </script>
>  
> <div id="preamble">
> ...
> </div>
>
> <div id="postamble">
> ...
> </div>
>
> or any of the meta tags except :
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>
> or <div id="content"> and the accompanying </div> but obviously the
> stuff in-between.
>
> If I want to, I can insert any of the html code that is missing from
> the minimalist version that I want using #+HTML: or #+STYLE:

You need to use the new e-html exporter and roll out your own defun for
custom template.


Get the default template function:

M-: (assoc-default 'template org-e-html-translate-alist)
=> org-e-html-template

Replace the default template function with your own:

M-: (setcdr (assoc 'template org-e-html-translate-alist)
            'org-my-e-html-template)

Fill out org-my-e-html-template based on your needs. (Hint: M-x
load-library RET org-e-html and M-x find-function RET
org-e-html-template)

>
>
> Best wishes,
>
> Enda
>
>
>
>

-- 

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

end of thread, other threads:[~2012-05-23 11:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 17:59 Option for minimalist html file Endak A
2012-05-19 17:14 ` Ian Barton
2012-05-22 20:00 ` Endak A
2012-05-22 21:32   ` Nick Dokos
2012-05-23 11:47   ` Jambunathan K

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