emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to remove the automatically generated css codes from exported HTML file?
@ 2008-10-23  4:55 Larry.Liu
  2008-10-23  6:21 ` Manish
  0 siblings, 1 reply; 10+ messages in thread
From: Larry.Liu @ 2008-10-23  4:55 UTC (permalink / raw)
  To: emacs-orgmode


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

 Hi,

I want to remove the css style codes generated automatically by Org-mode in
the exported html file, I have set the variable style for html export and
itself works fine, but the css definition generated by Org-mode
automatically doesn't get removed, and it affects the display of exported
file, how can I remove it?

Thanks :)

-- 
--------------------------------------
Larry.Liu
Mobile: 13911483964
---------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 604 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23  4:55 How to remove the automatically generated css codes from exported HTML file? Larry.Liu
@ 2008-10-23  6:21 ` Manish
  2008-10-23  9:23   ` Larry.Liu
  0 siblings, 1 reply; 10+ messages in thread
From: Manish @ 2008-10-23  6:21 UTC (permalink / raw)
  To: Larry. Liu; +Cc: emacs-orgmode

This thread might help.
http://thread.gmane.org/gmane.emacs.orgmode/7156

On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
>  Hi,
>
> I want to remove the css style codes generated automatically by Org-mode in
> the exported html file, I have set the variable style for html export and
> itself works fine, but the css definition generated by Org-mode
> automatically doesn't get removed, and it affects the display of exported
> file, how can I remove it?
>
> Thanks :)
>
> --
> --------------------------------------
> Larry.Liu
> Mobile: 13911483964
> ---------------------------------------

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

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23  6:21 ` Manish
@ 2008-10-23  9:23   ` Larry.Liu
  2008-10-23  9:45     ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Larry.Liu @ 2008-10-23  9:23 UTC (permalink / raw)
  To: Manish; +Cc: emacs-orgmode


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

Hi,
On Thu, Oct 23, 2008 at 11:51 AM, Manish <mailtomanish.sharma@gmail.com>wrote:

> This thread might help.
> http://thread.gmane.org/gmane.emacs.orgmode/7156


The
variable org-export-html-style-extra works fine, customized css
contents can be added to the html file, but Org-mode will not remove
the automatically generated style codes,
what I am wondering is how can I remove the style part added by Org-mode, it
will append the follow css definition always. I think it is added by the
org-info-js extension, because we can see such name in the style definition
below.

<style type="text/css">
  html { font-family: Times, serif; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color:lightblue; font-weight:normal }
  .target { }
  .timestamp { color: grey }
  .timestamp-kwd { color: CadetBlue }
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }

  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }


</style>

 <http://thread.gmane.org/gmane.emacs.orgmode/7156>
>
> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
> >  Hi,
> >
> > I want to remove the css style codes generated automatically by Org-mode
> in
> > the exported html file, I have set the variable style for html export and
> > itself works fine, but the css definition generated by Org-mode
> > automatically doesn't get removed, and it affects the display of exported
> > file, how can I remove it?
> >
> > Thanks :)
> >
> > --
> > --------------------------------------
> > Larry.Liu
> > Mobile: 13911483964
> > ---------------------------------------
>



-- 
--------------------------------------
Larry.Liu
Mobile: 13911483964
---------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 3429 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23  9:23   ` Larry.Liu
@ 2008-10-23  9:45     ` Carsten Dominik
  2008-10-23 10:48       ` Leo
  2008-10-23 13:16       ` Bernt Hansen
  0 siblings, 2 replies; 10+ messages in thread
From: Carsten Dominik @ 2008-10-23  9:45 UTC (permalink / raw)
  To: Larry.Liu; +Cc: emacs-orgmode


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


If you must,

    (setq org-export-html-style-default "")

But I would recommend to simply overwrite everything you need with  
your own style.

- Carsten

On Oct 23, 2008, at 11:23 AM, Larry.Liu wrote:

> Hi,
>
> On Thu, Oct 23, 2008 at 11:51 AM, Manish <mailtomanish.sharma@gmail.com 
> > wrote:
> This thread might help.
> http://thread.gmane.org/gmane.emacs.orgmode/7156
>
> The variable org-export-html-style-extra works fine, customized css  
> contents can be added to the html file, but Org-mode will not remove  
> the automatically generated style codes, what I am wondering is how  
> can I remove the style part added by Org-mode, it will append the  
> follow css definition always. I think it is added by the org-info-js  
> extension, because we can see such name in the style definition below.
> <style type="text/css">
>   html { font-family: Times, serif; font-size: 12pt; }
>
>   .title  { text-align: center; }
>   .todo   { color: red; }
>   .done   { color: green; }
>   .tag    { background-color:lightblue; font-weight:normal }
>   .target { }
>   .timestamp { color: grey }
>   .timestamp-kwd { color: CadetBlue }
>
>   p.verse { margin-left: 3% }
>   pre {
> 	border: 1pt solid #AEBDCC;
> 	background-color: #F3F5F7;
> 	padding: 5pt;
> 	font-family: courier, monospace;
>         font-size: 90%;
>         overflow:auto;
>   }
>
>   table { border-collapse: collapse; }
>   td, th { vertical-align: top; }
>   dt { font-weight: bold; }
>
>   .org-info-js_info-navigation { border-style:none; }
>   #org-info-js_console-label { font-size:10px; font-weight:bold;
>
>                                white-space:nowrap; }
>   .org-info-js_search-highlight {background-color:#ffff00;  
> color:#000000;
>                                  font-weight:bold; }
>
>
> </style>
>
>
> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
> >  Hi,
> >
> > I want to remove the css style codes generated automatically by  
> Org-mode in
> > the exported html file, I have set the variable style for html  
> export and
> > itself works fine, but the css definition generated by Org-mode
> > automatically doesn't get removed, and it affects the display of  
> exported
> > file, how can I remove it?
> >
> > Thanks :)
> >
> > --
> > --------------------------------------
> > Larry.Liu
> > Mobile: 13911483964
> > ---------------------------------------
>
>
>
> -- 
> --------------------------------------
> Larry.Liu
> Mobile: 13911483964
> ---------------------------------------
> _______________________________________________
> 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: 4231 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23  9:45     ` Carsten Dominik
@ 2008-10-23 10:48       ` Leo
  2008-10-23 11:37         ` Larry.Liu
  2008-10-23 13:16       ` Bernt Hansen
  1 sibling, 1 reply; 10+ messages in thread
From: Leo @ 2008-10-23 10:48 UTC (permalink / raw)
  To: emacs-orgmode

On 2008-10-23 10:45 +0100, Carsten Dominik wrote:
> If you must,
>
>    (setq org-export-html-style-default "")
>
> But I would recommend to simply overwrite everything you need with
> your own style.
>
> - Carsten

Maybe the export facilities can benefit from using some kind of template
engine, allowing people to design templates for different export
formats. And then we can add a per file setting to choose which template
to use, or even by setting a directory-local variable for all files in a
'project'.

,----[ Directory-local variables ]
| ** Directory-local variables can now be defined.
| By default, Emacs looks in .dir-settings.el for directory-local
| variables.  For more information, see `set-directory-project' and
| `define-project-bindings'.
`----

Here 'template' I mean file template like those in openoffice.

Cheers,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

        Use the better alternative -- http://www.openoffice.org/

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

* Re: Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23 10:48       ` Leo
@ 2008-10-23 11:37         ` Larry.Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Larry.Liu @ 2008-10-23 11:37 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode


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

I think template is a great idea, and I think, if we can add separate or
unique id to each separate part of the exported html file, then the display
and structure of that html file can totally be controlled by the css file,
so maybe there are two choice

1.  Assign unique id to more elements in the exported html file, currently,
some elements has no id, only surrond by <p> and </p> so actually user can
not do a special display control for this part,  by add a unique id, user
can use css to control the display of more elements.

2. Add the support of template.

What do you think?

On Thu, Oct 23, 2008 at 4:18 PM, Leo <sdl.web@gmail.com> wrote:

> On 2008-10-23 10:45 +0100, Carsten Dominik wrote:
> > If you must,
> >
> >    (setq org-export-html-style-default "")
> >
> > But I would recommend to simply overwrite everything you need with
> > your own style.
> >
> > - Carsten
>
> Maybe the export facilities can benefit from using some kind of template
> engine, allowing people to design templates for different export
> formats. And then we can add a per file setting to choose which template
> to use, or even by setting a directory-local variable for all files in a
> 'project'.
>
> ,----[ Directory-local variables ]
> | ** Directory-local variables can now be defined.
> | By default, Emacs looks in .dir-settings.el for directory-local
> | variables.  For more information, see `set-directory-project' and
> | `define-project-bindings'.
> `----
>
> Here 'template' I mean file template like those in openoffice.
>
> Cheers,
> --
> .:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.
>
>        Use the better alternative -- http://www.openoffice.org/
>
>
>
> _______________________________________________
> 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
>



-- 
--------------------------------------
Larry.Liu
Mobile: 13911483964
---------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 2993 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23  9:45     ` Carsten Dominik
  2008-10-23 10:48       ` Leo
@ 2008-10-23 13:16       ` Bernt Hansen
  2008-10-28 15:40         ` Carsten Dominik
  1 sibling, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2008-10-23 13:16 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

All of my projects have their own CSS style sheets.  I override the
style variable in a custom function to export my project.

If I'm working on an org file that is part of a project I export by
hitting C-s-f12 which saves the current document and then exports it.

,----[ part of my .emacs ]
| (global-set-key (kbd "C-s-<f12>") 'my-save-then-publish)
| 
| (defun my-save-then-publish ()
|   (interactive)
|   (save-buffer)
|   (org-save-all-org-buffers)
|   (let (org-export-html-style-default)
|     (setq org-export-html-style-default "")
|     (org-publish-current-project)))
`----

All of my projects specify their own CSS files and it saves bandwidth to
not have the CSS included in the page itself - especially if we're
overriding all of the values anyway.

Maybe org-publish-current-project should set
org-export-html-style-default to an empty string if the project
specifies a :style option already?  (i.e. if there is a :style element
in the org-publish-project-alist for the project being exported.  It's
trivial to provide the default style values in the CSS file once and
then every page you download doesn't need to send it to the client
browser)

If I export manually with C-c C-e H I get the default HTML included -
but if I export my project which uses the CSS style sheets no extra
style information is included in the generated HTML files.

This setup works great for me.

-Bernt


Carsten Dominik <dominik@uva.nl> writes:

> If you must,
>
>    (setq org-export-html-style-default "")
>
> But I would recommend to simply overwrite everything you need with
> your own style.
>
> - Carsten
>
> On Oct 23, 2008, at 11:23 AM, Larry.Liu wrote:
>
>> Hi,
>>
>> On Thu, Oct 23, 2008 at 11:51 AM, Manish
>> <mailtomanish.sharma@gmail.com > wrote:
>> This thread might help.
>> http://thread.gmane.org/gmane.emacs.orgmode/7156
>>
>> The variable org-export-html-style-extra works fine, customized css
>> contents can be added to the html file, but Org-mode will not remove
>> the automatically generated style codes, what I am wondering is how
>> can I remove the style part added by Org-mode, it will append the
>> follow css definition always. I think it is added by the org-info-js
>> extension, because we can see such name in the style definition
>> below.
>> <style type="text/css">
>>   html { font-family: Times, serif; font-size: 12pt; }
>>
>>   .title  { text-align: center; }
>>   .todo   { color: red; }
>>   .done   { color: green; }
>>   .tag    { background-color:lightblue; font-weight:normal }
>>   .target { }
>>   .timestamp { color: grey }
>>   .timestamp-kwd { color: CadetBlue }
>>
>>   p.verse { margin-left: 3% }
>>   pre {
>> 	border: 1pt solid #AEBDCC;
>> 	background-color: #F3F5F7;
>> 	padding: 5pt;
>> 	font-family: courier, monospace;
>>         font-size: 90%;
>>         overflow:auto;
>>   }
>>
>>   table { border-collapse: collapse; }
>>   td, th { vertical-align: top; }
>>   dt { font-weight: bold; }
>>
>>   .org-info-js_info-navigation { border-style:none; }
>>   #org-info-js_console-label { font-size:10px; font-weight:bold;
>>
>>                                white-space:nowrap; }
>>   .org-info-js_search-highlight {background-color:#ffff00;
>> color:#000000;
>>                                  font-weight:bold; }
>>
>>
>> </style>
>>
>>
>> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
>> >  Hi,
>> >
>> > I want to remove the css style codes generated automatically by
>> Org-mode in
>> > the exported html file, I have set the variable style for html
>> export and
>> > itself works fine, but the css definition generated by Org-mode
>> > automatically doesn't get removed, and it affects the display of
>> exported
>> > file, how can I remove it?
>> >
>> > Thanks :)
>> >
>> > --
>> > --------------------------------------
>> > Larry.Liu
>> > Mobile: 13911483964
>> > ---------------------------------------
>>
>>
>>
>> -- 
>> --------------------------------------
>> Larry.Liu
>> Mobile: 13911483964
>> ---------------------------------------
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-23 13:16       ` Bernt Hansen
@ 2008-10-28 15:40         ` Carsten Dominik
  2008-10-28 15:43           ` Bernt Hansen
  2008-11-05  5:58           ` Larry.Liu
  0 siblings, 2 replies; 10+ messages in thread
From: Carsten Dominik @ 2008-10-28 15:40 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hi,

A different and maybe slightly more convenient way is now implemented:

There is a new variable `org-export-html-style-include-default'.   
Turning it off
will exclude the default style.  This variable is tied to the :style- 
include-default
property for publishing, so it can be used as a publishing parameter.

- Carsten

On Oct 23, 2008, at 3:16 PM, Bernt Hansen wrote:

> All of my projects have their own CSS style sheets.  I override the
> style variable in a custom function to export my project.
>
> If I'm working on an org file that is part of a project I export by
> hitting C-s-f12 which saves the current document and then exports it.
>
> ,----[ part of my .emacs ]
> | (global-set-key (kbd "C-s-<f12>") 'my-save-then-publish)
> |
> | (defun my-save-then-publish ()
> |   (interactive)
> |   (save-buffer)
> |   (org-save-all-org-buffers)
> |   (let (org-export-html-style-default)
> |     (setq org-export-html-style-default "")
> |     (org-publish-current-project)))
> `----
>
> All of my projects specify their own CSS files and it saves  
> bandwidth to
> not have the CSS included in the page itself - especially if we're
> overriding all of the values anyway.
>
> Maybe org-publish-current-project should set
> org-export-html-style-default to an empty string if the project
> specifies a :style option already?  (i.e. if there is a :style element
> in the org-publish-project-alist for the project being exported.  It's
> trivial to provide the default style values in the CSS file once and
> then every page you download doesn't need to send it to the client
> browser)
>
> If I export manually with C-c C-e H I get the default HTML included -
> but if I export my project which uses the CSS style sheets no extra
> style information is included in the generated HTML files.
>
> This setup works great for me.
>
> -Bernt
>
>
> Carsten Dominik <dominik@uva.nl> writes:
>
>> If you must,
>>
>>   (setq org-export-html-style-default "")
>>
>> But I would recommend to simply overwrite everything you need with
>> your own style.
>>
>> - Carsten
>>
>> On Oct 23, 2008, at 11:23 AM, Larry.Liu wrote:
>>
>>> Hi,
>>>
>>> On Thu, Oct 23, 2008 at 11:51 AM, Manish
>>> <mailtomanish.sharma@gmail.com > wrote:
>>> This thread might help.
>>> http://thread.gmane.org/gmane.emacs.orgmode/7156
>>>
>>> The variable org-export-html-style-extra works fine, customized css
>>> contents can be added to the html file, but Org-mode will not remove
>>> the automatically generated style codes, what I am wondering is how
>>> can I remove the style part added by Org-mode, it will append the
>>> follow css definition always. I think it is added by the org-info-js
>>> extension, because we can see such name in the style definition
>>> below.
>>> <style type="text/css">
>>>  html { font-family: Times, serif; font-size: 12pt; }
>>>
>>>  .title  { text-align: center; }
>>>  .todo   { color: red; }
>>>  .done   { color: green; }
>>>  .tag    { background-color:lightblue; font-weight:normal }
>>>  .target { }
>>>  .timestamp { color: grey }
>>>  .timestamp-kwd { color: CadetBlue }
>>>
>>>  p.verse { margin-left: 3% }
>>>  pre {
>>> 	border: 1pt solid #AEBDCC;
>>> 	background-color: #F3F5F7;
>>> 	padding: 5pt;
>>> 	font-family: courier, monospace;
>>>        font-size: 90%;
>>>        overflow:auto;
>>>  }
>>>
>>>  table { border-collapse: collapse; }
>>>  td, th { vertical-align: top; }
>>>  dt { font-weight: bold; }
>>>
>>>  .org-info-js_info-navigation { border-style:none; }
>>>  #org-info-js_console-label { font-size:10px; font-weight:bold;
>>>
>>>                               white-space:nowrap; }
>>>  .org-info-js_search-highlight {background-color:#ffff00;
>>> color:#000000;
>>>                                 font-weight:bold; }
>>>
>>>
>>> </style>
>>>
>>>
>>> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
>>>> Hi,
>>>>
>>>> I want to remove the css style codes generated automatically by
>>> Org-mode in
>>>> the exported html file, I have set the variable style for html
>>> export and
>>>> itself works fine, but the css definition generated by Org-mode
>>>> automatically doesn't get removed, and it affects the display of
>>> exported
>>>> file, how can I remove it?
>>>>
>>>> Thanks :)
>>>>
>>>> --
>>>> --------------------------------------
>>>> Larry.Liu
>>>> Mobile: 13911483964
>>>> ---------------------------------------
>>>
>>>
>>>
>>> -- 
>>> --------------------------------------
>>> Larry.Liu
>>> Mobile: 13911483964
>>> ---------------------------------------
>>> _______________________________________________
>>> 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
>>
>>
>> _______________________________________________
>> 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-28 15:40         ` Carsten Dominik
@ 2008-10-28 15:43           ` Bernt Hansen
  2008-11-05  5:58           ` Larry.Liu
  1 sibling, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2008-10-28 15:43 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Thanks :)

Carsten Dominik <dominik@science.uva.nl> writes:

> Hi,
>
> A different and maybe slightly more convenient way is now implemented:
>
> There is a new variable `org-export-html-style-include-default'.
> Turning it off
> will exclude the default style.  This variable is tied to the :style- 
> include-default
> property for publishing, so it can be used as a publishing parameter.
>
> - Carsten
>
> On Oct 23, 2008, at 3:16 PM, Bernt Hansen wrote:
>
>> All of my projects have their own CSS style sheets.  I override the
>> style variable in a custom function to export my project.
>>
>> If I'm working on an org file that is part of a project I export by
>> hitting C-s-f12 which saves the current document and then exports it.
>>
>> ,----[ part of my .emacs ]
>> | (global-set-key (kbd "C-s-<f12>") 'my-save-then-publish)
>> |
>> | (defun my-save-then-publish ()
>> |   (interactive)
>> |   (save-buffer)
>> |   (org-save-all-org-buffers)
>> |   (let (org-export-html-style-default)
>> |     (setq org-export-html-style-default "")
>> |     (org-publish-current-project)))
>> `----
>>
>> All of my projects specify their own CSS files and it saves
>> bandwidth to
>> not have the CSS included in the page itself - especially if we're
>> overriding all of the values anyway.
>>
>> Maybe org-publish-current-project should set
>> org-export-html-style-default to an empty string if the project
>> specifies a :style option already?  (i.e. if there is a :style element
>> in the org-publish-project-alist for the project being exported.  It's
>> trivial to provide the default style values in the CSS file once and
>> then every page you download doesn't need to send it to the client
>> browser)
>>
>> If I export manually with C-c C-e H I get the default HTML included -
>> but if I export my project which uses the CSS style sheets no extra
>> style information is included in the generated HTML files.
>>
>> This setup works great for me.
>>
>> -Bernt
>>
>>
>> Carsten Dominik <dominik@uva.nl> writes:
>>
>>> If you must,
>>>
>>>   (setq org-export-html-style-default "")
>>>
>>> But I would recommend to simply overwrite everything you need with
>>> your own style.
>>>
>>> - Carsten
>>>
>>> On Oct 23, 2008, at 11:23 AM, Larry.Liu wrote:
>>>
>>>> Hi,
>>>>
>>>> On Thu, Oct 23, 2008 at 11:51 AM, Manish
>>>> <mailtomanish.sharma@gmail.com > wrote:
>>>> This thread might help.
>>>> http://thread.gmane.org/gmane.emacs.orgmode/7156
>>>>
>>>> The variable org-export-html-style-extra works fine, customized css
>>>> contents can be added to the html file, but Org-mode will not remove
>>>> the automatically generated style codes, what I am wondering is how
>>>> can I remove the style part added by Org-mode, it will append the
>>>> follow css definition always. I think it is added by the org-info-js
>>>> extension, because we can see such name in the style definition
>>>> below.
>>>> <style type="text/css">
>>>>  html { font-family: Times, serif; font-size: 12pt; }
>>>>
>>>>  .title  { text-align: center; }
>>>>  .todo   { color: red; }
>>>>  .done   { color: green; }
>>>>  .tag    { background-color:lightblue; font-weight:normal }
>>>>  .target { }
>>>>  .timestamp { color: grey }
>>>>  .timestamp-kwd { color: CadetBlue }
>>>>
>>>>  p.verse { margin-left: 3% }
>>>>  pre {
>>>> 	border: 1pt solid #AEBDCC;
>>>> 	background-color: #F3F5F7;
>>>> 	padding: 5pt;
>>>> 	font-family: courier, monospace;
>>>>        font-size: 90%;
>>>>        overflow:auto;
>>>>  }
>>>>
>>>>  table { border-collapse: collapse; }
>>>>  td, th { vertical-align: top; }
>>>>  dt { font-weight: bold; }
>>>>
>>>>  .org-info-js_info-navigation { border-style:none; }
>>>>  #org-info-js_console-label { font-size:10px; font-weight:bold;
>>>>
>>>>                               white-space:nowrap; }
>>>>  .org-info-js_search-highlight {background-color:#ffff00;
>>>> color:#000000;
>>>>                                 font-weight:bold; }
>>>>
>>>>
>>>> </style>
>>>>
>>>>
>>>> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
>>>>> Hi,
>>>>>
>>>>> I want to remove the css style codes generated automatically by
>>>> Org-mode in
>>>>> the exported html file, I have set the variable style for html
>>>> export and
>>>>> itself works fine, but the css definition generated by Org-mode
>>>>> automatically doesn't get removed, and it affects the display of
>>>> exported
>>>>> file, how can I remove it?
>>>>>
>>>>> Thanks :)
>>>>>
>>>>> --
>>>>> --------------------------------------
>>>>> Larry.Liu
>>>>> Mobile: 13911483964
>>>>> ---------------------------------------
>>>>
>>>>
>>>>
>>>> -- 
>>>> --------------------------------------
>>>> Larry.Liu
>>>> Mobile: 13911483964
>>>> ---------------------------------------
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>> _______________________________________________
>>> 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] 10+ messages in thread

* Re: How to remove the automatically generated css codes from exported HTML file?
  2008-10-28 15:40         ` Carsten Dominik
  2008-10-28 15:43           ` Bernt Hansen
@ 2008-11-05  5:58           ` Larry.Liu
  1 sibling, 0 replies; 10+ messages in thread
From: Larry.Liu @ 2008-11-05  5:58 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bernt Hansen, emacs-orgmode


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

Thank you very much:)

On Tue, Oct 28, 2008 at 11:40 PM, Carsten Dominik <dominik@science.uva.nl>wrote:

> Hi,
>
> A different and maybe slightly more convenient way is now implemented:
>
> There is a new variable `org-export-html-style-include-default'.  Turning
> it off
> will exclude the default style.  This variable is tied to the
> :style-include-default
> property for publishing, so it can be used as a publishing parameter.
>
> - Carsten
>
>
> On Oct 23, 2008, at 3:16 PM, Bernt Hansen wrote:
>
>  All of my projects have their own CSS style sheets.  I override the
>> style variable in a custom function to export my project.
>>
>> If I'm working on an org file that is part of a project I export by
>> hitting C-s-f12 which saves the current document and then exports it.
>>
>> ,----[ part of my .emacs ]
>> | (global-set-key (kbd "C-s-<f12>") 'my-save-then-publish)
>> |
>> | (defun my-save-then-publish ()
>> |   (interactive)
>> |   (save-buffer)
>> |   (org-save-all-org-buffers)
>> |   (let (org-export-html-style-default)
>> |     (setq org-export-html-style-default "")
>> |     (org-publish-current-project)))
>> `----
>>
>> All of my projects specify their own CSS files and it saves bandwidth to
>> not have the CSS included in the page itself - especially if we're
>> overriding all of the values anyway.
>>
>> Maybe org-publish-current-project should set
>> org-export-html-style-default to an empty string if the project
>> specifies a :style option already?  (i.e. if there is a :style element
>> in the org-publish-project-alist for the project being exported.  It's
>> trivial to provide the default style values in the CSS file once and
>> then every page you download doesn't need to send it to the client
>> browser)
>>
>> If I export manually with C-c C-e H I get the default HTML included -
>> but if I export my project which uses the CSS style sheets no extra
>> style information is included in the generated HTML files.
>>
>> This setup works great for me.
>>
>> -Bernt
>>
>>
>> Carsten Dominik <dominik@uva.nl> writes:
>>
>>  If you must,
>>>
>>>  (setq org-export-html-style-default "")
>>>
>>> But I would recommend to simply overwrite everything you need with
>>> your own style.
>>>
>>> - Carsten
>>>
>>> On Oct 23, 2008, at 11:23 AM, Larry.Liu wrote:
>>>
>>>  Hi,
>>>>
>>>> On Thu, Oct 23, 2008 at 11:51 AM, Manish
>>>> <mailtomanish.sharma@gmail.com > wrote:
>>>> This thread might help.
>>>> http://thread.gmane.org/gmane.emacs.orgmode/7156
>>>>
>>>> The variable org-export-html-style-extra works fine, customized css
>>>> contents can be added to the html file, but Org-mode will not remove
>>>> the automatically generated style codes, what I am wondering is how
>>>> can I remove the style part added by Org-mode, it will append the
>>>> follow css definition always. I think it is added by the org-info-js
>>>> extension, because we can see such name in the style definition
>>>> below.
>>>> <style type="text/css">
>>>>  html { font-family: Times, serif; font-size: 12pt; }
>>>>
>>>>  .title  { text-align: center; }
>>>>  .todo   { color: red; }
>>>>  .done   { color: green; }
>>>>  .tag    { background-color:lightblue; font-weight:normal }
>>>>  .target { }
>>>>  .timestamp { color: grey }
>>>>  .timestamp-kwd { color: CadetBlue }
>>>>
>>>>  p.verse { margin-left: 3% }
>>>>  pre {
>>>>        border: 1pt solid #AEBDCC;
>>>>        background-color: #F3F5F7;
>>>>        padding: 5pt;
>>>>        font-family: courier, monospace;
>>>>       font-size: 90%;
>>>>       overflow:auto;
>>>>  }
>>>>
>>>>  table { border-collapse: collapse; }
>>>>  td, th { vertical-align: top; }
>>>>  dt { font-weight: bold; }
>>>>
>>>>  .org-info-js_info-navigation { border-style:none; }
>>>>  #org-info-js_console-label { font-size:10px; font-weight:bold;
>>>>
>>>>                              white-space:nowrap; }
>>>>  .org-info-js_search-highlight {background-color:#ffff00;
>>>> color:#000000;
>>>>                                font-weight:bold; }
>>>>
>>>>
>>>> </style>
>>>>
>>>>
>>>> On Thu, Oct 23, 2008 at 10:25 AM, Larry. Liu wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I want to remove the css style codes generated automatically by
>>>>>
>>>> Org-mode in
>>>>
>>>>> the exported html file, I have set the variable style for html
>>>>>
>>>> export and
>>>>
>>>>> itself works fine, but the css definition generated by Org-mode
>>>>> automatically doesn't get removed, and it affects the display of
>>>>>
>>>> exported
>>>>
>>>>> file, how can I remove it?
>>>>>
>>>>> Thanks :)
>>>>>
>>>>> --
>>>>> --------------------------------------
>>>>> Larry.Liu
>>>>> Mobile: 13911483964
>>>>> ---------------------------------------
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> --------------------------------------
>>>> Larry.Liu
>>>> Mobile: 13911483964
>>>> ---------------------------------------
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>


-- 
Regards

Larry/Xiangqian.liu

[-- Attachment #1.2: Type: text/html, Size: 7498 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] 10+ messages in thread

end of thread, other threads:[~2008-11-05  5:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23  4:55 How to remove the automatically generated css codes from exported HTML file? Larry.Liu
2008-10-23  6:21 ` Manish
2008-10-23  9:23   ` Larry.Liu
2008-10-23  9:45     ` Carsten Dominik
2008-10-23 10:48       ` Leo
2008-10-23 11:37         ` Larry.Liu
2008-10-23 13:16       ` Bernt Hansen
2008-10-28 15:40         ` Carsten Dominik
2008-10-28 15:43           ` Bernt Hansen
2008-11-05  5:58           ` Larry.Liu

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