emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Some css issues in org-export
@ 2009-01-19 12:04 Rustom Mody
  2009-01-19 12:27 ` Giovanni Ridolfi
  0 siblings, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2009-01-19 12:04 UTC (permalink / raw)
  To: emacs-orgmode

When I print (to hardcopy) org documents like
http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php
(but not only this one) from firefox, the lines such as

M-x customize-variable RET org-agenda-custom-commands

viz the lines enclosed in a
<pre class="example">

print with a lot of squares (like unicode when its unprintable)

The same does not happen in IE but there the shading which is given to
such examples is also absent.

It seems to me that something about the default CSS that org is
including is not quite right and this is emerging only when the
browser is used to print.

[I would have tried to debug it but know too little CSS to be able to
make much headway]

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

* Re: Some css issues in org-export
  2009-01-19 12:04 Some css issues in org-export Rustom Mody
@ 2009-01-19 12:27 ` Giovanni Ridolfi
  2009-01-19 12:59   ` Sebastian Rose
  0 siblings, 1 reply; 12+ messages in thread
From: Giovanni Ridolfi @ 2009-01-19 12:27 UTC (permalink / raw)
  To: emacs-orgmode, Rustom Mody

--- Lun 19/1/09, Rustom Mody <rustompmody@gmail.com> ha scritto:
> When I print (to hardcopy) org documents like
> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php
> (but not only this one) from firefox, the lines such as
> 
> M-x customize-variable RET org-agenda-custom-commands
> 
> viz the lines enclosed in a
> <pre class="example">
> 
> print with a lot of squares (like unicode when its
> unprintable)
> 

It does *not* happen here:

FF 3.0.5
Win XP

> The same does not happen in IE but there the shading which
> is given to
> such examples is also absent.

I think it depends on FF settings 
(look at File/Page settings/Print images and backgroung.

HTH

Giovanni

> It seems to me that something about the default CSS that
> org is including is not quite right and this is emerging only when
> the browser is used to print.

I do not think so.




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

* Re: Some css issues in org-export
  2009-01-19 12:27 ` Giovanni Ridolfi
@ 2009-01-19 12:59   ` Sebastian Rose
  2009-01-19 13:57     ` Rustom Mody
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Rose @ 2009-01-19 12:59 UTC (permalink / raw)
  To: giovanni.ridolfi; +Cc: Rustom Mody, emacs-orgmode


Hm - we do not provide a special stylesheet for printing. But since
there is no `@media screen' somewhere in the stylesheet, it should just
work for all medias (and does so here).


But still, in case of interest:
http://www.w3schools.com/CSS/css_mediatypes.asp 


Maybe we should add this line to the very top of the document:

<?xml version="1.0" encoding="utf-8" ?>

where `utf-8' = the real encoding of the file.


Regards,


   Sebastian


Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:
> --- Lun 19/1/09, Rustom Mody <rustompmody@gmail.com> ha scritto:
>> When I print (to hardcopy) org documents like
>> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php
>> (but not only this one) from firefox, the lines such as
>> 
>> M-x customize-variable RET org-agenda-custom-commands
>> 
>> viz the lines enclosed in a
>> <pre class="example">
>> 
>> print with a lot of squares (like unicode when its
>> unprintable)
>> 
>
> It does *not* happen here:
>
> FF 3.0.5
> Win XP
>
>> The same does not happen in IE but there the shading which
>> is given to
>> such examples is also absent.
>
> I think it depends on FF settings 
> (look at File/Page settings/Print images and backgroung.
>
> HTH
>
> Giovanni
>
>> It seems to me that something about the default CSS that
>> org is including is not quite right and this is emerging only when
>> the browser is used to print.
>
> I do not think so.
>
>
>       
>
>
>
> _______________________________________________
> 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

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

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

* Re: Some css issues in org-export
  2009-01-19 12:59   ` Sebastian Rose
@ 2009-01-19 13:57     ` Rustom Mody
  2009-01-19 15:13       ` Sebastian Rose
  0 siblings, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2009-01-19 13:57 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>
> Hm - we do not provide a special stylesheet for printing. But since
<snipped>
>
> Maybe we should add this line to the very top of the document:
>
> <?xml version="1.0" encoding="utf-8" ?>

I tried adding this by hand (using emacs) it made no difference to the printout
The boxes show the digits like this:

0 0
2 0

Also I noticed that emacs shows (Unix) in the modeline but it shows
^Ms at EOLs in the buffer.

I understand too little of unicode etc to even claim that this is
'not-as-it-should-be' -- just mentioning it in case it gives any
clues...

Thanks

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

* Re: Some css issues in org-export
  2009-01-19 13:57     ` Rustom Mody
@ 2009-01-19 15:13       ` Sebastian Rose
  2009-02-02  8:20         ` Rustom Mody
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastian Rose @ 2009-01-19 15:13 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Hi Rustom,


"Rustom Mody" <rustompmody@gmail.com> writes:
> On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>>
>> Hm - we do not provide a special stylesheet for printing. But since
> <snipped>
>>
>> Maybe we should add this line to the very top of the document:
>>
>> <?xml version="1.0" encoding="utf-8" ?>
>
> I tried adding this by hand (using emacs) it made no difference to the printout
> The boxes show the digits like this:
>
> 0 0
> 2 0
>
> Also I noticed that emacs shows (Unix) in the modeline but it shows
> ^Ms at EOLs in the buffer.
>
> I understand too little of unicode etc to even claim that this is
> 'not-as-it-should-be' -- just mentioning it in case it gives any
> clues...


Hmmm. In the modeline I have either an `U' (for utf-8) or `1' or
iso-8859-1 and other single byte encodings. OrgMode seems to set the
charset correctly on export here. If I do a `save file as' in Firefox
and open it in emacs, I see the encoding is exactly what's in the line
with the `charset'.  You should change the `utf-8' to what's in that line
with the `charset':

   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>

in case of
http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php.


If you add the `<?xml....' line, make shure that
   a) the encoding is the same as the one in the `charset' line and
   b) the file is indeed written to disk using that encoding. See
      `C-h k C-x RET f' or ust do `C-x RET f TAB TAB'.



Anyway, I believe it's a question of your browsers configuration since
no one else has that problem.



The line endings have nothing to do with encoding. Their bit-wise
representation is the same for all single byte encodings and utf-8.



Good luck,



-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http:  www.emma-stil.de

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

* Re: Some css issues in org-export
  2009-01-19 15:13       ` Sebastian Rose
@ 2009-02-02  8:20         ` Rustom Mody
  2009-02-02  9:15           ` Sebastian Rose
  2009-02-02  9:33           ` Sebastian Rose
  0 siblings, 2 replies; 12+ messages in thread
From: Rustom Mody @ 2009-02-02  8:20 UTC (permalink / raw)
  To: emacs-orgmode

I tried validating this at http://validator.w3.org/
and its not valid XHTML.

Dont know more HTML to comment :-)


On Mon, Jan 19, 2009 at 8:43 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
> Hi Rustom,
>
>
> "Rustom Mody" <rustompmody@gmail.com> writes:
>> On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>>>
>>> Hm - we do not provide a special stylesheet for printing. But since
>> <snipped>
>>>
>>> Maybe we should add this line to the very top of the document:
>>>
>>> <?xml version="1.0" encoding="utf-8" ?>
>>
>> I tried adding this by hand (using emacs) it made no difference to the printout
>> The boxes show the digits like this:
>>
>> 0 0
>> 2 0
>>
>> Also I noticed that emacs shows (Unix) in the modeline but it shows
>> ^Ms at EOLs in the buffer.
>>
>> I understand too little of unicode etc to even claim that this is
>> 'not-as-it-should-be' -- just mentioning it in case it gives any
>> clues...
>
>
> Hmmm. In the modeline I have either an `U' (for utf-8) or `1' or
> iso-8859-1 and other single byte encodings. OrgMode seems to set the
> charset correctly on export here. If I do a `save file as' in Firefox
> and open it in emacs, I see the encoding is exactly what's in the line
> with the `charset'.  You should change the `utf-8' to what's in that line
> with the `charset':
>
>   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
>
> in case of
> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php.
>
>
> If you add the `<?xml....' line, make shure that
>   a) the encoding is the same as the one in the `charset' line and
>   b) the file is indeed written to disk using that encoding. See
>      `C-h k C-x RET f' or ust do `C-x RET f TAB TAB'.
>
>
>
> Anyway, I believe it's a question of your browsers configuration since
> no one else has that problem.
>
>
>
> The line endings have nothing to do with encoding. Their bit-wise
> representation is the same for all single byte encodings and utf-8.
>
>
>
> Good luck,
>
>
>
> --
> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
> Tel.:  +49 (0)511 - 36 58 472
> Fax:   +49 (0)1805 - 233633 - 11044
> mobil: +49 (0)173 - 83 93 417
> Http:  www.emma-stil.de
>

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

* Re: Some css issues in org-export
  2009-02-02  8:20         ` Rustom Mody
@ 2009-02-02  9:15           ` Sebastian Rose
  2009-02-02  9:33           ` Sebastian Rose
  1 sibling, 0 replies; 12+ messages in thread
From: Sebastian Rose @ 2009-02-02  9:15 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Hi,


Seems there are some regressions/new issues. XHTML-validity is a moving
target and someting to re-work from time to time.

It's actually quite seldom I have these problems with the current
version.


I only found this one on the first glance:

* <div> is _not_ allowed in <p>


=> --->8----------------------------->8----------------------------->8---
  * Produkt Attribute 

    [[file:../img/osCommerce-products-attributes.png]]

    more text

<= ---8<-----------------------------8<-----------------------------8<---

becomes

=> --->8----------------------------->8----------------------------->8---
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1">1 Produkt Attribute </h2>
<div id="text-1">

<p>
<div class="figure">
<p><img src="../img/osCommerce-products-attributes.png"  alt="../img/osCommerce-products-attributes.png" /></p>
</div>
</p>

<= ---8<-----------------------------8<-----------------------------8<---



* Also I found some more, but they where homegrown

    I had this in my configuration file:

    (setq org-link-abbrev-alist
       '(("man"       . "http://localhost/devel/man.php?q=man&what=%s")
         ("info"      . "http://localhost/devel/man.php?q=info&what=%s")
         ("wikipedia-en" . "http://en.wikipedia.org/wiki/%s")))

    Note the ampersands in `man' and `info'! This is no valid XHTML!
    Hence I had to change all apersands to `&amp;' like this:

    (setq org-link-abbrev-alist
       '(("man"       . "http://localhost/devel/man.php?q=man&amp;what=%s")
         ("info"      . "http://localhost/devel/man.php?q=info&amp;what=%s")
         ("wikipedia-en" . "http://en.wikipedia.org/wiki/%s")))





Please post the errors you get here, so we all can hunt them when we
find time for it.

I use http://validator.w3.org/ (press CTRL-SHIFT-A in Firefox to
validate local HTML) and the error messages are quite clear.



Regards,

  Sebastian




Rustom Mody <rustompmody@gmail.com> writes:
> I tried validating this at http://validator.w3.org/
> and its not valid XHTML.
>
> Dont know more HTML to comment :-)
>
>
> On Mon, Jan 19, 2009 at 8:43 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>> Hi Rustom,
>>
>>
>> "Rustom Mody" <rustompmody@gmail.com> writes:
>>> On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>>>>
>>>> Hm - we do not provide a special stylesheet for printing. But since
>>> <snipped>
>>>>
>>>> Maybe we should add this line to the very top of the document:
>>>>
>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>
>>> I tried adding this by hand (using emacs) it made no difference to the printout
>>> The boxes show the digits like this:
>>>
>>> 0 0
>>> 2 0
>>>
>>> Also I noticed that emacs shows (Unix) in the modeline but it shows
>>> ^Ms at EOLs in the buffer.
>>>
>>> I understand too little of unicode etc to even claim that this is
>>> 'not-as-it-should-be' -- just mentioning it in case it gives any
>>> clues...
>>
>>
>> Hmmm. In the modeline I have either an `U' (for utf-8) or `1' or
>> iso-8859-1 and other single byte encodings. OrgMode seems to set the
>> charset correctly on export here. If I do a `save file as' in Firefox
>> and open it in emacs, I see the encoding is exactly what's in the line
>> with the `charset'.  You should change the `utf-8' to what's in that line
>> with the `charset':
>>
>>   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
>>
>> in case of
>> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php.
>>
>>
>> If you add the `<?xml....' line, make shure that
>>   a) the encoding is the same as the one in the `charset' line and
>>   b) the file is indeed written to disk using that encoding. See
>>      `C-h k C-x RET f' or ust do `C-x RET f TAB TAB'.
>>
>>
>>
>> Anyway, I believe it's a question of your browsers configuration since
>> no one else has that problem.
>>
>>
>>
>> The line endings have nothing to do with encoding. Their bit-wise
>> representation is the same for all single byte encodings and utf-8.
>>
>>
>>
>> Good luck,
>>
>>
>>
>> --
>> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
>> Tel.:  +49 (0)511 - 36 58 472
>> Fax:   +49 (0)1805 - 233633 - 11044
>> mobil: +49 (0)173 - 83 93 417
>> Http:  www.emma-stil.de
>>
>
>
> _______________________________________________
> 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
>

--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

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

* Re: Some css issues in org-export
  2009-02-02  8:20         ` Rustom Mody
  2009-02-02  9:15           ` Sebastian Rose
@ 2009-02-02  9:33           ` Sebastian Rose
  2009-02-02 10:02             ` Rustom Mody
  2009-02-02 11:20             ` Carsten Dominik
  1 sibling, 2 replies; 12+ messages in thread
From: Sebastian Rose @ 2009-02-02  9:33 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

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

Hi,



This solves the problem with the <div> inside a <p>. That <div> is only
created when images are included using `org-export-html-format-image'. 






[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 4299 bytes --]

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 760c83f..4f035a4 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -3638,8 +3638,10 @@ lang=\"%s\" xml:lang=\"%s\">
                           (and org-export-html-inline-images (not descp)))
                       (org-file-image-p
                        path org-export-html-inline-image-extensions))
+                       (progn
+                       (org-close-par-maybe)
                  (setq rpl (org-export-html-format-image
-                            (concat type ":" path)))
+                            (concat type ":" path))))
                (setq link (concat type ":" path))
                (setq rpl (concat "<a href=\""
                                  (org-export-html-format-href link)
@@ -3706,7 +3708,9 @@ lang=\"%s\" xml:lang=\"%s\">
                                   (or (eq t org-export-html-inline-images)
                                       (and org-export-html-inline-images
                                            (not descp))))
-                             (org-export-html-format-image thefile)
+                             (progn
+                               (org-close-par-maybe)
+                             (org-export-html-format-image thefile))
                            (concat "<a href=\"" thefile "\"" attr ">"
                                    (org-export-html-format-desc desc)
                                    "</a>")))
</#part>



Regards,



Rustom Mody <rustompmody@gmail.com> writes:
> I tried validating this at http://validator.w3.org/
> and its not valid XHTML.
>
> Dont know more HTML to comment :-)
>
>
> On Mon, Jan 19, 2009 at 8:43 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>> Hi Rustom,
>>
>>
>> "Rustom Mody" <rustompmody@gmail.com> writes:
>>> On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>>>>
>>>> Hm - we do not provide a special stylesheet for printing. But since
>>> <snipped>
>>>>
>>>> Maybe we should add this line to the very top of the document:
>>>>
>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>
>>> I tried adding this by hand (using emacs) it made no difference to the printout
>>> The boxes show the digits like this:
>>>
>>> 0 0
>>> 2 0
>>>
>>> Also I noticed that emacs shows (Unix) in the modeline but it shows
>>> ^Ms at EOLs in the buffer.
>>>
>>> I understand too little of unicode etc to even claim that this is
>>> 'not-as-it-should-be' -- just mentioning it in case it gives any
>>> clues...
>>
>>
>> Hmmm. In the modeline I have either an `U' (for utf-8) or `1' or
>> iso-8859-1 and other single byte encodings. OrgMode seems to set the
>> charset correctly on export here. If I do a `save file as' in Firefox
>> and open it in emacs, I see the encoding is exactly what's in the line
>> with the `charset'.  You should change the `utf-8' to what's in that line
>> with the `charset':
>>
>>   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
>>
>> in case of
>> http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php.
>>
>>
>> If you add the `<?xml....' line, make shure that
>>   a) the encoding is the same as the one in the `charset' line and
>>   b) the file is indeed written to disk using that encoding. See
>>      `C-h k C-x RET f' or ust do `C-x RET f TAB TAB'.
>>
>>
>>
>> Anyway, I believe it's a question of your browsers configuration since
>> no one else has that problem.
>>
>>
>>
>> The line endings have nothing to do with encoding. Their bit-wise
>> representation is the same for all single byte encodings and utf-8.
>>
>>
>>
>> Good luck,
>>
>>
>>
>> --
>> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
>> Tel.:  +49 (0)511 - 36 58 472
>> Fax:   +49 (0)1805 - 233633 - 11044
>> mobil: +49 (0)173 - 83 93 417
>> Http:  www.emma-stil.de
>>
>
>
> _______________________________________________
> 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
>

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http:  www.emma-stil.de

[-- Attachment #3: 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 related	[flat|nested] 12+ messages in thread

* Re: Some css issues in org-export
  2009-02-02  9:33           ` Sebastian Rose
@ 2009-02-02 10:02             ` Rustom Mody
  2009-02-02 11:09               ` Sebastian Rose
  2009-02-02 11:20             ` Carsten Dominik
  1 sibling, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2009-02-02 10:02 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Feb 2, 2009 at 3:03 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
> Hi,
>
>
>
> This solves the problem with the <div> inside a <p>. That <div> is only
> created when images are included using `org-export-html-format-image'.

Does this solve the original problem (unicode boxes on printing?)

There are also errors in the js (see http://www.jslint.com/ )
and css (see http://jigsaw.w3.org/css-validator/)

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

* Re: Some css issues in org-export
  2009-02-02 10:02             ` Rustom Mody
@ 2009-02-02 11:09               ` Sebastian Rose
  0 siblings, 0 replies; 12+ messages in thread
From: Sebastian Rose @ 2009-02-02 11:09 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Rustom Mody <rustompmody@gmail.com> writes:
> On Mon, Feb 2, 2009 at 3:03 PM, Sebastian Rose <sebastian_rose@gmx.de> wrote:
>> Hi,
>>
>>
>>
>> This solves the problem with the <div> inside a <p>. That <div> is only
>> created when images are included using `org-export-html-format-image'.
>
> Does this solve the original problem (unicode boxes on printing?)


I don't think it will. AFAIK, the structure has nothing to do with the
encoding.


Actually, I still have problems to use gnus eficiently. One point is the
threading. That's why I were not aware of the original problem.



Regards,

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http:  www.emma-stil.de

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

* Re: Some css issues in org-export
  2009-02-02  9:33           ` Sebastian Rose
  2009-02-02 10:02             ` Rustom Mody
@ 2009-02-02 11:20             ` Carsten Dominik
  2009-02-02 12:03               ` Sebastian Rose
  1 sibling, 1 reply; 12+ messages in thread
From: Carsten Dominik @ 2009-02-02 11:20 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: Rustom Mody, emacs-orgmode

I have implemented a different fix for the problem Sebastian mentions.
Hopefully it will work correctly, please test.

- Carsten

On Feb 2, 2009, at 10:33 AM, Sebastian Rose wrote:

> Hi,
>
>
>
> This solves the problem with the <div> inside a <p>. That <div> is  
> only
> created when images are included using `org-export-html-format-image'.
>
>
>
>
>
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 760c83f..4f035a4 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -3638,8 +3638,10 @@ lang=\"%s\" xml:lang=\"%s\">
>                           (and org-export-html-inline-images (not  
> descp)))
>                       (org-file-image-p
>                        path org-export-html-inline-image-extensions))
> +                       (progn
> +                       (org-close-par-maybe)
>                  (setq rpl (org-export-html-format-image
> -                            (concat type ":" path)))
> +                            (concat type ":" path))))
>                (setq link (concat type ":" path))
>                (setq rpl (concat "<a href=\""
>                                  (org-export-html-format-href link)
> @@ -3706,7 +3708,9 @@ lang=\"%s\" xml:lang=\"%s\">
>                                   (or (eq t org-export-html-inline- 
> images)
>                                       (and org-export-html-inline- 
> images
>                                            (not descp))))
> -                             (org-export-html-format-image thefile)
> +                             (progn
> +                               (org-close-par-maybe)
> +                             (org-export-html-format-image thefile))
>                            (concat "<a href=\"" thefile "\"" attr ">"
>                                    (org-export-html-format-desc desc)
>                                    "</a>")))
> </#part>
>
>
>
> Regards,
>
>
>
> Rustom Mody <rustompmody@gmail.com> writes:
>> I tried validating this at http://validator.w3.org/
>> and its not valid XHTML.
>>
>> Dont know more HTML to comment :-)
>>
>>
>> On Mon, Jan 19, 2009 at 8:43 PM, Sebastian Rose <sebastian_rose@gmx.de 
>> > wrote:
>>> Hi Rustom,
>>>
>>>
>>> "Rustom Mody" <rustompmody@gmail.com> writes:
>>>> On Mon, Jan 19, 2009 at 6:29 PM, Sebastian Rose <sebastian_rose@gmx.de 
>>>> > wrote:
>>>>>
>>>>> Hm - we do not provide a special stylesheet for printing. But  
>>>>> since
>>>> <snipped>
>>>>>
>>>>> Maybe we should add this line to the very top of the document:
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8" ?>
>>>>
>>>> I tried adding this by hand (using emacs) it made no difference  
>>>> to the printout
>>>> The boxes show the digits like this:
>>>>
>>>> 0 0
>>>> 2 0
>>>>
>>>> Also I noticed that emacs shows (Unix) in the modeline but it shows
>>>> ^Ms at EOLs in the buffer.
>>>>
>>>> I understand too little of unicode etc to even claim that this is
>>>> 'not-as-it-should-be' -- just mentioning it in case it gives any
>>>> clues...
>>>
>>>
>>> Hmmm. In the modeline I have either an `U' (for utf-8) or `1' or
>>> iso-8859-1 and other single byte encodings. OrgMode seems to set the
>>> charset correctly on export here. If I do a `save file as' in  
>>> Firefox
>>> and open it in emacs, I see the encoding is exactly what's in the  
>>> line
>>> with the `charset'.  You should change the `utf-8' to what's in  
>>> that line
>>> with the `charset':
>>>
>>>  <meta http-equiv="Content-Type" content="text/ 
>>> html;charset=iso-8859-1"/>
>>>
>>> in case of
>>> http://orgmode.org/worg/org-tutorials/org-custom-agenda- 
>>> commands.php.
>>>
>>>
>>> If you add the `<?xml....' line, make shure that
>>>  a) the encoding is the same as the one in the `charset' line and
>>>  b) the file is indeed written to disk using that encoding. See
>>>     `C-h k C-x RET f' or ust do `C-x RET f TAB TAB'.
>>>
>>>
>>>
>>> Anyway, I believe it's a question of your browsers configuration  
>>> since
>>> no one else has that problem.
>>>
>>>
>>>
>>> The line endings have nothing to do with encoding. Their bit-wise
>>> representation is the same for all single byte encodings and utf-8.
>>>
>>>
>>>
>>> Good luck,
>>>
>>>
>>>
>>> --
>>> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449  
>>> Hannover
>>> Tel.:  +49 (0)511 - 36 58 472
>>> Fax:   +49 (0)1805 - 233633 - 11044
>>> mobil: +49 (0)173 - 83 93 417
>>> Http:  www.emma-stil.de
>>>
>>
>>
>> _______________________________________________
>> 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
>>
>
> -- 
> Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449  
> Hannover
> Tel.:  +49 (0)511 - 36 58 472
> Fax:   +49 (0)1805 - 233633 - 11044
> mobil: +49 (0)173 - 83 93 417
> Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
> Http:  www.emma-stil.de
> _______________________________________________
> 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] 12+ messages in thread

* Re: Some css issues in org-export
  2009-02-02 11:20             ` Carsten Dominik
@ 2009-02-02 12:03               ` Sebastian Rose
  0 siblings, 0 replies; 12+ messages in thread
From: Sebastian Rose @ 2009-02-02 12:03 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Rustom Mody, emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:
> I have implemented a different fix for the problem Sebastian mentions.
> Hopefully it will work correctly, please test.


Yes does :-)


Thanks Carsten!

-- 
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.:  +49 (0)511 - 36 58 472
Fax:   +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http:  www.emma-stil.de

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

end of thread, other threads:[~2009-02-02 12:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 12:04 Some css issues in org-export Rustom Mody
2009-01-19 12:27 ` Giovanni Ridolfi
2009-01-19 12:59   ` Sebastian Rose
2009-01-19 13:57     ` Rustom Mody
2009-01-19 15:13       ` Sebastian Rose
2009-02-02  8:20         ` Rustom Mody
2009-02-02  9:15           ` Sebastian Rose
2009-02-02  9:33           ` Sebastian Rose
2009-02-02 10:02             ` Rustom Mody
2009-02-02 11:09               ` Sebastian Rose
2009-02-02 11:20             ` Carsten Dominik
2009-02-02 12:03               ` Sebastian Rose

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