Skip to content

Add "Add Braces" Formatter#4043

Merged
koppor merged 3 commits into
masterfrom
feature/title-enclosing
May 23, 2018
Merged

Add "Add Braces" Formatter#4043
koppor merged 3 commits into
masterfrom
feature/title-enclosing

Conversation

@koppor

@koppor koppor commented May 21, 2018

Copy link
Copy Markdown
Member

In the context using Springer's default bst file, the "title casing" feature of BibTeX is not desired. When working with persons quickly creating their bibliography, the solution is to put {} around the title field. Up to now, JabRef supports the inverse feature by the RemoveBracesFormatter. This PR adds the AddBracesFormatter. I am very aware that the other formatters such as our org.jabref.logic.formatter.casechanger.ProtectTermsFormatter. However, that formatter relies on a fixed list of terms, whereas this AddBracesFormater "just works" (under some assumptions).


  • 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?)

@koppor koppor force-pushed the feature/title-enclosing branch from 3f135be to e99127f Compare May 21, 2018 12:20
@Siedlerchr

Copy link
Copy Markdown
Member

You can directly use right click option -> Add braces around selected word

@koppor koppor force-pushed the feature/title-enclosing branch from e99127f to e312135 Compare May 21, 2018 12:29
@Siedlerchr

Copy link
Copy Markdown
Member

What happens to latex encoded titles? .e.g If i have some Unicode latex stuff in there

@koppor

koppor commented May 21, 2018

Copy link
Copy Markdown
Member Author

I agree. This PR helps in updating a complete BibTeX database with more than 100 entries. I could go manually through it and tell others to do the same. However, I like automating things. This option offers a functionality requested to me multiple times by different persons. I could also explain the protected terms thing, but I do not want to force people to use JabRef in a certain way if there is an easy other way.

@koppor

koppor commented May 21, 2018

Copy link
Copy Markdown
Member Author

In the default configuration, the formatter runs as last. Thus, the protection functionality comes at last. I tried it out:

grafik

title = {Än interesting Historüüü}

becomes

title = {{{{\"{A}}}n interesting Histor{\"{u}}{\"{u}}{\"{u}}}

Without the new formatter:

title = {{{\"{A}}}n interesing Histor{\"{u}}{\"{u}}{\"{u}}}

@Siedlerchr

Copy link
Copy Markdown
Member

Okay good! From my point of view good

@koppor koppor force-pushed the feature/title-enclosing branch from e312135 to 6a0739b Compare May 21, 2018 13:08
@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 21, 2018
@tobiasdiez

Copy link
Copy Markdown
Member

It is usually recommended to only "protect" acronyms or proper names and leave the rest to the citation style. In the bibtex world, the citation style decides the general casing of content words. Thus, I'm not sure if we should add a formatter that encourages the non-standard approach.

@koppor

koppor commented May 22, 2018

Copy link
Copy Markdown
Member Author

I do not want to train 90% of the people to do the right thing we believe in. Sometimes, I just want to get a paper finished to the deadline and not spending time educating people in BibTeX. 😇 We could add a warning in the documentation to encourage other behavior.

Other stream of argumentation: None of us found time to work on the ProtectedTermsFormatter to include more words. This PR is a work around. 😇

@koppor koppor merged commit b479c92 into master May 23, 2018
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 23, 2018
@stefan-kolb stefan-kolb deleted the feature/title-enclosing branch May 25, 2018 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants