Bug 80786 - Feature request: Function to remove field codes, turning all fields into plain text
Summary: Feature request: Function to remove field codes, turning all fields into plai...
Status: RESOLVED DUPLICATE of bug 45946
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2014-07-02 05:15 UTC by Stian Øby Johansen
Modified: 2022-06-23 19:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document with Zotero citations (46.48 KB, application/vnd.oasis.opendocument.text)
2015-02-11 12:03 UTC, Stian Øby Johansen
Details

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 5 Stian Øby Johansen 2015-02-11 12:03:07 UTC
Created attachment 113308 [details]
Example document with Zotero citations

Since an example document was requested, here I have provided one. For further explanation, see the original bug description, comment #2, and the bolded text in the example document.
Comment 6 robert.funnell 2019-05-12 15:48:22 UTC
Although I've also had this problem with Zotero citations, I'd like to emphasize that the problem also arises with numbering fields for figures, equations etc. Since there may be _many_ such fields that need to be converted to plain text for final submission of a document, the statement (Comment 1) that the Select/Copy/Paste work-around means 'a bit more key strokes' greatly understates the problem even when special formatting isn't required.
This may not be the right place, but I'd also like to mention that the statement that such a feature doesn't exist was removed from the Writer Guide between the version for LO 4 and the version for LO 5. It's important that such a statement remain in the Guide as long as the feature doesn't exist, so users don't keep hunting in vain.
Comment 7 Troy Rollo 2019-11-21 22:45:51 UTC
This is an important feature for professional uses of LibreOffice, and one that is fairly easily implemented. Taking it on with a target to complete by end January.
Comment 8 Xisco Faulí 2021-02-09 14:06:20 UTC
Dear Troy Rollo,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 9 Mike Kaganski 2022-05-05 04:28:38 UTC

*** This bug has been marked as a duplicate of bug 45946 ***
Comment 10 mllcorreo-canna 2022-06-23 19:48:17 UTC
I would like to voice my support for this feature request. I am new to LibreOffice and I am very surprised that this feature is missing. In my case my input fields we created in Word with the Mendeley plug-in, but in the near future I am ditching Mendeley for Zotero, since Mendeley doesn't support LibreOffice (plus many other reasons)

As others have said, this feature is absolutely necessary for anyone working with the intent of publishing, including scientific articles. Since many scientists are strong supporters of open-source software, I expected they are an important constituent of LibreOffice users.

Thanks!