How to use the 'First Author's last name' *only* in output style (No such field found)

Hello,

I’m exporting my endnote references to a bibtex format, which works with Bibtex Export, but :

I’d like the first line of each reference to show ‘First Author’s last name’ ‘Year’ ‘Record Number’ (to be used a a key)

By editing the BibTex Export ouput style template through

Edit > Output styles > BibTex Export > Bibliography > Template,

I’m able to to close to what I want with

@article{Author Year Record Number,

'author = ’ {Author},

… }

However, this results in an output showing *all* Authors in the first line. (eg : Abel, K. M. and Allin, M. P. … 2003 137)

Is there a way to refer to the last name of the first author only to get a clean output for the first line (ie : Abel 2003 137), while retaining all authors for the second line 'author = {Abel, K. M. and Allin, M. P. …}

Is there a special field name or syntax to get the first author’s last name only ?

Alex

You can parse-out the first author into a separate custom field* by using EndNote’s Change/Move/Copy Fields feature (see image 2 which shows the first author in it’s own field). But before proceeding, make a back-up copy of your EndNote library because if you happen to set-up the “Copy” parameters incorrectly then click OK there’s no way to undo the changes.

\ *Note : This example uses the custom field named “Custom 8” and assumes that the field is not being used in any of the assorted reference types (e.g., Journal Article, Book, etc.).  Copying will overwrite whatever information currently stored in the Custom 8 field so you may want to check to see this field can be used.

  1. With a backup copy of your library opened, go to the EndNote toolbar, select Tools > Change/Move/Copy Fields.

  2. In the Change/Move/Copy Fields dialog box (see image 1) click to select the “Move/Copy Fields” tab.

    a.Click to select “Copy Field”.

    b. Click the pulldown menus to set the copy from the Author field into a custom field (Custom 8).

    c. Click to select “Replace Entire Field.

  1. Click OK. A message appears warning the change cannot be undone. Click OK.

See image 2 for the result. To export the first author just edit the EndNote Bib Text output style template by replacing “Author” with “Custom 8”.
Image1_Copy Fields.gif

It seems including initials might be helpful especially in circumstances where different authors share the last name, however, yes, it’s possible to extract just the last name of the first author (see Image 3 for result). The trick is to use both an output style file (to export the EndNote records in a horizontal .txt format with “tags” to facilitate importing) and an import filter to read-in .txt file and parse just the last name of the first author when importing the records into a new EndNote library.  The resulting .txt file after exporting also requires some minor clean-up before importing.

There are some caveats to the process:

  1. It’s time-consuming. Templates specific to each reference type (e.g., Journal Article, Book, Book Section, etc.) must be constructed for both the output style and import filter files.

  2. The export/import process focuses on working with one group of reference types at a time (e.g., Journal Article, Book, Book Section, etc.).

  3. Importing the records into a new EndNote library results in each reference being assigned a new record number.

But if you’re still interested, here’s an illustration of the process using the Journal Article references and the Custom 8 field. (You could use an alternate field but the key issue is that it isn’t used by any of the reference types that will be exported/imported and Custom 8 seems to be a safe one to use.)

PROCEDURE

1. **Create the bibliographic template in the output style  (see Image 1, “A”).  **A Journal Article bibliographic template was created for an output style file (output style file provided in second posting).

   a. Note that a 5-character field precedes the EndNote field name. The 5-character field serves as a “tag” and includes delimiters (slash, colon, space) which are needed for Step 3.

   b. Each “tag” corresponds to an EndNote field used in the Journal Article reference type. Refer to the EndNote manual for a list of the reference types and field names. For this example, we’ll designate a second field (“\C8 “) to duplicate the author(s) shown in the Author field.  

   c. The Author Lists and Author Name settings were adjusted to: 1)  insert two semicolons between multiple authors. (the semicolons act as delimiters which are needed for Step 3); and 2) list authors in last-name, first-name (initial) order.

2. Search for references and export them as  .txt file. In your EndNote library, search for all journal article references then use the modified output style to export the references as a .txt file (output style file provided in second posting).

3. Clean-up the .txt file (see Image 2). The .txt file needs to be “cleaned up” prior to importing so open the .txt file in MS Word and perform the following search-and-replace (see Image 2):

   a. Search for ;; and replace with ^p\AU:

       Note: This repositions each author (in the case of multiple authors) on a separate line.

   b. Search for : / and replace with : ^p/

       Note: When the EndNote field is empty/blank the tags will tend to “run together’. This action repositions each tag and corresponding field on a separate line.

Re-save the .txt file (or save it as a new file).

 

4. Create the template in the import filter (see Image 1, “B”). Use the same tags and fields in the output style filecreate the Journal Article template (import filter). (Import filter file provided in second posting.)  Note that:

   a. Tags/fields which do not need to be imported into EndNote can be set to: {IGNORE]}

   b. Parsing out the last name of  the first author is achieved by designating the Field(s) as: Custom 8,     (The comma instructs EndNote that of the author names in the “\C8: “ field to import only the data up to the first comma that occurs– which happens to be the last name of the first author.)

The final imported result is shown in Image 3.  When exporting into Bib Tex, use “Custom 8” to designate the last name of the first author:

@article{ Custom 8 Year Record Number,

'author = ’ {Author},

… }



Here are the output style file and the import filter files used in the example from my prior posting.
Export Fields by Row.ens (16.6 KB)
ImportFilter_1st Author-Lastname.enf (1.17 KB)

This is exactly the problem that I have today with EndNote X7.2. I was hoping that the construction of a nice BibTex tag had become a standard feature by now, but that does not seem to be the case.

EndNote knows how to make all sorts of references, and therefore I expect the necessary subroutines to be already available hidden somewhere inside its source code. If the user would be able to use some sort of reg-exp expression, in combination with sub-fields of the available fields in “Change/Move/Copy fields”, then the problem would be solved. JabRef has this feature, but I would prefer a ‘native’ EndNote solution.

Is there any chance that the generation of a proper BibTex tag along the line given in this discussion, with some flexibility to accommodate differences in user preferences, will become a standard feature in EndNote? Please?

1 Like

I stumbled across this thread searching for a similar way to automatically define labels. Your solution works quite well, thank you! The only downside is that the authors (except the first author) are duplicated by the import process (as can be seen in your final result image #3). Is there a quick way to ged rid of duplicate authors afterwards?