Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Christian Moe writes: > In ODT, the link can be useful anyway, as the ODT output is a > reference field that can be automatically updated to a different > format, e.g. to refer to a page number instead of the (missing) > headline text. When using page numbers, one may have to use "Update Fields" - an extraneous step - to have a consistent doc. With the use of section numbers, the extraneous step and the inconsistency are altogether avoided. Remember the "section numbers" are computed by ODT exporter by hand (i.e., these section numbers are NOT "auto-magically" plugged in by LibreOffice.) It is more important to have a consistent document. So, use of page numbers can be an configurable option. It should NOT be the default option. When using page numbers, please mention in the docstring/manual that updating of fields is a user responsibility. A potential patch will touch `org-odt-label-styles' and `org-odt-category-map-alist' or steal significantly from these variables.
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
On Fri, Nov 22, 2013 at 4:08 AM, Christian Moe wrote: > Hi, > > But on reflection, I think there's a strong case to change the default > ODT output of links with dedicated targets to page number > references. Under the new exporter, such <> are hidden in > output, i.e. they no longer contain text that will serve as a > description, and as shown by my example they may not always belong to a > heading. But in an ODT document they will always belong to a page, and > page number references would be a customary choice for printed media > I can say that this describes my typical needs very well. I have a project with a fair number of targets (at least 26) that all will be referred to by page number. Like this: < . . . See above, on p. [[this target]]. I don't know if mine would be the odd or typical use. But it is what I am needing. Gratefully, Dan Griswold Rochester, NY
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Hello, Christian Moe writes: > But on reflection, I think there's a strong case to change the default > ODT output of links with dedicated targets to page number > references. Under the new exporter, such <> are hidden in > output, i.e. they no longer contain text that will serve as a > description, and as shown by my example they may not always belong to a > heading. But in an ODT document they will always belong to a page, and > page number references would be a customary choice for printed media. > > If that sounds reasonable I'll send a mini-patch later today. You seem to forget a use-case here: when the target belongs to an item, [[target1]] returns its number. Displaying the page, albeit correct, would be less interesting in that situation. Also, that would introduce an incompatibility with every other major back-end. At the moment, the compatible way to handle it would just be to ignore [[target1]] altogether (and keep section/list/whatever number for other calls). What do you think? Regards, -- Nicolas Goaziou
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Hi, What I described already works out of the box, as long as a bookmark and cross-reference are generated. In LibreOffice, you can then right-click on the field of the cross-reference to display e.g. the target's chapter heading number or page number instead of a textual description. But on reflection, I think there's a strong case to change the default ODT output of links with dedicated targets to page number references. Under the new exporter, such <> are hidden in output, i.e. they no longer contain text that will serve as a description, and as shown by my example they may not always belong to a heading. But in an ODT document they will always belong to a page, and page number references would be a customary choice for printed media. If that sounds reasonable I'll send a mini-patch later today. Yours, Christian Nicolas Goaziou writes: > Hello, > > Christian Moe writes: > >> In ODT, the link can be useful anyway, as the ODT output is a reference >> field that can be automatically updated to a different format, e.g. to >> refer to a page number instead of the (missing) headline text. > > I don't know ODT syntax, but if you provide that useful syntax in this > case, I can add it to ox-odt.el. > > > Regards,
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Hello, Christian Moe writes: > In ODT, the link can be useful anyway, as the ODT output is a reference > field that can be automatically updated to a different format, e.g. to > refer to a page number instead of the (missing) headline text. I don't know ODT syntax, but if you provide that useful syntax in this case, I can add it to ox-odt.el. Regards, -- Nicolas Goaziou
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Nicolas Goaziou writes: > Hello, > > Christian Moe writes: > >> The two examples below illustrate an odd ODT export failure that occurs in >> restricted circumstances: only when the target of the link is on a >> higher level of the tree than the link. >> >> * This fails >> >> ** A subheader >> >> This paragraph is bookmarked. <> >> >> When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get >> : user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME? >> >> *** A sub-subheader >> >> Here's a ref to the bookmark at [[target1]]. > > In this case, <> doesn't belong to any headline. What is the > expected output for [[target]]? Oh... right. But in that case, the output should be "No description for this link", as happens with HTML export. More helpful and informative than an export failure. In ODT, the link can be useful anyway, as the ODT output is a reference field that can be automatically updated to a different format, e.g. to refer to a page number instead of the (missing) headline text. Yours, Christian
Re: [O] [BUG][ODT] Subtree export fails when link references target on higher level
Hello, Christian Moe writes: > The two examples below illustrate an odd ODT export failure that occurs in > restricted circumstances: only when the target of the link is on a > higher level of the tree than the link. > > * This fails > > ** A subheader > > This paragraph is bookmarked. <> > > When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get > : user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME? > > *** A sub-subheader > > Here's a ref to the bookmark at [[target1]]. In this case, <> doesn't belong to any headline. What is the expected output for [[target]]? Regards, -- Nicolas Goaziou
[O] [BUG][ODT] Subtree export fails when link references target on higher level
The two examples below illustrate an odd ODT export failure that occurs in restricted circumstances: only when the target of the link is on a higher level of the tree than the link. * This fails ** A subheader This paragraph is bookmarked. <> When I try to export this subtree to ODT (`C-c C-e C-s o O' at point), I get : user-error: No such file: /Users/CM/org/OpenDocument export failed: FIXME? *** A sub-subheader Here's a ref to the bookmark at [[target1]]. * This works Here, I reverse the positions of reference and target from the first example. ** A subheader Here's a ref to the bookmark at [[target2]]. I can do subtree export from here with no problem. *** A sub-subheader This paragraph is bookmarked. <>