Re: [O] html5 generation minor bug

2014-01-08 Thread Bastien
Rick Frankel  writes:

> Changing the default to nil, would fix the issue with html5 without, i
> believe, having any negative effect on (x)html4 output.
>
> Agreed?

Agreed, let's make this change in master, since it's not really a
bugfix.

Thanks!

-- 
 Bastien



Re: [O] html5 generation minor bug

2014-01-08 Thread Rick Frankel

Bastien-

On 2014-01-04 09:36, Bastien wrote:

I will look at making this the default when i have time if the doctype
is html5 (`org-html-html5-p' is true), but it requires some work to
get the info structure passed down to `org-html--anchor'.

Sure -- please let us know when you have more time for this,
I'll not touch anything in this area.


Re-visiting this, it seems to me that there is really --- with current
browsers --- no reason to default to having both a name and id
attribute on anchors (`org-html-allow-name-attribute-in-anchors' t).

Having both is a throwback to early browsers (ie6 anyone :) that
wouldn't recognize the id attribute on anchors.

Changing the default to nil, would fix the issue with html5 without, i
believe, having any negative effect on (x)html4 output.

Agreed?

rick



Re: [O] html5 generation minor bug

2014-01-04 Thread Bastien
Hi Rick,

Rick Frankel  writes:

> Bastien-
>
> I will look at making this the default when i have time if the doctype
> is html5 (`org-html-html5-p' is true), but it requires some work to
> get the info structure passed down to `org-html--anchor'.

Sure -- please let us know when you have more time for this,
I'll not touch anything in this area.

Best,

-- 
 Bastien



Re: [O] html5 generation minor bug

2013-12-27 Thread Rustom Mody
On Fri, Dec 27, 2013 at 10:53 PM, Bastien  wrote:
> Hi Rustom,
>
> Rustom Mody  writes:
>
>> When the html-doctype is set to html5 the generator still generates
>> name attributes in links which is not correct html5
>> http://dev.w3.org/html5/markup/a.html#a-constraints
>
> Can you give an example of what it does and what it should do?

Heres an org-file:
--
#+TITLE: Quotes and References
#+OPTIONS: toc:nil
* Soul
:PROPERTIES:
:CUSTOM_ID: soul
:END:
Nobel prize winner Wislawa Szymborska's poem on
[[http://www.poemhunter.com/poem/a-few-words-on-the-soul/][the soul]]
is a
poet's way of showing how dualistic our habitual thinking is
--
This is as far as I can see the offending line produced by html generation
--
1 Soul
--
You can check for yourself
Generate the html yourself and use the validator here
http://validator.w3.org/check

Note 1. there are warnings, not errors
Note 2. Ive just cut out one sample from a file of mine. I could cut
down further

emacs version 24.3.1
org-version 8.2.4

emacs started with -Q
org put into path
then execute
(setq org-html-doctype "html5")

[On another note choosing xhtml doctype in 2013 seems a strange
default given that xhtml is one of those standards that 'never
happened'
http://news.cnet.com/8301-17939_109-10281477-2.html
Of course I need to add the disclaimer that I know too little to
distinguish hype from fact in web matters]

Regards
Rusi

-- 
http://www.the-magus.in
http://blog.languager.org



Re: [O] html5 generation minor bug

2013-12-27 Thread Rick Frankel

On 2013-12-27 12:23, Bastien wrote:

Rustom Mody  writes:

When the html-doctype is set to html5 the generator still generates
name attributes in links which is not correct html5
http://dev.w3.org/html5/markup/a.html#a-constraints

Can you give an example of what it does and what it should do?


Rustom is referring to the fact that the `name' attribute has been
marked obsolete in HTML5.

While the html5 spec suggests using the id attribute on a surrounding
container rather than a named anchor, the id attribute is still valid
on an anchor in html5.

In fact, ox-html already has support for handling the issue:

(defcustom org-html-allow-name-attribute-in-anchors t
"When nil, do not set \"name\" attribute in anchors.
By default, anchors are formatted with both \"id\" and \"name\"
attributes, when appropriate."
:group 'org-export-html
:version "24.4"
:package-version '(Org . "8.0")
:type 'boolean)


Rustom-

For now, just set this variable to nil and the anchors will be
exported with an id and no name attribute. If `org-export-allow-BIND'
is true, putting the following in the head of the document will work:

#+BIND: org-html-allow-name-attribute-in-anchors nil

Bastien-

I will look at making this the default when i have time if the doctype
is html5 (`org-html-html5-p' is true), but it requires some work to
get the info structure passed down to `org-html--anchor'.



Re: [O] html5 generation minor bug

2013-12-27 Thread Bastien
Hi Rustom,

Rustom Mody  writes:

> When the html-doctype is set to html5 the generator still generates
> name attributes in links which is not correct html5
> http://dev.w3.org/html5/markup/a.html#a-constraints

Can you give an example of what it does and what it should do?

Thanks,

-- 
 Bastien



[O] html5 generation minor bug

2013-12-27 Thread Rustom Mody
When the html-doctype is set to html5 the generator still generates
name attributes in links which is not correct html5
http://dev.w3.org/html5/markup/a.html#a-constraints