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

Update citationkeypatterns.md #312

Merged
merged 37 commits into from
Oct 22, 2020
Merged

Conversation

k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

  • Removes dots after list items. Their use was inconsistent.
  • Clarifications to the regex modifier, authIniN and edtrIniN.
  • Adds a short section on using InternalField/StandardField/SpecialField/IEEEField.

* Removes dots after list items. Their use was inconsistent.
* Clarifications to the regex modifier, authIniN and edtrIniN.
* Adds a short section on using InternalField/StandardField/SpecialField/IEEEField.
@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 marked this pull request as draft September 25, 2020 20:14
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

I was thinking I'd make a sweep over the "special field markers" and "modifiers" and add/change/remove as needed aiming at closing #179, at least temporarily. I just cannot do it in one go.

@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 changed the title Update citationkeypatterns.md [WIP] Update citationkeypatterns.md Sep 25, 2020
@Siedlerchr
Copy link
Member

Thanks for taking on that issue. Tell us if we can help somehow

Copy link
Contributor

@mlep mlep left a comment

Choose a reason for hiding this comment

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

en/setup/citationkeypatterns.md Outdated Show resolved Hide resolved
en/setup/citationkeypatterns.md Show resolved Hide resolved
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

Hey @mlep ! I appreciate the feedback.
I think I need to read up a bit more before I answer these points, when you want me to include that example, are you referring to how RegExpBasedFileFinder is used and would you like it to be included in the help file?

Something analogous to having a help document exclusively for the bracketed expressions?

@mlep
Copy link
Contributor

mlep commented Sep 29, 2020

Hey @mlep ! I appreciate the feedback.
I think I need to read up a bit more before I answer these points, when you want me to include that example, are you referring to how RegExpBasedFileFinder is used and would you like it to be included in the help file?

Sorry for being unclear. I was thinking about adding the following case to the help file (a user noticed in was not in the help file, although it was useful):
To search for years between 2005 and 2011: year == 200[5-9]|201[0-1]
200[5-9] specifies years 2005 to 2009.
| means or
201[0-1] specifies years 2010 to 2011.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

That example should probably be added in search.md and not in citationkeypatterns.md? I can take a look at it later, but right now I am just trying to edit the citation key patterns as those are what I have the most experience with.

@mlep
Copy link
Contributor

mlep commented Sep 29, 2020

That example should probably be added in search.md and not in citationkeypatterns.md? I can take a look at it later, but right now I am just trying to edit the citation key patterns as those are what I have the most experience with.

Oh yes, you are right. Please, discard my suggestion!

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

  1. After looking through Formatters.java there isn't any that I'd like to include that isn't already listed. I don't think it is a good idea that the LatexToUnicodeFormatter and UnicodeToLatexFormatter are more widely used since the behaviour of the "special field markers" are inconsistent (some attempt to remove latex, some remove spaces, and some do neither).

  2. I'd argue this fixes Update modifiers in bibtex key pattern #179 until more modifiers/special keywords are added?

@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 changed the title [WIP] Update citationkeypatterns.md Update citationkeypatterns.md Sep 29, 2020
@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 marked this pull request as ready for review September 29, 2020 20:01
@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 marked this pull request as draft September 30, 2020 14:45
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

illegal characters, that are disallowed are in the source.
all other characters can now be user defined ("Remove the following characters")

For reference was done in JabRef/jabref#6300

@Siedlerchr great and thank you for the reference! I'll update the "How to configure section",

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

Is there some way for me to make the previews of the "updated" screenshots on GitHub easier for reviewers?

I have tried to follow the naming-scheme in the folder and left the old images alone.

@koppor
Copy link
Member

koppor commented Oct 4, 2020

@k3KAW8Pnf7mkmdSMPHz27 Not sure what you mean. I always view the markdown file on GitHub. In this case: https://github.com/k3KAW8Pnf7mkmdSMPHz27/user-documentation/blob/patch-2/en/setup/citationkeypatterns.md

Regarding the "naming-scheme", the numbers at the end of a file name ( (3).png) are created by GitBook and should not be there at all...

You can replace the old screenshots. Otherwise, it gets hard for us (me ^^) to decide whether .png, (3).png, ... is the most recent file.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

@k3KAW8Pnf7mkmdSMPHz27 Not sure what you mean. I always view the markdown file on GitHub. In this case: https://github.com/k3KAW8Pnf7mkmdSMPHz27/user-documentation/blob/patch-2/en/setup/citationkeypatterns.md

Ah, nice. Sorry about the confusion. I have been using the "rich diff" https://github.com/JabRef/user-documentation/pull/312/files?short_path=4b29b5e#diff-4b29b5ebf73395e336a4707100425449 and the new images does not load there.

Regarding the "naming-scheme", the numbers at the end of a file name ( (3).png) are created by GitBook and should not be there at all...

You can replace the old screenshots. Otherwise, it gets hard for us (me ^^) to decide whether .png, (3).png, ... is the most recent file.

Oups X)
Sorry about that, I'll look at fixing it! =/

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

@Siedlerchr thank you for bringing issue #7012 to my attention!

Should it be a documented feature that the field markers perform a comparison ignoring case?

  • [title] applies camel case and attempts to remove latex formatting (i.e., "special field marker")
  • [TITLE] does not, it matches the BibEntry field

On an almost related note, I wanted to make a more advanced example, but I think I ended up with something that is too convoluted and I'd appreciate feedback.
[auth1_2][auth2_2][auth3_2]-[title:regex("[aeiouyw]", "")]
In a nutshell, the example should

  1. Take the first 2 letters of the first 3 authors names (highlighting that brackets addressing something that does not exist resolves to "", based on https://discourse.jabref.org/t/customising-key-patterns-for-citation-keys/2310)
  2. Includes a - which must be removed from unwanted characters, based on Remove dash from illegal characters. jabref#6300
  3. Basic disemvoweling of non-capital letters to shorten the title
  4. Use the regex replacement (?<=.{11}+).+ in preferences to cap the length of the citation key, based on https://discourse.jabref.org/t/maximum-length-for-bibtex-key/1520
  5. Since the citation key is somewhat likely to contain duplicates due to the short length, there is now an excuse to highlight the option of appending characters (perhaps by using the "always" option so that all keys are of length 12)

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

I don't think I have missed adding anything, so I am removing this from "draft".

@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 marked this pull request as ready for review October 19, 2020 22:35
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

I think I might have been sitting long enough with this to tunnel vision a bit, comments (including of what should be removed) are most welcome, and probably needed!

Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Looks good so far, haven't checked the screenshots, but a huge thanks for updating/correcting the docs regarding this! 🥇

@koppor koppor merged commit 965891a into JabRef:master Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants