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

Ms Office 2007 xml Import/Export #1851

Closed
3 tasks done
Siedlerchr opened this issue Aug 25, 2016 · 14 comments
Closed
3 tasks done

Ms Office 2007 xml Import/Export #1851

Siedlerchr opened this issue Aug 25, 2016 · 14 comments
Assignees

Comments

@Siedlerchr
Copy link
Member

Siedlerchr commented Aug 25, 2016

Follow up from #1750 and #1765

TODO:

@Mattri
Copy link

Mattri commented Sep 2, 2016

Hello Christoph,

in the meantime, I've been testing MS Office 2007 XML export of version 3.6. Integration of custom entry types as <b:BIBTEX_entry> seems to be a good idea and can be used for generating appropriate citations in Word. I noticed one more problem, though: the "Location"-field of BibTex is not exported correctly. Say, you have set "Location" to "Berlin". Then, in the MS-Bib XML this is converted to

<b:City>Berl</b:City>
<b:StateProvince>i</b:StateProvince>
<b:CountryRegion>n</b:CountryRegion>

@Siedlerchr
Copy link
Member Author

Hello Mattri,
thanks for your report! I will check it.
Integration of custom entry types as <b:BIBTEX_entry> seems to be a good idea
Yeah, I thought the same and theoretically it should already be there, because the field is just calling entry.getType() But I will check for custom entry types,too.

In the meantime I created a help page with all entry and field mappings between JabRef and MsOffice.
It is not yet public, but I will try to get it done this afternoon/evening.

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Sep 2, 2016

@Mattri I fixed the location bug. When only one "word" is present (e.g. Berlin) it is treated as city.
And also the location Stroudsburg, PA, USA is splitted correctly in City, StateProvince, CountryRegion

Theoretically the build from #1909 should have been on http://builds.jabref.org/ but there seems to be an issue with the builds...

@Siedlerchr
Copy link
Member Author

@Mattri I just merged the fix for the location export bug. You soon could try the latest master from here:
http://builds.jabref.org/master/

@Siedlerchr
Copy link
Member Author

@Mattri I just tested to export a custom entry type. The entrytype is corectly set in the
<b:BIBTEX_entry> field
And in the xml file:

<b:Source>
<b:Year>2016</b:Year>
<b:BIBTEX_Entry>mycustomentrytype</b:BIBTEX_Entry>
<b:SourceType>Misc</b:SourceType>
<b:Tag>CustomAuthor2016</b:Tag>

Sample Bib file:
CustomEntryType.bib.txt

@Mattri
Copy link

Mattri commented Sep 5, 2016

@Siedlerchr I tried the dev snapshot. However, the .exe throws a Java-Error during initialization. I ran the .jar and did the MS-Bib Export. The issue with broken exports of "Location" is still there, works only randomly, e.g. "Södertälje" is exported correctly, while "Tokyo" isn't.

@Siedlerchr
Copy link
Member Author

@Mattri I just see that the master build did not get updated correctly (still from 02.09). I will build an upload it manualy

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Sep 5, 2016

@Mattri I just uploaded the most recent version to my personal cloud
https://siedlerchr.owncube.com/index.php/s/NaXpmdT0ZatFD5H

Edit// Help page is now accesible:
http://help.jabref.org/en/MsOfficeBibFieldMapping

@Siedlerchr Siedlerchr reopened this Sep 5, 2016
@Siedlerchr Siedlerchr self-assigned this Sep 5, 2016
@Mattri
Copy link

Mattri commented Sep 6, 2016

@Siedlerchr thanks for the fixed version. There are a few more issues from my side: since I organize my references with custom entry types (necessary corporate rules) source type is set to "Misc" for all of my entries with "BIBTEX_Entry" added for the custom entry type. This is OK. However, some fields are ignored and do not show up in the MS-Bib-XML. For example, I use a custom type for reports which includes a field "key". This tag is not exported. Same thing with a custom patent-like type containing the field "number".
Would it be possible for the source type "Misc" to treat every field encountered in the *.bib-file, export it to an appropriate MSBib-XML-tag OR apply <b:BIBTEX_myfield>. In any case, fields should not be omitted

@Siedlerchr
Copy link
Member Author

Yeah, that should be possible. If you could provide me some sample bib file (if you do not want it public here, send it to [email protected]), I wil test it and check the possibilites.

@Mattri
Copy link

Mattri commented Sep 6, 2016

I generated a sample file containing a set of custom entry types. All fields should be exported

sample_file_Mattri.zip

@Siedlerchr
Copy link
Member Author

Siedlerchr commented Sep 7, 2016

@Mattri I just fixed the problems with the key and the number export. Key is now exported as <b:BIBTEX_Key> . Number gets exported as numberfield if the entry type is not patent and the field issue is not present.

Edit// You can download it from the link I posted above. The new version should have a created date from today.

In the meantime I would like you to check if all fields are listed here in the help file (except the things mentioned above).
http://help.jabref.org/en/MsOfficeBibFieldMapping

I will check further if it possible to export all fields which are not yet present in the manual mapping.

@mew1033
Copy link

mew1033 commented Mar 22, 2017

@Siedlerchr I'm running into the problem with corporate authors not being parsed correctly. Is there anything I can do to get that working? I've got sample .bib and .xml files if needed.

@PeterMinin
Copy link

Regarding LCID, the current default value of 0 does not seem to correspond to English, neither by the docs (which don't list a 0x0000 value at all), nor in practise (Word imports such entries with the language set to Default). Shouldn't the default value be changed to 1033 (0x0409)?

Siedlerchr added a commit that referenced this issue Feb 7, 2018
* upstream/master: (47 commits)
  Fix Google Scholar fetcher
  Use english for all LCID mappings #1851
  remove import preferences test mock import and convert to junit5
  fix #3693 (#3702)
  Fix space leads to jump in entry editor (#3699)
  Fix #3669
  Extract creation of the contents of FileAnnotationTabController
  Fix changelog
  Fix NPE
  Remove unnecessary file
  use processbuilder for calling external apps
  Fix color highlight of odd linked files
  Fixes #2964
  Fix koppor issues #3
  Allow spaces in DOIs
  Remove irrelevant log messages during XMP reading
  Adapt log4j configuration for cleaner junit tests #3511
  Eclipse Django style #3655
  Better code style for chained methods
  Update build.gradle
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants