Skip to content

Fix export of corporate author to MSOffice#4337

Merged
Siedlerchr merged 2 commits into
masterfrom
fixmsoffice
Sep 13, 2018
Merged

Fix export of corporate author to MSOffice#4337
Siedlerchr merged 2 commits into
masterfrom
fixmsoffice

Conversation

@Siedlerchr

Copy link
Copy Markdown
Member

Fix tests
Fix #4329

The underlying problem is the same as in #4152
However, I came up with a workaround for MSOffice.

  1. Getting the original field
  2. Check for corporate author (braces start and end)
  3. get latex free value
  4. Readd braces for corporate
  5. Parse author

The only edgecase which can occur if the entry starts with an author in latex braces and ends with an author in latex braces. That one will probably be interpreted as corporate.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Sep 12, 2018

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that solution is clearly a hack but one that works (in simple situations). It would be way better to include corporation parsing to the author parser. The Office export is not the only situation where we need this information (e.g. main table display). But since a proper solution requires substantial refactoring (e.g. introduction of Person and Corporation deriving from Author), I'm fine with merging this PR. But please add a TODO comment explaining that this is an ugly workaround...

@Siedlerchr

Siedlerchr commented Sep 12, 2018

Copy link
Copy Markdown
Member Author

The author parser is not the problem, as long as the braces are present corporate authors are detected and correctly recognized.

it's the latex to Unicode converter who kills the braces from corporate authors. This is the core problem. See other linked issue.
And I currently see no easy way to either distinguish latex macros and corporate braces.

@Siedlerchr Siedlerchr merged commit b991648 into master Sep 13, 2018
@Siedlerchr Siedlerchr deleted the fixmsoffice branch September 13, 2018 09:50
Siedlerchr added a commit that referenced this pull request Sep 13, 2018
* upstream/master:
  Fix export of corporate author to MSOffice (#4337)
  Added new keyboard shortcut "ctrl+E" for closing the entry editor. (#4222) (#4338)
  Remove GlobalFocusListener and old TextField entry editor (#4336)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants