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

Biblatex Export to Word 2007 xml: date field is not exported #1750

Closed
sa3016 opened this Issue Aug 16, 2016 · 27 comments

Comments

Projects
None yet
9 participants
@sa3016

sa3016 commented Aug 16, 2016

JabRef 3.5 windows 10 10.0 amd64 Java 1.8.0_92

Jabref can import and recognize year of biblatex file, but cannot export xml 07 word format with year.

Steps to reproduce:

  1. prepare a biblatex file
  2. import it into Jabref
  3. export it as 07 word xml

I am asked to create an issue here. (http://discourse.jabref.org/t/export-bib-to-2007-office-xml/142)

@Siedlerchr Siedlerchr changed the title from year is not exported to Biblatex Export to Word 2007 xml year is not exported Aug 16, 2016

@Siedlerchr Siedlerchr changed the title from Biblatex Export to Word 2007 xml year is not exported to Biblatex Export to Word 2007 xml: year is not exported Aug 16, 2016

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 16, 2016

Thanks for your report! I tried with a recent 3.6 dev version and could not reproduce the behavior.
So i suggest, you should try again with the latest dev version from http://builds.jabref.org/master/

@mlep

This comment has been minimized.

Contributor

mlep commented Aug 16, 2016

I could reproduce this issue with the master build using the test BibLaTeX file http://mirrors.ctan.org/macros/latex/contrib/biblatex/bibtex/bib/biblatex/biblatex-examples.bib (file suggested in https://github.com/JabRef/jabref/wiki/BibTeX ).
In the xml file, most of entries do not have a year.

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 16, 2016

@mlep Then I maybe misunderstood sth:
If a year is set in the yearfield , then it is in the xml file. If it has a only a date field set, the date is not exported. If it has both fields set, then the year is exported correctly.

Check the example "he Importance of Being Earnest: A Trivial Comedy for Serious People
A possible workaround is to have both fields set.

@matthiasgeiger matthiasgeiger removed the windows label Aug 16, 2016

@mlep

This comment has been minimized.

Contributor

mlep commented Aug 16, 2016

My guess was: if there is information about the year in the BibLaTeX entry (in the field year or in the field date), this information should be found in the xml file.

Currently, because this filter exports the entries without this information, the xml file maybe, in practice, of limited use.

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 16, 2016

Okay, so I file this as a bug. Because in biblatex we have either date or year field as required. And when only date field is there, then the export does not export any year/date things

@Siedlerchr Siedlerchr changed the title from Biblatex Export to Word 2007 xml: year is not exported to Biblatex Export to Word 2007 xml: date field is not exported Aug 16, 2016

@Siedlerchr Siedlerchr added bug and removed waiting-for-feedback labels Aug 16, 2016

@oscargus

This comment has been minimized.

Contributor

oscargus commented Aug 16, 2016

Yes, we should add a mapping from date to year if there is no year field available.

@Siedlerchr Siedlerchr self-assigned this Aug 16, 2016

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 16, 2016

I will fix that

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 17, 2016

As part of the reworking in #1765 , I already fixed the exportation of the year.
@sa3016 @mlep Please try again with the newest version from here:
http://builds.jabref.org/office07/

If you notice any other things which look odd regarding the export, please report.

@mlep

This comment has been minimized.

Contributor

mlep commented Aug 17, 2016

Thanks for fixing the year. It works very well!

Other odd things (since you asked...):

  • fields journaltitle (should be treated the same as journal), volume and number are not exported.
  • LaTeX encoding (like {'e}) is exported as is.
@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 17, 2016

Thanks for the test. I will look into that the next days. I already noted that not all fields are exported correctly.
Things I am aware of:

@oscargus

This comment has been minimized.

Contributor

oscargus commented Aug 17, 2016

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 17, 2016

@oscargus I already used it for the year.

@Mattri

This comment has been minimized.

Mattri commented Aug 18, 2016

Another issue concerning MS Word 2007 XML-Export:

If you have a list of authors in BibTeX separated with lowercase "and", everything works well during export, i.e. first, middle and last names of authors are converted correctly. Yet, if "AND" in capital letters is applied as separation, the parsing does not work.

@Mattri

This comment has been minimized.

Mattri commented Aug 18, 2016

Is this a missing feature or bug in MS Word 2007 XML-Export?

In BibTeX there is the field "Language". In MS-Bib there is the tag <b:LCID>. From my point of view, the BibTeX-field is not yet considered in order to determine the correct language code in MS-Bib.

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 18, 2016

@Mattri Thanks for your report. Regarding the language field, there is already code for translating the lang field to LCID, but it may be not functioning correctly.

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 19, 2016

@Mattri Regarding the language mapping, I looked a bit deeper and think that we can not provide a complete mapping for all kind of languages, because the LCID Language codes are not easy translatable into the internally java used. Currently we only support English.

@mlep
I just fixed some more issues and field mappings. Not only for export, but for import, too.
Patent in MS Bib is imported as patent biblatex entry and the number field is put in the patent number.
Online gets exported as InternetSite and Electronic as electronic.
See #1765 for details. And when the tests after a commit are green, you can find a new version always here:
http://builds.jabref.org/office07/

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 20, 2016

Current status:

  • Author exporting as Corporate (there is an issue already for that)
    • Day/Month not exported Only Year and Month can be exported (or are extracted from the date field)
    • PatentNumber gets exported as issue: (http://discourse.jabref.org/t/customize-word-2007-xml-export-filter/149)
    • LaTeX encoding (like {'e}) is exported as is. Authors are now converted as unicode, too.
    • fields journaltitle (should be treated the same as journal), volume and number are not exported. - Issue, Volume, Number etc now work correctly. ~~
    • fRegarding number, I am not just sure to what I should map the number, and if I understand the BibLaTex-Manual correct:
    • And/and and author separator is case insensitive The and is now checked case insensitive.

The number of a journal or the volume/number of a book in a
series. See also issue as well as §§ 2.3.7 and 2.3.9

The field "Standardnumber" in Word is used for ISBN or MRN things.
It would be nice if someone of you could provide a sample @mlep @Mattri

@oscargus

This comment has been minimized.

Contributor

oscargus commented Aug 20, 2016

You may try BibUtils https://sourceforge.net/p/bibutils/home/Bibutils/ and see how/if it is mapped. (Unfortunately, the source seems hard to find...)

@mlep

This comment has been minimized.

Contributor

mlep commented Aug 22, 2016

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 22, 2016

Ah yes, I see that this is a BibTeX only thing http://www.cs.arizona.edu/~collberg/Teaching/07.231/BibTeX/bibtex.html , because both BibLaTeX and Word have an Issue, Volume and Edition field, DOI is an extra field, too.
I think, will check if the issue field is set and then otherwise use the value of number.

This is a sample I created in Word 2013:

 <b:Source>
      <b:Tag>TEs16</b:Tag>
      <b:SourceType>ArticleInAPeriodical</b:SourceType>
      <b:Guid>{F6051BB5-C1B9-4BD1-AF8A-0DD644853745}</b:Guid>
      <b:Title>Test Title</b:Title>
      <b:Year>2016</b:Year>
      <b:Publisher>Mein Verleger</b:Publisher>
      <b:JournalName>TEst Journal</b:JournalName>
      <b:Pages>27-38</b:Pages>
      <b:Author>
         <b:Author>
            <b:NameList>
               <b:Person>
                  <b:Last>TEst</b:Last>
                  <b:First>Test</b:First>
               </b:Person>
            </b:NameList>
         </b:Author>
         <b:Editor>
            <b:NameList>
               <b:Person>
                  <b:Last>Herausgeber</b:Last>
                  <b:First>Mein</b:First>
               </b:Person>
            </b:NameList>
         </b:Editor>
      </b:Author>
      <b:PeriodicalTitle>Test Journal</b:PeriodicalTitle>
      <b:Month>07</b:Month>
      <b:Day>03</b:Day>
      <b:Edition>Wochenende</b:Edition>
      <b:Volume>III</b:Volume>
      <b:Issue>12</b:Issue>
      <b:ShortTitle>Mein kurzer Titel</b:ShortTitle>
      <b:StandardNumber>12345567-13</b:StandardNumber>
      <b:Medium>Elektronisch</b:Medium>
   </b:Source>

@stefan-kolb stefan-kolb added this to the v3.7 milestone Aug 23, 2016

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Aug 25, 2016

Most fixes/features done in #1765. For the rest I will create a follow up issue.

@Siedlerchr Siedlerchr closed this Aug 25, 2016

@Siedlerchr Siedlerchr referenced this issue Aug 25, 2016

Closed

Ms Office 2007 xml Import/Export #1851

3 of 3 tasks complete
@spalc

This comment has been minimized.

spalc commented Jan 12, 2018

Hello,
Is there still work being done on MS Office 2007 xml import/export?
I note that the TRANSLATOR field is not included in the exported xml file. Would this be added?

Also I read about the possibility of export filters, however I have not been able to locate a set of .layout files for MS Office WORD. Could they be made available?

Thanks,
Stephen.

@Siedlerchr Siedlerchr referenced this issue Jan 12, 2018

Merged

Export translator field to msoffice 2007 xml #3632

4 of 6 tasks complete
@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Jan 12, 2018

@spalc Hi, I just created a fix which adds the field for export and import.
You can test this one here, or wait until #1851 is merged into the master and then use the latest snapshot
https://builds.jabref.org/office007translator/

Is there still work being done on MS Office 2007 xml import/export
Like any other feature: If you encounter a problem, bug or have an enhancement, just open an issue.
In this case, adding the field was one simple line of code.
Unfortunately, the MS Office Exporter and Importer is a bit more complicated, therefore there is not a way to use the layout files for this, especially the conversion of authors and dates into their corresponding fields it not trivial.

For your reference, you can find a complete overview of the field mapping between biblatex and msoffice xml here in the help:
https://help.jabref.org/en/MsOfficeBibFieldMapping

@spalc

This comment has been minimized.

spalc commented Jan 14, 2018

Hi Christoph,
Many thanks for your action and reply. I will test the fix for TRANSLATOR.
I have just started to try out Jabref and I like the interface.

I took a look at the field mapping between biblatex and ms office xml and ran a few tests.
Regarding the treatment of the Jabref address field, I note that when an address like "New York" is used on its own as city the xml export module treats "New" as city and "York" as StateProvince. If there is no comma separating the elements of the address field it would be better if the address field, even if it contains several words, is treated as "only city". If the contents are separated by commas then the address field should be broken down into distinct xml Word fields (City, StateProvince, CountryRegion).

I will continue to explore the tool and let you know if I have other suggestions.
Stephen.

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Jan 14, 2018

Hi,
thanks for the feedback!
Regarding the address field and other potential improvements, it would ne nice if you could just open new specific issue to make it easier to track the features/bugs and the code fixes

@Siedlerchr

This comment has been minimized.

Contributor

Siedlerchr commented Jan 14, 2018

I just accidentally pushed directly to the master 🤦‍♂️. so the address fix and the translator fix are now both in the latest master. https://builds.jabref.org/master/

@spalc

This comment has been minimized.

spalc commented Jan 17, 2018

Thanks Christoph.
I installed 4.2 and tested translator and address. Both work fine. Great work.
Will open a new specific issue for other fixes&features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment