emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting to ODT with links to radio targets
@ 2019-06-26 16:37 Fraga, Eric
  2019-06-30 18:28 ` John Kitchin
  0 siblings, 1 reply; 2+ messages in thread
From: Fraga, Eric @ 2019-06-26 16:37 UTC (permalink / raw)
  To: Emacs Org mode mailing list

Hello all,

I need to share a document I have been writing in org which I would
normally export to PDF (via LaTeX, and which works very well).  To
share, I am exporting to ODT.  In general, the export is good enough for
my collaborator to make changes to the text (with track changes enabled
in whatever word processor he uses).  The exception is that links to
radio targets get exported to look like

      "some text OrgXref.org7b3090d more text" 

where the Orgxxx is where I expected the text which would link to the
radio target.  I hope I am making sense...

Is there an easy way to tell org to simply output the radio link text?

I have written an export filter to remove the extraneous XML stuff
around the text but this seems like overkill so I wonder if I missed
something simple.  No worries if not!

Many thanks.

PS - radio targets are brilliant for long documents without needing to
     create a full index.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae

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

* Re: Exporting to ODT with links to radio targets
  2019-06-26 16:37 Exporting to ODT with links to radio targets Fraga, Eric
@ 2019-06-30 18:28 ` John Kitchin
  0 siblings, 0 replies; 2+ messages in thread
From: John Kitchin @ 2019-06-30 18:28 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Emacs Org mode mailing list

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

I wasn't able to reproduce that issue, for me the target just doesn't show
up. you can lightly redefine the behavior of the export functions like this:

#+BEGIN_SRC emacs-lisp
(cl-letf (((symbol-function 'org-odt-target) (lambda (target contents info)
      (org-element-property :value target))))
  (let ((hfy-user-sheet-assoc nil))
    (org-open-file-with-system (org-export-to-file 'odt "test4.odt"))))
#+END_SRC

you could also use around advices for this.

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Wed, Jun 26, 2019 at 12:43 PM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> Hello all,
>
> I need to share a document I have been writing in org which I would
> normally export to PDF (via LaTeX, and which works very well).  To
> share, I am exporting to ODT.  In general, the export is good enough for
> my collaborator to make changes to the text (with track changes enabled
> in whatever word processor he uses).  The exception is that links to
> radio targets get exported to look like
>
>       "some text OrgXref.org7b3090d more text"
>
> where the Orgxxx is where I expected the text which would link to the
> radio target.  I hope I am making sense...
>
> Is there an easy way to tell org to simply output the radio link text?
>
> I have written an export filter to remove the extraneous XML stuff
> around the text but this seems like overkill so I wonder if I missed
> something simple.  No worries if not!
>
> Many thanks.
>
> PS - radio targets are brilliant for long documents without needing to
>      create a full index.
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-379-g1b74ae
>

[-- Attachment #2: Type: text/html, Size: 2573 bytes --]

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

end of thread, other threads:[~2019-06-30 18:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 16:37 Exporting to ODT with links to radio targets Fraga, Eric
2019-06-30 18:28 ` John Kitchin

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