3

I have searched on an answer to this question and have not yet found an answer.

Is there a way to export a .bib file from Mendeley which does not include the abstracts.

Manually removing abstracts from a bibtex file which have over 150 citations seems like a bad way to spend an evening!

7
  • 3
    Is the abstract field appearing in your bibliography? You can remove it automatically at compile time with biblatex. Please edit your question and add a full MWEB – David Purton Jan 15 '18 at 23:10
  • @PhelypeOleinik This is not a good idea. What if you have the word 'abstract' anywhere in a title? – Alan Munn Jan 16 '18 at 1:08
  • @AlanMunn Whoops. Wrong substitution indeed... It should be sed -i '/^\s*abstract/ d file.bib to remove only lines that start with abstract, ignoring leading spaces. I have never seen a bibliography style that prints the abstract, so the OP may wish to simply delete the abstract entries from the file. I under the need, some editors misbehave with very long lines. And I don't know of a Mendeley feature that allows to do what he wants... – Phelype Oleinik Jan 16 '18 at 1:21
  • This is question is not about biblatex in particular, so I have removed the tag. It would be possible to process an exported file with abstract fields with Biber to remove those fields. Would that be OK? – moewe Jan 16 '18 at 16:40
  • 1
    Possible duplicate: Remove abstracts from .bib? You could also use Biber's tool mode to do something similar. – moewe Jan 16 '18 at 16:42
7

You can use Biber's tool mode to remove the abstract field from a .bib file.

Place

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <output_align>true</output_align>
  <output_fieldcase>lower</output_fieldcase>
  <sourcemap>
    <maps datatype="bibtex" level="user">
      <map>
        <map_step map_field_set="abstract" map_null="1"/>
      </map>
    </maps>
  </sourcemap>
</config>

in a file called remabs.conf into the same directory as your .bib file.

Then call Biber with

biber --tool --configfile=remabs.conf <yourbibfile.bib>

If

@book{elk,
  author = {Anne Elk},
  title = {On the Theory of Brontosauruses},
  subtitle = {Really Interesting Dinosaurs},
  date = {1970},
  publisher = {Monthy Press},
  location = {London},
  abstract = {Brontosauruses were huge beasts.},
}

is saved as elk.bib, the call biber --tool --configfile=remabs.conf elk.bib will result in a file called elk_bibertool.bib with the contents

@book{elk,
  author    = {Elk, Anne},
  location  = {London},
  publisher = {Monthy Press},
  date      = {1970},
  subtitle  = {Really Interesting Dinosaurs},
  title     = {On the Theory of Brontosauruses},
}

being placed in the same directory.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.