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

Export to MS Office 2007 (.xml) - Author is Company #1497

Closed
mafanie opened this issue Jun 13, 2016 · 12 comments
Closed

Export to MS Office 2007 (.xml) - Author is Company #1497

mafanie opened this issue Jun 13, 2016 · 12 comments

Comments

@mafanie
Copy link

mafanie commented Jun 13, 2016

JabRef version 3.4 on Windows 10

When exporting to MS Office 2007 (.xml) names in curly braces should be treated as companies and exported as such.

In Section 2.3.3. of the manual of the biblatex package - which for me nowadays is the main reference of how to use bib files - it is given:
"Corporate authors and editors are given in the author or editor field, respectively. Note that they must be wrapped in an extra pair of curly braces to prevent data parsing from treating them as personal names which are to be dissected into their components."

MS Office also knows companies as authors and has the following syntax for it:

<b:Author>
    <b:Author>
        <b:Corporate>Basel Committee on Banking Supervision</b:Corporate>
    </b:Author>
</b:Author>

So it would be perfect if Jabref recognizes author names in curly braces and exports them as corporates.

At the moment one gets the following result:

<b:Author>
    <b:Author>
        <b:NameList>
            <b:Person>
                <b:Last>Supervision</b:Last>
                <b:Middle>Committee on Banking</b:Middle>
                <b:First>Basel</b:First>
            </b:Person>
        </b:NameList>
    </b:Author>
</b:Author>

This then results in MS Word in the same incorrect presentation you would see when inputting the name without curly braces in the bib file and using it in a normal (la)tex document (so for the examle you would have "Supervision, Committee on Banking" or "Supervision, C. o. B").

By the way, I want to thank you for the extremely fast resolving of my MS Office export problem last week (#1485) and it would be very nice if you can get this new problem solved as well. (In fact, if you can do it, then I would like to ask if you could include this in the same build as for the last week problem, so that I can test them both together.)

@stefan-kolb stefan-kolb self-assigned this Jun 13, 2016
@exch-0930
Copy link

I was just about to ask for the same thing. When I export "USDA-SCS Soil Tillage Lab", it gets rearranged. I have tried adding single and double curly braces and one or two commas before exporting to Word, but cannot find the right combination for a corporate author. Word 2013 has a checkbox for corporate author.
jabrefcorporateauthor
See image attached. Also, thanks for the DOI fix in 3.4 - works great and saves some time.

@oscargus
Copy link
Contributor

Some notes after solving #1499. One should parse the whole author field using AuthorList for each author one can then check if all parts but getLast() is null, the name is a corporate name. For PersonName it would make more sense to provide the last name (from getLastOnly() to include the von part) and the first names (from getFirst()) and then split the first name into First and Middle similar to how it is done now. The Jr. part I have no idea how to handle...

With the handling of PersonName as above, the complete corporate name will end up in last name, which if nothing else is better than the current result. Adding a proper Corporate will require changes in the XML definition and there I am lost...

@Siedlerchr
Copy link
Member

I will take a look at this together with #1750
A sample xml from word with corporate looks as following (Exported from Word 2013)

 <b:Source>
      <b:Tag>Jab16</b:Tag>
      <b:SourceType>ArticleInAPeriodical</b:SourceType>
      <b:Guid>{24FD8F69-D1DA-459D-A3F1-E604247A5F7F}</b:Guid>
      <b:Author>
         <b:Author>
            <b:Corporate>JabRef Developers</b:Corporate>
         </b:Author>
      </b:Author>
      <b:Title>JabRef</b:Title>
      <b:PeriodicalTitle>JabrefJorunal</b:PeriodicalTitle>
      <b:Year>2016</b:Year>
      <b:Month>08</b:Month>
      <b:Day>12</b:Day>
      <b:Pages>200-300</b:Pages>
   </b:Source>
</b:Sources>

@stefan-kolb stefan-kolb removed their assignment Sep 22, 2016
@mew1033
Copy link

mew1033 commented Mar 22, 2017

I just ran into this again today. Is this something that is/can be worked on?

@Siedlerchr
Copy link
Member

Hi I did not yet found time to look into that in detail, but I will look at this the next days
Is your PRoblem import related or export?
Export should export the company currently in the author field
Not sure about import

@mew1033
Copy link

mew1033 commented Mar 25, 2017

The problem I've got is with export. When I store the corporate author in JabRef, it looks like this:

@WWW{Truth,
  author      = {{Great Source of Truth}},
  title       = {About Us},
  date        = {n.d.},
}

So I would think that with the two sets of curly braces, JabRef would recognize it as a corporate author. However, when I export it as xml, the xml looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<b:Sources xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/bibliography" SelectedStyle="">
<b:Source>
<b:BIBTEX_Entry>www</b:BIBTEX_Entry>
<b:SourceType>Misc</b:SourceType>
<b:Title>About Us</b:Title>
<b:Author>
<b:Author>
<b:NameList>
<b:Person>
<b:Last>of Truth</b:Last>
<b:Middle>Source</b:Middle>
<b:First>Great</b:First>
</b:Person>
</b:NameList>
</b:Author>
</b:Author>
</b:Source>
</b:Sources>

Shouldn't it show the author as a corporate author?

@Siedlerchr
Copy link
Member

Siedlerchr commented Mar 25, 2017

@mew1033 Yes, you are right. I will try to fix that. Author should be then exported in the coropate author field

@mew1033
Copy link

mew1033 commented Mar 25, 2017

@Siedlerchr I went into word 2016 and edited the source and changed it to a corporate author. When I looked at the new XML, it looked like this:

<b:Source>
		<b:BIBTEX_Entry>www</b:BIBTEX_Entry>
		<b:SourceType>Misc</b:SourceType>
		<b:Title>About Us</b:Title>
		<b:Tag>Truth</b:Tag>
		<b:Author>
			<b:Author>
				<b:Corporate>Great Source of Truth</b:Corporate>
			</b:Author>
		</b:Author>
	</b:Source>
</b:Sources>

That looks like the template Word is looking for.

I don't know if this is related, but when I look at the source in JabRef, it doesn't show the author correctly in the "author/editor" column in the GUI. It shows "of Truth" as the author, as if JabRef is also processing the name wrong.

@koppor
Copy link
Member

koppor commented Mar 26, 2017

Side issue: @mew1033 (or @mafanie and @exch-0930) Could you improve http://help.jabref.org/en/MsOfficeBibFieldMapping? It seems that our help is not covering how to use it. This is better documented in the LibreOffice case: http://help.jabref.org/en/OpenOfficeIntegration

@Siedlerchr
Copy link
Member

@mafanie @mew1033 @exch-0930
I now added the export of corporate authors. You can try it out here:
http://builds.jabref.org/msofficeCorporate/

There is currently one limitation: It only works with a single corporate author in JabRef wrapped in curly braces, e.g.
{JabRef Developers}

@mew1033
Copy link

mew1033 commented Mar 29, 2017

@Siedlerchr It looks like it works. Thanks! Looks like #2688 hasn't been merged yet, but from what I can tell, it works.

tobiasdiez pushed a commit that referenced this issue Mar 30, 2017
* Export single corporate author to ms office xml
#1497

* Add test files for corporate Authors export

* Add changelog entry

* Improved author handling in MS-Office Import/Export
@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks!

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

9 participants