Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Name Formatters are not found #3531

Closed
1 task done
HVGJoBa opened this issue Dec 14, 2017 · 7 comments
Closed
1 task done

Custom Name Formatters are not found #3531

HVGJoBa opened this issue Dec 14, 2017 · 7 comments
Labels
export / save status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@HVGJoBa
Copy link

HVGJoBa commented Dec 14, 2017

JabRef version JabRef 4.1-dev--snapshot--2017-12-08--master--6f39151a7 on Windows 7x64 with Java jre1.8.0_151

Steps to reproduce:

  1. A custom layoutfile (datacite.layout) was created and placed in the JabRef folder (according to http://help.jabref.org/en/CustomExports)
  2. A new custom export filter (DCX) was declared referencing the layoutfile above.
  3. An export war created calling java.exe -jar JabRef--master--latest.jar -n -o D:\test.xml,DCX D:\Test.bib
  4. Up to this point everthing works as expected
  5. The custom layoutfile was modified now using a custom name formatter called DCA (according to http://help.jabref.org/en/CustomExports)
  6. The custom name formatter was defined via Preferences->Name Formatter
  7. Now the execution of the same export ends with the error
    [AWT-EventQueue-0] WARN org.jabref.logic.exporter.ExportFormat - the following formatters could not be found: DCA
    The created output file shows before every author [Formatter not found: DCA]
    The same result is received using the GUI via File -> Export
    With JabRef Verion 2.9 this was never a problem.

Details
layoutfile datacite.layout contains only the following line causing the error
\format[DCA]{\author}

The name formater too is absolutely simple
Formater Name = DCA
Format string = {ll}, {f.}

@lenhard
Copy link
Member

lenhard commented Jan 2, 2018

Thanks for reporting! The syntax for custom formatters has changed to more consistent within JabRef. Have a look this link which roughly describes your use case http://discourse.jabref.org/t/file-rename-feature-broken-in-4-1/982/2

When you adapt the syntax, hopefully your workflow works again.

@lenhard lenhard added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Jan 2, 2018
@lenhard
Copy link
Member

lenhard commented Feb 6, 2018

Closing this due to inactivity. Feel free to reopen if the issue persists.

@lenhard lenhard closed this as completed Feb 6, 2018
@watanabe-j
Copy link

Hi,
Sorry for posting to this closed issue. I've been experiencing a similar problem to that of HVGJoBa: custom name formatters don't work when attempting to use them in custom export filters.

To me, it is not obvious how the link lenhard provided works for the custom export filters. If that is the case, does it mean the online documentation on the feature is completely outdated? This does not seem to be true; everything else apparently works fine, except for specifying custom name formatters.

I've experienced the problem with versions 3.8.2 and 4.3.1 on Windows 7 and 10 (64 bit). The syntax works on version 2.7 on the same devices.

@tobiasdiez
Copy link
Member

I'm somewhat confused by the documentation and the actual code. Can you please post the example that works in 2.7 but fails in the later versions. Thanks.

@watanabe-j
Copy link

watanabe-j commented Apr 3, 2019

Thanks for quick response, and sorry if my documentation was confusing.
I'm using the GUI, trying to set a custom export filter with a custom name formatter. Here's an example, slightly modified from that specified by HVGJoBa:

  1. Create a layout file ("datacite.layout", say), whose content is \format[DCA]{\author}. [with a return at the end]
  2. Define a custom export filter with the file (Options > Manage custom exports > Add new > {Export name: datacite, Main layout file: "..\datacite.layout", File extension: .txt})
  3. Define a custom name formatter (Options > Preferences > Name formatter > {Formatter name: DCA, Format string: *@1@{ll}{, f.}@*@, {ll}{, f.}})
  4. Export a database with the custom export filter just defined (File > Export > {File name: anything, Files of type: datacite (*.txt)})

This procedure works in 2.7, and the exported file should contain a list of formatted author names (provided they exist). When running this in 3.8.2 or 4.3.1, the exported file contains strings "[Formatter not found: DCA]", and the author names are not formatted.

Also, a custom name formatter specified as above could be used in entry preview (Options > Preferences > Entry preview) in 2.7, but cannot in the newer versions.

I hope the above makes some sense. Thank you.
(I know I don't need the feature for such a simple format, but I often work with more complex cases, such as Jr., III., or the like.)

tobiasdiez added a commit that referenced this issue Apr 3, 2019
tobiasdiez added a commit that referenced this issue Apr 4, 2019
@tobiasdiez
Copy link
Member

Thanks for the detailed description. I was not confused by your report but by our documentation. For example, I couldn't find out how to specify the custom name formatter. It would be very helpful if you could improve the documentation in this regard (e.g. by adding the above steps). Just edit the file directly at https://github.com/JabRef/help.jabref.org/edit/gh-pages/en/CustomExports.md .

The bug should be fixed now in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

@Moriaty0o0
Copy link

Thanks for the detailed description. I was not confused by your report but by our documentation. For example, I couldn't find out how to specify the custom name formatter. It would be very helpful if you could improve the documentation in this regard (e.g. by adding the above steps). Just edit the file directly at https://github.com/JabRef/help.jabref.org/edit/gh-pages/en/CustomExports.md .

The bug should be fixed now in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

i find the bug in preview with JabRef 5.0--2020-03-06--2e6f433 on windows:
Comment: [Formatter not found: Markdown]

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
export / save status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
Archived in project
Development

No branches or pull requests

5 participants