From: William Crandall <bc3141592@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org, Jambunathan K <kjambunathan@gmail.com>
Subject: Re: Testing: org-export-e-html
Date: Thu, 31 May 2012 20:56:34 -0700 [thread overview]
Message-ID: <CAENLK5VXCuOxm7EBoZu5pZ6pVcamDp=3K-sk063Ty84ikjRKsQ@mail.gmail.com> (raw)
In-Reply-To: <87y5o8365b.fsf@gmail.com>
[-- 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 --]
next prev parent reply other threads:[~2012-06-01 3:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAENLK5VXCuOxm7EBoZu5pZ6pVcamDp=3K-sk063Ty84ikjRKsQ@mail.gmail.com' \
--to=bc3141592@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=kjambunathan@gmail.com \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).