Bug 80786 - Feature request: Function to remove field codes
Summary: Feature request: Function to remove field codes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-02 05:15 UTC by Stian Øby Johansen
Modified: 2015-01-21 12:07 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Stian Øby Johansen 2014-07-02 05:15:51 UTC
Often when writing there is a need for having a finished document without any automatic fields being in the documents. In other words, there is a need to convert all automated text (field codes) into "pure" text. When working with a publishing house, for example, you are very often required to remove all such kinds of automation from the documents in order to ensure that nothing weird happens when moving the contents from a writer document to the typesetting software.

Libreoffice currently lacks the feature to remove such codes with the click of a button. Word, on the other hand, has this feature. It is hereby suggested that Libreoffice implements this feature to gain feature parity with word and at the same time greatly improve the workflow for writers like myself. At present the content of all fields has to be manually written out as plain text before sending the document to a typesetter.

In some instances this is particularly problematic. A great example is when using a reference manager - which is common in all sciences. See for example the very popular reference manager Zotero. It has an LibreOffice extension that enable quick insertion and auto-generation of footnote text with the use of field codes. It also enables the user to switch between reference styles without having to rewrite the references. Before sending a scientific article to a publisher or a journal the writer will normally need to remove said field codes.

Luckily, Zotero developers have created a workaround for reference styles, but it has the drawback that italics and other forms of styling is removed from the citations. Reference styles often mandate the use of italics or other types of styling to references, and it is therefore very impractical that these field codes cannot be removed without also removing the formatting. Manually adding back italics etc. can be extremely cumbersome in a longer academic article or a book manuscript, with hundreds of footnotes. Because Libreoffice does not have any native field code removal function, such regressions are difficult to remedy, as pointed out in this blog post over at the Zotero forums: https://forums.zotero.org/discussion/25077/

If Libreoffice had a function to remove field codes from all (and/or parts) of a document, these troubles with disappear. Not only would this enhancement bring Libreoffice up to feature parity with Word, but it would also greatly improve the life of serious writers using Libreoffice.
Comment 1 Cor Nouws 2014-07-02 06:31:43 UTC
Thanks Stian for the request.
What a whole lot of words for such a simple idea ;)

Currently: Select/Copy/Paste special as text. Indeed, a bit more key strokes. 
Cheers,
Cor
Comment 2 Stian Øby Johansen 2014-07-02 06:41:02 UTC
Thanks for the prompt reply - and sorry if I wrote too much! Just wanted to state my case clearly, as I figured the chances of success would be better ;-)

Just tested your suggested workaround, and it did not work much better than the suggestion on the Zotero forums, which was to save as a word document and then open again in Libreoffice and save back to an ODT. Both have the disadvantage of not perfectly preserving formatting.

This was my experience with your suggested workaround, cut + paste special (Crtl+Shift+V):
- Paste as "Libreoffice Writer": Does not remove field codes at all (as should be expected)
- Paste as "Formatted text (RTF)": Best variant. Removes field codes and perserves formatting for e.g. ciations, but does change up some of my heading styles. In other words, not perfect, but an OK workaround.
- Paste as "HTML": A bit worse than the RTF paste option, as it changes the spacing between paragraphs and footnotes in my test documents. Does remove field codes nicely, though.
- Paste as "unformatted text": Removes all formatting, including the footnotes themselves - therefore useless for these purposes.


Thanks again for replying, and for your suggestion. It works as an barely sufficient(temporary) workaround, but we should also have the perfect solution: a Libreoffice feature :-)
Comment 3 Cosmin Saveanu 2015-01-21 10:33:49 UTC
Same problem here - it would be great to be able to remove field codes. As mentioned by Stian, no simple copy-paste solution works completely. My problem is also with references from Zotero, but also with cross-references which, sometimes do not translate well in an exported Word document.
Comment 4 Cor Nouws 2015-01-21 12:07:39 UTC
hmm, is it please possible to post a sample document, and maybe simple screen shot showing what is and should be going on :)

thanks a lot!
Cor


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.