emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: "Michaël Parienti" <michael@parienti.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [ODT] Internal Link disparear
Date: Fri, 20 Apr 2012 23:34:58 +0530	[thread overview]
Message-ID: <81aa26p9dh.fsf@gmail.com> (raw)
In-Reply-To: <20120419171852.5718cafa@chael> ("Michaël Parienti"'s message of "Thu, 19 Apr 2012 17:18:52 +0200")

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

Michael

Thanks for this report.  This is a bug in the ODT exporter. I have
checked in a fix to both hotfix-7.8.06 and master branch few minutes
ago.

I am attaching a sample Org file and the ODT file generated after the
the above fix.  Let me know if you have questions or run into other
issues.  Will appreciate if you can confirm the fix.


[-- Attachment #2: foobar.org --]
[-- Type: text/x-org, Size: 2562 bytes --]

#+TITLE:     Internal Links and org-odt.el
#+AUTHOR:    Jambunathan K
#+EMAIL:     kjambunathan@gmail.com
#+DATE:      2012-04-20 Fri
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:t

#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:


* Preface

- Hint :: To view the various links that are in this Org file do =M-x
          visible-mode=.
- Note :: Internal links that resolve to headlines will be replaced
          with their section numbers.  The description component of the
          internal links will be ignored.
- Tip 1 :: Always re-save the Org-exported ODT file once it is opened
           in LibreOffice.  This will force LibreOffice to rewrite the
           document.
- Tip 2 :: To identify unstable or broken internal links, from within
           LibreOffice do, /Tools->Update->Update All/ or
           /Tools->Update->Fields/.  Re-scan the document subsequently
           to identify problematic links.

* One
#<<#tag>>

  Some text.

* One Dot Five
  :PROPERTIES:
  :CUSTOM_ID: one-dot-five
  :END:

  Some text.

#<<invisible-target-in-the-middle-of-nowhere>>

  Some more text.

* One Dot Seven Five

  Some <<Visible Target>> text.

* Two

1. Section [[#tag][link]]

  This is a link destined for an invisible target. Note that the
  invisible target gets resolved (or bound) to the headline.

2. Section [[*One][One]]

  This is a link created with =C-c l= /(M-x org-store-link)/ and then
  inserting with =C-c C-l= /(M-x org-insert-link)/.  See /“(info "(org)
  Handling links")”/.

3. Section [[#one-dot-five][One Dot Five]]

  Link to a headline which has a /CUSTOM\_ID/. Created in the same
  manner as /Item (2)/.

4. Section [[One Dot Five]]

  This is a link created by hand.  This is another way to link to a
  headline.

5. Click this to land in a section text -  [[Visible%20Target][Visible Target]]

   This is a link to a visible target.  Recommended way of creating
   them is to proceed as in /Item (2)/ but modify the /Description:/
   offered at the prompt, so that the leading /file:/ component is
   stripped (=file:~/tmp-odt/foobar.org::Visible Target=) and just the
   part after =::= is used.

6. Section [[invisible-target-in-the-middle-of-nowhere][Invisible target in the middle of nothingness]]

  This link will be unstable.  Avoid such links.

[-- Attachment #3: foobar.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 11280 bytes --]

[-- Attachment #4: Type: text/plain, Size: 956 bytes --]



> Hi,
>
> I am coming into a curious bug. I don’t know if it an orgmode one or an
> libreoffice one.

> When a export-as-odt the simple org file attached to this mail, and
> open the odt file, I obtain an odt file very «unstable»: As soon as copy
> and paste any text into the file, the link called "link" just
> disappear. (sometime it disappears when I’m doing some else, as a pdf
> export for example)
>
> If I configure LibreOffice to display the «Field Name», the name of the
> link is still here, OrgXref.tag, but not the link itself.
>
> It’s the first time I was using internal link into a odt org-exported
> file.
>
> Thanks in advance for you help.

> Emacs version: "GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version
> 3.2.3) of 2012-04-10 on zelenka, modified by Debian"
>
> Org-version: Org-mode version 7.8.06 (from debian packaging)
>
> LibreOffice Version: 3.5.2-4 (from debian packaging)

-- 

[-- Attachment #5: foobar.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 11280 bytes --]

[-- Attachment #6: foobar.org --]
[-- Type: text/x-org, Size: 2562 bytes --]

#+TITLE:     Internal Links and org-odt.el
#+AUTHOR:    Jambunathan K
#+EMAIL:     kjambunathan@gmail.com
#+DATE:      2012-04-20 Fri
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:t

#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:


* Preface

- Hint :: To view the various links that are in this Org file do =M-x
          visible-mode=.
- Note :: Internal links that resolve to headlines will be replaced
          with their section numbers.  The description component of the
          internal links will be ignored.
- Tip 1 :: Always re-save the Org-exported ODT file once it is opened
           in LibreOffice.  This will force LibreOffice to rewrite the
           document.
- Tip 2 :: To identify unstable or broken internal links, from within
           LibreOffice do, /Tools->Update->Update All/ or
           /Tools->Update->Fields/.  Re-scan the document subsequently
           to identify problematic links.

* One
#<<#tag>>

  Some text.

* One Dot Five
  :PROPERTIES:
  :CUSTOM_ID: one-dot-five
  :END:

  Some text.

#<<invisible-target-in-the-middle-of-nowhere>>

  Some more text.

* One Dot Seven Five

  Some <<Visible Target>> text.

* Two

1. Section [[#tag][link]]

  This is a link destined for an invisible target. Note that the
  invisible target gets resolved (or bound) to the headline.

2. Section [[*One][One]]

  This is a link created with =C-c l= /(M-x org-store-link)/ and then
  inserting with =C-c C-l= /(M-x org-insert-link)/.  See /“(info "(org)
  Handling links")”/.

3. Section [[#one-dot-five][One Dot Five]]

  Link to a headline which has a /CUSTOM\_ID/. Created in the same
  manner as /Item (2)/.

4. Section [[One Dot Five]]

  This is a link created by hand.  This is another way to link to a
  headline.

5. Click this to land in a section text -  [[Visible%20Target][Visible Target]]

   This is a link to a visible target.  Recommended way of creating
   them is to proceed as in /Item (2)/ but modify the /Description:/
   offered at the prompt, so that the leading /file:/ component is
   stripped (=file:~/tmp-odt/foobar.org::Visible Target=) and just the
   part after =::= is used.

6. Section [[invisible-target-in-the-middle-of-nowhere][Invisible target in the middle of nothingness]]

  This link will be unstable.  Avoid such links.

      reply	other threads:[~2012-04-20 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 15:18 [ODT] Internal Link disparear Michaël Parienti
2012-04-20 18:04 ` Jambunathan K [this message]

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=81aa26p9dh.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael@parienti.org \
    /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).