* Testing: org-export-e-html (was: Drupal syntax on html-export)
@ 2012-05-30 6:27 William Crandall
2012-05-30 7:08 ` Testing: org-export-e-html Sebastien Vauban
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: William Crandall @ 2012-05-30 6:27 UTC (permalink / raw)
To: Jambunathan K, Nicolas Goaziou; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2753 bytes --]
Hello Nicolas and Jambunathan,
Thanks again for your responses to my questions.
I report some success and some "in process."
1. Stylesheet attachment (with #+STYLE:) works fine now.
2. Your special string example (replace-regexp-in-string),
Nicolas, as well as the better entity solution (\trade),
both work splendidly.
I'm looking now at three issues. Please let me know
what I can/should change.
Thanks again for this new export engine!
Cheers,
-BC
Testing: "M-x org-export-dispatch h"
Org-mode: 7.8.11 (release_7.8.11-18-g244331)
Emacs: 24.1.50.1
Windows 7
--------------------------------------------------
1. UTF-8 XML Encoding
In my init.el:
(setq org-e-html-coding-system 'utf-8)
But first line of test.html:
<?xml version="1.0" encoding="iso-8859-1"?>
In test.org:
org-e-html-coding-system is a variable defined in `org-e-html.el'.
Its value is utf-8
Original value was nil
Documentation:
Coding system for HTML export.
Use `org-export-coding-system' as the default value.
And:
buffer-file-coding-system is a variable defined in `C source code'.
Its value is utf-8-dos
Local in buffer 6-test.org; global value is utf-8-dos
--------------------------------------------------
2a. Internal HTML links (#)
Neither links nor destinations make it into the html.
This:
"an internal section link [[#directors][Directors]]."
becomes:
"an internal section link: <i>Directors</i>.
Was expecting (without italics):
""an internal section link: <a href="#directors">Directors</a>"
--------------------
2b. This target:
# <<directors>>
* A First Section
becomes:
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1">A First Section</h2>
<div class="outline-text-2" id="text-1">
Was expecting:
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><a name="directors" id="directors"></a>A First
Section</h2>
<div class="outline-text-2" id="text-1">
--------------------------------------------------
3. Image and file prefixes are as they were.
This (image):
[[/sites/a.png]]
becomes:
<img src="g:/sites/a.png"/>
And this (file):
[[/sites/my-file][My link]]
becomes:
<a href="file://g:/sites/my-file">My link</a>
I'd love an option to "change it not" for both, so that
neither "g:" nor "file://g:" is added to "/...".
I could strip them out, after exporting, but I think
this is an option that others would also value.
(External links, to an "http://...", work fine.)
------------------[end]---------------------------
On Sun, May 27, 2012 at 9:00 AM, William Crandall <bc3141592@gmail.com>wrote:
> Hello Nicolas and Jambunathan,
>
> Many thanks, to you both, for such quick and detailed responses!
>
>
[-- Attachment #2: Type: text/html, Size: 13830 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 6:27 Testing: org-export-e-html (was: Drupal syntax on html-export) William Crandall @ 2012-05-30 7:08 ` Sebastien Vauban 2012-05-30 11:07 ` Nicolas Goaziou 2012-05-31 6:42 ` Jambunathan K 2 siblings, 0 replies; 16+ messages in thread From: Sebastien Vauban @ 2012-05-30 7:08 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi William, William Crandall wrote: > 3. Image and file prefixes are as they were. > > This (image): > > [[/sites/a.png]] > > becomes: > > <img src="g:/sites/a.png"/> > > And this (file): > > [[/sites/my-file][My link]] > > becomes: > > <a href="file://g:/sites/my-file">My link</a> > > > I'd love an option to "change it not" for both, so that > neither "g:" nor "file://g:" is added to "/...". > > I could strip them out, after exporting, but I think > this is an option that others would also value. > > > (External links, to an "http://...", work fine.) A quick note on this one: I think adding "." does work, so use "./sites/a.png" instead. Dunno if that suits your need, though. Best regards, Seb -- Sebastien Vauban ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 6:27 Testing: org-export-e-html (was: Drupal syntax on html-export) William Crandall 2012-05-30 7:08 ` Testing: org-export-e-html Sebastien Vauban @ 2012-05-30 11:07 ` Nicolas Goaziou 2012-05-30 23:50 ` William Crandall 2012-05-30 23:53 ` William Crandall 2012-05-31 6:42 ` Jambunathan K 2 siblings, 2 replies; 16+ messages in thread From: Nicolas Goaziou @ 2012-05-30 11:07 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Jambunathan K Hello, William Crandall <bc3141592@gmail.com> writes: > 2a. Internal HTML links (#) > > > Neither links nor destinations make it into the html. > > This: > > "an internal section link [[#directors][Directors]]." > > becomes: > > "an internal section link: <i>Directors</i>. > > Was expecting (without italics): > > ""an internal section link: <a href="#directors">Directors</a>" I think your mixing up syntax here: "#" stands for custom-id links. In other words, [[#directors][Directors]] is a link pointing to an headline whose CUSTOM-ID property is "directors". If there's no such headline, it will return Directors italicized. If you're targeting an headline, provide it an appropriate CUSTOM-ID. Otherwise, just use a target. > 2b. This target: > > # <<directors>> > * A First Section > > becomes: > > <div id="outline-container-1" class="outline-2"> > <h2 id="sec-1">A First Section</h2> > <div class="outline-text-2" id="text-1"> > > Was expecting: > > <div id="outline-container-1" class="outline-2"> > <h2 id="sec-1"><a name="directors" id="directors"></a>A First > Section</h2> > <div class="outline-text-2" id="text-1"> "# <<target>>" syntax has been dropped since every target is now "invisible". Use : * <<directors>> A First Section instead. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 11:07 ` Nicolas Goaziou @ 2012-05-30 23:50 ` William Crandall 2012-05-30 23:53 ` William Crandall 1 sibling, 0 replies; 16+ messages in thread From: William Crandall @ 2012-05-30 23:50 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1521 bytes --] Thanks Sebastien! Sometimes its the smallest things; in this case >.< A single point, and figures work in my setup. That is: [[./sites/a.png]] becomes: <img src="./sites/a.png" alt="a.png"/> ------------------------------ Alas, FILES do not now behave the same way. Using M-x org-export-dispatch h this: [[./sites/my-file][My link]] becomes: <a href="file://./sites/my-file">My link</a> So, org-export-dispatch (on Windows), adds "file://" if the first char is ".", and it adds "file://g:" if the first char is "/". (With "g:" the root drive letter.) Still hoping for a switch that will add [nothing]. +1 for solving the img challenge! -BC > Hi William, > > William Crandall wrote: > >* 3. Image and file prefixes are as they were.* > > > >* This (image):* > > > >* [[/sites/a.png]]* > > > >* becomes:* > > > >* <img src="g:/sites/a.png"/>* > > > >* And this (file):* > > > >* [[/sites/my-file][My link]]* > > > >* becomes:* > > > >* <a href="file://g:/sites/my-file">My link</a>* > > > > > >* I'd love an option to "change it not" for both, so that* > >* neither "g:" nor "file://g:" is added to "/...".* > > > >* I could strip them out, after exporting, but I think* > >* this is an option that others would also value.* > > > > > >* (External links, to an "http://...";, work fine.)* > > A quick note on this one: > > I think adding "." does work, so use "./sites/a.png" instead. > > Dunno if that suits your need, though. > > Best regards, > Seb > > -- > Sebastien Vauban > > [-- Attachment #2: Type: text/html, Size: 2222 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 11:07 ` Nicolas Goaziou 2012-05-30 23:50 ` William Crandall @ 2012-05-30 23:53 ` William Crandall 2012-05-31 4:28 ` Jambunathan K 2012-05-31 12:08 ` Nicolas Goaziou 1 sibling, 2 replies; 16+ messages in thread From: William Crandall @ 2012-05-30 23:53 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode, Jambunathan K [-- Attachment #1: Type: text/plain, Size: 2100 bytes --] Hello Nicolas, Thanks for clarifying link syntax. I think I'm more than half way there! I can now create targets/destinations: This: ** <<crandall>>BC Crandall becomes: <h3 id="sec-1-1"><a id="crandall" name="crandall"/>BC Crandall</h3> As expected. But creating a link TO that "id" target eludes me. This: [[#crandall][BC Crandall]] becomes: <i>BC Crandall</i> Was expecting: <a href="#crandall">BC Crandall</a> I was expecting that link (not italicized) because of the <a id="crandall"/> in the <h3>, in that file. Sorry if I'm being obtuse here! Thanks again for your help, -BC > Hello, > > William Crandall <address@hidden> writes: > > >* 2a. Internal HTML links (#)* > > > > > >* Neither links nor destinations make it into the html.* > > > >* This:* > > > >* "an internal section link [[#directors][Directors]]."* > > > >* becomes:* > > > >* "an internal section link: <i>Directors</i>.* > > > >* Was expecting (without italics):* > > > >* ""an internal section link: <a href="#directors">Directors</a>"* > > I think your mixing up syntax here: "#" stands for custom-id links. > > In other words, [[#directors][Directors]] is a link pointing to an > headline whose CUSTOM-ID property is "directors". If there's no such > headline, it will return Directors italicized. > > If you're targeting an headline, provide it an appropriate CUSTOM-ID. > Otherwise, just use a target. > > > >* 2b. This target:* > > > >* # <<directors>>* > >* * A First Section* > > > >* becomes:* > > > >* <div id="outline-container-1" class="outline-2">* > >* <h2 id="sec-1">A First Section</h2>* > >* <div class="outline-text-2" id="text-1">* > > > >* Was expecting:* > > > >* <div id="outline-container-1" class="outline-2">* > >* <h2 id="sec-1"><a name="directors" id="directors"></a>A First* > >* Section</h2>* > >* <div class="outline-text-2" id="text-1">* > > "# <<target>>" syntax has been dropped since every target is now > "invisible". > > Use : > > * <<directors>> A First Section > > instead. > > > Regards, > > -- > Nicolas Goaziou > > [-- Attachment #2: Type: text/html, Size: 5742 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 23:53 ` William Crandall @ 2012-05-31 4:28 ` Jambunathan K 2012-05-31 12:08 ` Nicolas Goaziou 1 sibling, 0 replies; 16+ messages in thread From: Jambunathan K @ 2012-05-31 4:28 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Nicolas Goaziou [-- Attachment #1: Type: text/plain, Size: 105 bytes --] For some reasons, the link type becomes "custom-id". See the attached files - links.org and links.el. [-- Attachment #2: links.el --] [-- Type: application/emacs-lisp, Size: 3089 bytes --] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: links.org --] [-- Type: text/x-org, Size: 196 bytes --] * <<aaaa>> BC Crandall :PROPERTIES: :CUSTOM_ID: bbbb :END: * Link1 #+target: cccc [[#aaaa][Some description]] * Link2 [[#bbbb][Some description]] * Link3 [[#cccc][Some description]] [-- Attachment #4: Type: text/plain, Size: 2563 bytes --] William Crandall <bc3141592@gmail.com> writes: > Hello Nicolas, > > Thanks for clarifying link syntax. > I think I'm more than half way there! > > I can now create targets/destinations: > > This: > ** <<crandall>>BC Crandall > > becomes: > <h3 id="sec-1-1"><a id="crandall" name="crandall"/>BC Crandall</ > h3> > > As expected. > > > But creating a link TO that "id" target eludes me. > > This: > [[#crandall][BC Crandall]] > > becomes: > <i>BC Crandall</i> > > Was expecting: > <a href="#crandall">BC Crandall</a> > > > I was expecting that link (not italicized) because > of the <a id="crandall"/> in the <h3>, in that file. > > Sorry if I'm being obtuse here! > > Thanks again for your help, > > -BC > > > Hello, > > William Crandall <address@hidden> writes: > > > 2a. Internal HTML links (#) > > > > > > Neither links nor destinations make it into the html. > > > > This: > > > > "an internal section link [[#directors][Directors]]." > > > > becomes: > > > > "an internal section link: <i>Directors</i>. > > > > Was expecting (without italics): > > > > ""an internal section link: <a href="#directors">Directors</a>" > > I think your mixing up syntax here: "#" stands for custom-id links. > > In other words, [[#directors][Directors]] is a link pointing to an > headline whose CUSTOM-ID property is "directors". If there's no such > headline, it will return Directors italicized. > > If you're targeting an headline, provide it an appropriate CUSTOM-ID. > Otherwise, just use a target. > > > > 2b. This target: > > > > # <<directors>> > > * A First Section > > > > becomes: > > > > <div id="outline-container-1" class="outline-2"> > > <h2 id="sec-1">A First Section</h2> > > <div class="outline-text-2" id="text-1"> > > > > Was expecting: > > > > <div id="outline-container-1" class="outline-2"> > > <h2 id="sec-1"><a name="directors" id="directors"></a>A First > > Section</h2> > > <div class="outline-text-2" id="text-1"> > > "# <<target>>" syntax has been dropped since every target is now > "invisible". > > Use : > > * <<directors>> A First Section > > instead. > > > Regards, > > -- > Nicolas Goaziou > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 23:53 ` William Crandall 2012-05-31 4:28 ` Jambunathan K @ 2012-05-31 12:08 ` Nicolas Goaziou 2012-06-01 3:56 ` William Crandall 1 sibling, 1 reply; 16+ messages in thread From: Nicolas Goaziou @ 2012-05-31 12:08 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Jambunathan K Hello, William Crandall <bc3141592@gmail.com> writes: > Thanks for clarifying link syntax. > I think I'm more than half way there! > > I can now create targets/destinations: > > This: > ** <<crandall>>BC Crandall > > becomes: > <h3 id="sec-1-1"><a id="crandall" name="crandall"/>BC Crandall</h3> > > As expected. > > > But creating a link TO that "id" target eludes me. > > This: > [[#crandall][BC Crandall]] > > becomes: > <i>BC Crandall</i> > > Was expecting: > <a href="#crandall">BC Crandall</a> Again, "#crandall" syntax should be used to target an headline with "crandall" as value for its custom-id property. See section 4.2 in the manual. --8<---------------cut here---------------start------------->8--- * BC Crandall :PROPERTIES: :CUSTOM_ID: crandall :END: [[#crandall][Description]] --8<---------------cut here---------------end--------------->8--- If you are linking to a target, simply call its name. --8<---------------cut here---------------start------------->8--- * <<crandall>>BC Crandall A [[crandall][link]] to headline [[crandall]] --8<---------------cut here---------------end--------------->8--- Notice the difference between the link with or without a description. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-31 12:08 ` Nicolas Goaziou @ 2012-06-01 3:56 ` William Crandall 2012-06-01 6:42 ` William Crandall 2012-06-01 16:38 ` Nicolas Goaziou 0 siblings, 2 replies; 16+ messages in thread From: William Crandall @ 2012-06-01 3:56 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode, Jambunathan K [-- Attachment #1: Type: text/plain, Size: 5907 bytes --] Hello Nicolas, To wrap my neurons around linking, I made a small test batch. There appear to be several difference between the "old" HTML export engine and the current version of the "new". Testing org-to-HTML export: old: C-c C-e h (org-export, in org-exp.el) new: M-x org-export-dispatch h (in org-export.el) Four input permutations: 1. [[directors]] 2. [[#directors]] 3. [[directors][Directors]] 4. [[#directors][Directors]] As I see it (do let me know what I'm getting wrong!), the old version gets all links right. (But "old" makes one error(?) see next section.) 1. [[directors]] old: <a href="#sec-1">directors</a> new: <i>directors</i> 2. [[#directors]] old: <a href="#directors">#directors</a> new: <a href="#sec-1">Directors</a> 3. [[directors][Directors]] old: <a href="#sec-1">Directors</a> new: <i>Directors</i> 4. [[#directors][Directors]] old: <a href="#directors">Directors</a> new: <a href="#sec-1">Directors</a> In no case is the output the same! #4 would be most useful for my purposes, as it allows identifying target links precisely. -------------------------------------------------- Turning to the output for targets, the new version does not close the <a> tag (as the old version does). Other than that, "new" seems fine. ("Old" generates a <pre> section from the PROPERTIES drawer, whether it is open or closed, with your encoding. Not my focus, but is this an "old" bug?) Org-mode input: * Directors :PROPERTIES: :CUSTOM_ID: directors :END: HTML output: old: <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a name="sec-1" id="sec-1"></a>Directors</h2> <div class="outline-text-2" id="text-directors"> <pre class="example"> PROPERTIES :CUSTOM_ID: directors </pre> new: <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a id="sec-1" name="sec-1"/>Directors</h2> <div class="outline-text-2" id="text-directors"> [no <pre> section] -------------------------------------------------- Thanks again for moving this forward! -BC Org-mode: 7.8.11 (release_7.8.11-24-g4144c5) Emacs: 24.1.50.1 Windows 7 ---------------------------------------------------------------------- Full text excerpts follow: input(org) / output(new) / output(old) ---------------------------------------------------------------------- Input (org-mode) ---------------------------------------------------------------------- #+OPTIONS: H:3 -:t *:t #+OPTIONS: num:nil toc:nil #+OPTIONS: <:nil timestamp:nil #+OPTIONS: author:nil creator:nil This is the first paragraph, before any links or sections. First try, with only word {{directors}}: [[directors]] Second, with word and hash {{#directors}}: [[#directors]] Third, with word and target, {{directors}{Directors}}: [[directors][Directors]] Fourth, hash-word and target, {{#directors}{Directors}}: [[#directors][Directors]] A blank, spacer paragraph, before the target. * Directors :PROPERTIES: :CUSTOM_ID: directors :END: Just to end, a closing paragraph. ---------------------------------------------------------------------- Output ("new" engine) (Also: two extra blank-lines before each <p>): ---------------------------------------------------------------------- <p> This is the first paragraph, before any links or sections. </p> <p> First try, with only word {{directors}}: <i>directors</i> </p> <p> Second, with word and hash {{#directors}}: <a href="#sec-1">Directors</a> </p> <p> Third, with word and target, {{directors}{Directors}}: <i>Directors</i> </p> <p> Fourth, hash-word and target, {{#directors}{Directors}}: <a href="#sec-1">Directors</a> </p> <p> A blank, spacer paragraph, before the target. </p> <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a id="sec-1" name="sec-1"/>Directors</h2> <div class="outline-text-2" id="text-directors"> <p> Just to end, a closing paragraph. </p> </div> </div> ---------------------------------------------------------------------- Output ("old" engine): ---------------------------------------------------------------------- <p>This is the first paragraph, before any links or sections. </p> <p> First try, with only word {{directors}}: <a href="#sec-1">directors</a> </p> <p> Second, with word and hash {{#directors}}: <a href="#directors">#directors</a> </p> <p> Third, with word and target, {{directors}{Directors}}: <a href="#sec-1">Directors</a> </p> <p> Fourth, hash-word and target, {{#directors}{Directors}}: <a href="#directors">Directors</a> </p> <p> A blank, spacer paragraph, before the target. </p> <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a name="sec-1" id="sec-1"></a>Directors</h2> <div class="outline-text-2" id="text-directors"> <pre class="example"> PROPERTIES :CUSTOM_ID: directors </pre> <p> Just to end, a closing paragraph. </p></div> </div> -------------------------------------------------[end]---------------- On Thu, May 31, 2012 at 5:08 AM, Nicolas Goaziou <n.goaziou@gmail.com>wrote: > Hello, > [...] > Again, "#crandall" syntax should be used to target an headline with > "crandall" as value for its custom-id property. See section 4.2 in the > manual. > > --8<---------------cut here---------------start------ ------->8--- > * BC Crandall > :PROPERTIES: > :CUSTOM_ID: crandall > :END: > > [[#crandall][Description]] > --8<---------------cut here---------------end--------------->8--- > > > If you are linking to a target, simply call its name. > > --8<---------------cut here---------------start------ ------->8--- > * <<crandall>>BC Crandall > > A [[crandall][link]] to headline [[crandall]] > --8<---------------cut here---------------end--------------->8--- > > Notice the difference between the link with or without a description. > > > Regards, > > -- > Nicolas Goaziou > [-- Attachment #2: Type: text/html, Size: 22349 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-01 3:56 ` William Crandall @ 2012-06-01 6:42 ` William Crandall 2012-06-01 16:38 ` Nicolas Goaziou 1 sibling, 0 replies; 16+ messages in thread From: William Crandall @ 2012-06-01 6:42 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode, Jambunathan K Nicolas, My email program (Gmail) deleted key HTML text, Here, again, the core bit, as plain text, I hope it goes through: -------------------------------------------------- Four input permutations: 1. [[directors]] 2. [[#directors]] 3. [[directors][Directors]] 4. [[#directors][Directors]] As I see it (do let me know what I'm getting wrong!), the old version gets all links right. (But "old" makes one error(?) see next section.) 1. [[directors]] old: <a href="#sec-1">directors</a> new: <i>directors</i> 2. [[#directors]] old: <a href="#directors">#directors</a> new: <a href="#sec-1">Directors</a> 3. [[directors][Directors]] old: <a href="#sec-1">Directors</a> new: <i>Directors</i> 4. [[#directors][Directors]] old: <a href="#directors">Directors</a> new: <a href="#sec-1">Directors</a> In no case is the output the same! #4 would be most useful for my purposes, as it allows identifying target links precisely. -------------------------------------------------- Turning to the output for targets, the new version does not close the <a> tag (as the old version does). Other than that, "new" seems fine. ("Old" generates a <pre> section from the PROPERTIES drawer, whether it is open or closed, with your encoding. Not my focus, but is this an "old" bug?) Org-mode input: * Directors :PROPERTIES: :CUSTOM_ID: directors :END: HTML output: old: <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a name="sec-1" id="sec-1"></a>Directors</h2> <div class="outline-text-2" id="text-directors"> <pre class="example"> PROPERTIES :CUSTOM_ID: directors </pre> new: <div id="outline-container-directors" class="outline-2"> <h2 id="directors"><a id="sec-1" name="sec-1"/>Directors</h2> <div class="outline-text-2" id="text-directors"> [no <pre> section] -------------------------------------------------- On Thu, May 31, 2012 at 8:56 PM, William Crandall <bc3141592@gmail.com> wrote: > > > Hello Nicolas, > > To wrap my neurons around linking, I made a small test batch. > There appear to be several difference between the "old" HTML > export engine and the current version of the "new". > > Testing org-to-HTML export: > old: C-c C-e h (org-export, in org-exp.el) > new: M-x org-export-dispatch h (in org-export.el) > > Four input permutations: > > 1. [[directors]] > 2. [[#directors]] > 3. [[directors][Directors]] > 4. [[#directors][Directors]] > > > As I see it (do let me know what I'm getting wrong!), > the old version gets all links right. > > (But "old" makes one error(?) see next section.) > > 1. [[directors]] > old: <a href="#sec-1">directors</a> > new: <i>directors</i> ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-01 3:56 ` William Crandall 2012-06-01 6:42 ` William Crandall @ 2012-06-01 16:38 ` Nicolas Goaziou 2012-06-02 2:56 ` William Crandall 1 sibling, 1 reply; 16+ messages in thread From: Nicolas Goaziou @ 2012-06-01 16:38 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Jambunathan K Hello, William Crandall <bc3141592@gmail.com> writes: > 1. [[directors]] > 2. [[#directors]] > 3. [[directors][Directors]] > 4. [[#directors][Directors]] > > > As I see it (do let me know what I'm getting wrong!), > the old version gets all links right. > > (But "old" makes one error(?) see next section.) > > 1. [[directors]] > old: <a href="#sec-1">directors</a> > new: <i>directors</i> > > 2. [[#directors]] > old: <a href="#directors">#directors</a> > new: <a href="#sec-1">Directors</a> > > 3. [[directors][Directors]] > old: <a href="#sec-1">Directors</a> > new: <i>Directors</i> > > 4. [[#directors][Directors]] > old: <a href="#directors">Directors</a> > new: <a href="#sec-1">Directors</a> > > > In no case is the output the same! <i>directors</i> is a fallback output meaning that export engine wasn't able to find which object you were linking to. Provide targets for these links and the output will be different. > #4 would be most useful for my purposes, as it allows > identifying target links precisely. Org has syntax to identify target links precisely. I gave you a few examples in a previous mail. > Turning to the output for targets, the new version > does not close the <a> tag (as the old version does). > Other than that, "new" seems fine. > > ("Old" generates a <pre> section from the PROPERTIES drawer, > whether it is open or closed, with your encoding. Not my focus, > but is this an "old" bug?) Properties drawers are ignored in every back-end by default. There is no old or new bug, the behaviour has evolved. > Output ("new" engine) (Also: two extra blank-lines before each <p>): That was a mistake in `org-e-html.el'. There should be as much blank lines in the Org buffer as in HTML output. I fixed the problem in a recent commit. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-01 16:38 ` Nicolas Goaziou @ 2012-06-02 2:56 ` William Crandall 2012-06-02 5:04 ` Jambunathan K 0 siblings, 1 reply; 16+ messages in thread From: William Crandall @ 2012-06-02 2:56 UTC (permalink / raw) To: Nicolas Goaziou, Jambunathan K; +Cc: emacs-orgmode Hello Jambunathan and Nicolas, Thanks for your recent updates! Links are proving to be quite a challenge. Here is my new test file, and "new" and "old" HTML output, comparing the two engines: "old": C-c C-e h (org-export, in org-exp.el) "new": M-x org-export-dispatch h (in org-export.el) The entire content of test.org: ---------------------------------------------------------------------- --------------------------------------------------------- Org (input): Link and description, to anchor in headline: [[#directors][Directors]] Link and description, to anchor in paragraph: [[#bc][BC]] * <<directors>>Directors Paragraph with a /dedicated target/: <<bc>> -----------------------------------------------------------------[end] ---------------------------------------------------------------------- Reading the Manual (7.8.11), Section 4.2, this org code should, I think, export exactly as the "old" engine does it, with anchor href's linking to two targets (Firefox renders it perfectly): ---------------------------------------------------------------------- ------------------------------------------------- "Old" HTML (output): <p> Link and description, to anchor in headline: <a href="#directors">Directors</a> </p> <p> Link and description, to anchor in paragraph: <a href="#bc">BC</a> </p> <div id="outline-container-1" class="outline-2"> <h2 id="sec-1"><a name="directors" class="target">directors</a> Directors</h2> <div class="outline-text-2" id="text-1"> <p> Paragraph with a <i>dedicated target</i>: <a name="bc" class="target">bc</a> BC </p> </div> </div> -----------------------------------------------------------------[end] ---------------------------------------------------------------------- The "old" engine is fine (if attuned to HTML4 more than HTML5). Here is the "new" output (Org-mode release_7.8.11-32-g02f3ee). ---------------------------------------------------------------------- ------------------------------------------------- "New" HTML (output): <p> Link and description, to anchor in headline: <i>Directors</i> </p> <p> Link and description, to anchor in paragraph: <i>BC</i> </p> <div id="outline-container-1" class="outline-2"> <h2 id="sec-1"><a id="directors" name="directors"/>Directors</h2> <div class="outline-text-2" id="text-1"> <p> Paragraph with a <i>dedicated target</i>: <a id="bc" name="bc"/>BC </p> </div> </div> -----------------------------------------------------------------[end] ---------------------------------------------------------------------- I see four discrepancies, in two groups: 1. Both links out (first two p's), to id's in an <h> and a <p>, do not generate links (<a href="#foo">foo</a>). 2. At both anchors, <a>, in the <h2> and the <p>, the <a> tag is not closed with an </a>. This may be related to the errors noted in point one, as the HTML is malformed without them. I *really like* the direction the new engine is heading, with id attributes in <a> tags, and making the <<target>> non-visible. And tighter spacing. All good stuff! Many thanks for doing the heavy lifting! I look forward to your next commits. -BC Org-mode: 7.8.11 (release_7.8.11-32-g02f3ee) Emacs: 24.1.50.1 Windows 7 On Fri, Jun 1, 2012 at 9:38 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote: > > Hello, > > William Crandall <bc3141592@gmail.com> writes: > > ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-02 2:56 ` William Crandall @ 2012-06-02 5:04 ` Jambunathan K 2012-06-02 7:40 ` William Crandall 0 siblings, 1 reply; 16+ messages in thread From: Jambunathan K @ 2012-06-02 5:04 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Nicolas Goaziou Crandall There is some confusion on your end :-). > --------------------------------------------------------- Org (input): > > Link and description, to anchor in headline: [[#directors][Directors]] > > Link and description, to anchor in paragraph: [[#bc][BC]] Remove the "#"es. > * <<directors>>Directors > > Paragraph with a /dedicated target/: <<bc>> > > -----------------------------------------------------------------[end] > 1. Both links out (first two p's), to id's in an <h> and a <p>, > do not generate links (<a href="#foo">foo</a>). You are using targets. So you shouldn't use "#"es. This was what Nicolas was trying to tell you. > 2. At both anchors, <a>, in the <h2> and the <p>, the <a> tag > is not closed with an </a>. This may be related to the errors > noted in point one, as the HTML is malformed without them. Put the HTML file in nxml-mode and do C-c C-n. I see no validation errors. The HTML file definitely is not malformed. [Context switch] Here is the modified Org file you should be using. When you are linking to headlines, use CUSTOM_IDs and *not* targets. Links to CUSTOM_IDs have a `#' in front while don't targets are *without* `#'es. --8<---------------cut here---------------start------------->8--- Link and description, to anchor in headline: [[directors][Directors]] Link and description, to anchor in paragraph: [[bc][BC]] * <<directors>> Directors Paragraph with a /dedicated target/: <<bc>> * Headline wiith CUSTOM_ID :PROPERTIES: :CUSTOM_ID: director-1 :END: #+target: invisible * Recommendation about using links Always link to headline using [[#director-1][Headline wiith CUSTOM_ID]]. Use targets when you want to jump to obscure location [[bc]]. Never use [[invisible][Invisible target]]. They will disappear on export. For more information on how links are structured see the [[http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00752.html][this post]]. --8<---------------cut here---------------end--------------->8--- Btw, thanks for your patience and sticking it out right through to the end. Jambunathan K. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-02 5:04 ` Jambunathan K @ 2012-06-02 7:40 ` William Crandall 2012-06-02 10:26 ` Jambunathan K 0 siblings, 1 reply; 16+ messages in thread From: William Crandall @ 2012-06-02 7:40 UTC (permalink / raw) To: Jambunathan K; +Cc: emacs-orgmode, Nicolas Goaziou Jambunathan, Thanks to you, and Nicolas, for your patience. I now see (blindingly, now that I do see) that the export engine adds the # to internal links, not me. The only trailing issue I see is the "soft error" of no </a> tag on <<targets>> (see W3C notes below). This (org): ------------------------------------------------------------ Link and description, to anchor in paragraph: [[bc][BC]] Paragraph with a /dedicated target/: <<bc>>BC ------------------------------------------------------------ Exports to (new): ------------------------------------------------------------ <p> Link and description, to anchor in paragraph: <a href="#bc">BC</a> </p> <p> Paragraph with a <i>dedicated target</i>: <a id="bc" name="bc"/>BC </p> ------------------------------------------------------------ Success! ------------------------------------------------------------ And headlines with a <<target>> are also fine: This (org): ------------------------------------------------------------ Link and description, to anchor in headline: [[directors][Directors]] * <<directors>>Directors ------------------------------------------------------------ Exports to (new): ------------------------------------------------------------ <p> Link and description, to anchor in headline: <a href="#directors">Directors</a> </p> <div id="outline-container-1" class="outline-2"> <h2 id="sec-1"><a id="directors" name="directors"/>Directors</h2> <div class="outline-text-2" id="text-1"> ------------------------------------------------------------ Success! ------------------------------------------------------------ And I /understand/ how ":PROPERTIES: :CUSTOM_ID: directors" in a headline, can be linked to with: [[#directors][Directors]], WITH a # that I, not the engine, insert. So I'm good to go! Many thanks. ------------------------------------------------------------ ------------------------------------------------------------ One trailing point: You may want to consider adding a formal closing </a> tag for <<target>> elements (as the "old" engine does) rather than just "self-closing" the <a> tag with a "/>". A Firefox comment (viewing source) caught my attention: "Self-closing syntax ("/>") used on a non-void HTML element. Ignoring the slash and treating as a start tag." Then I found this: http://www.w3.org/TR/html-markup/syntax.html#syntax-elements "A non-void element must have an end tag, unless the subsection for that element in the HTML elements section of this reference indicates that its end tag can be omitted." And this: http://www.w3.org/TR/html-markup/a.html#a-tags "An a element must have both a start tag and an end tag." ------------------------------ I take all of this to mean that "it would be best" to use "</a>" closing tags, rather than "self-closing" an "<a ..." with a "/>". But again, the way it is works for me. Many thanks. Best of luck on the rest of it! -BC On Fri, Jun 1, 2012 at 10:04 PM, Jambunathan K <kjambunathan@gmail.com> wrote: > > Crandall > > There is some confusion on your end :-). ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-06-02 7:40 ` William Crandall @ 2012-06-02 10:26 ` Jambunathan K 0 siblings, 0 replies; 16+ messages in thread From: Jambunathan K @ 2012-06-02 10:26 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode > The only trailing issue I see is the "soft error" of no </a> tag > on <<targets>> (see W3C notes below). > http://www.w3.org/TR/html-markup/a.html#a-tags > > "An a element must have both a start tag and an end tag." This is now fixed. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-30 6:27 Testing: org-export-e-html (was: Drupal syntax on html-export) William Crandall 2012-05-30 7:08 ` Testing: org-export-e-html Sebastien Vauban 2012-05-30 11:07 ` Nicolas Goaziou @ 2012-05-31 6:42 ` Jambunathan K 2012-06-01 3:44 ` William Crandall 2 siblings, 1 reply; 16+ messages in thread From: Jambunathan K @ 2012-05-31 6:42 UTC (permalink / raw) To: William Crandall; +Cc: emacs-orgmode, Nicolas Goaziou > But first line of test.html: > > <?xml version="1.0" encoding="iso-8859-1"?> This is fixed. Please pull again. There was one another issue: Heading with CUSTOM_IDS were not getting the associated property as an anchor. This is also fixed. Issues wrt images links and target links are still *pending*. Hopefully, it will be fixed in the next iteration. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Testing: org-export-e-html 2012-05-31 6:42 ` Jambunathan K @ 2012-06-01 3:44 ` William Crandall 0 siblings, 0 replies; 16+ messages in thread From: William Crandall @ 2012-06-01 3:44 UTC (permalink / raw) To: Jambunathan K; +Cc: emacs-orgmode, Nicolas Goaziou [-- Attachment #1: Type: text/plain, Size: 712 bytes --] Hello Jambunathan, UTF-8! Yes! Many thanks. Now: <?xml version="1.0" encoding="utf-8"?> Still snagging on targets and links. Will detail in next message. -BC Org-mode: 7.8.11 (release_7.8.11-24-g4144c5) Emacs: 24.1.50.1 Windows 7 On Wed, May 30, 2012 at 11:42 PM, Jambunathan K <kjambunathan@gmail.com>wrote: > > But first line of test.html: > > > > <?xml version="1.0" encoding="iso-8859-1"?> > > This is fixed. Please pull again. > > There was one another issue: Heading with CUSTOM_IDS were not getting > the associated property as an anchor. This is also fixed. > > Issues wrt images links and target links are still *pending*. > Hopefully, it will be fixed in the next iteration. > > > > > [-- Attachment #2: Type: text/html, Size: 1387 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-06-02 10:27 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-30 6:27 Testing: org-export-e-html (was: Drupal syntax on html-export) William Crandall 2012-05-30 7:08 ` Testing: org-export-e-html Sebastien Vauban 2012-05-30 11:07 ` Nicolas Goaziou 2012-05-30 23:50 ` William Crandall 2012-05-30 23:53 ` William Crandall 2012-05-31 4:28 ` Jambunathan K 2012-05-31 12:08 ` Nicolas Goaziou 2012-06-01 3:56 ` William Crandall 2012-06-01 6:42 ` William Crandall 2012-06-01 16:38 ` Nicolas Goaziou 2012-06-02 2:56 ` William Crandall 2012-06-02 5:04 ` Jambunathan K 2012-06-02 7:40 ` William Crandall 2012-06-02 10:26 ` Jambunathan K 2012-05-31 6:42 ` Jambunathan K 2012-06-01 3:44 ` William Crandall
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).