Add the option to select a BST style for Preview
JabRef offers preview based on so called BST styles. However, currently there is no option to select them in the UI.
Things needed.
- Add the BST styles to the preview layout list
- Add an option to configure/add styles. Add a single style or configure a directory to load them from
- Test if they can be selected and rendered
Additional context Bst files can be found in https://www.ctan.org/topic/bibtex-sty
Codewise: PreviewTabViewModel#setValues needs to check for BstPreviewLayout
After this is implemented, a next step is following:
In case a LaTeX directory is set, check that directory for .bst file. If exists: use. If not exists: check for \bibliographystyle and then use kpeswitch to find the path. Maybe, one even needs to check the \documentclass.
(This can be hard but very user-friendly)
Shall I modify the setValues() method in the PreviewTabViewModel.java file to fetch and add BST styles from https://www.ctan.org/topic/bibtex-sty to the availableListProperty also what files need to be changed or dependencies need to be used . Is an arraylist of bststyles needed which will then be used to create previewlayout for availableListProperty . How do i develop a better understanding for the given issue
- Add a button to the UI so that the user can select BST files on their computer
- Add the selected bst files to the available styles
- Adjust the check in the setValues for BstPreviewLayout
- Test
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at.
Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback.
Code hint: https://github.com/JabRef/jabref/blob/main/src/test/java/org/jabref/logic/bst/BstVMTest.java shows the usage of JabRefs functionality to transform a BibEntrty to text using a bst file
I've tried to create the button and also checked the rendering in preview. Also I'm planning to implement the feature to configure bst styles from directory . please check if this is the way implementation needs to be done else provide feedback on changes to be made
https://github.com/JabRef/jabref/assets/100865986/7e95c9b3-4c98-487c-a731-5889cf73426b
@Siedlerchr @koppor please give feedback
That video looks already good. Please go ahead with the PR that makes it easier to check the code
sahilsekr42 @.***> schrieb am Sa., 30. März 2024, 18:02:
I've tried to create the button and also checked the rendering in preview. Also I'm planning to implement the feature to configure bst styles from directory . please check if this is the way implementation needs to be done else provide feedback on changes to be made
https://github.com/JabRef/jabref/assets/100865986/7e95c9b3-4c98-487c-a731-5889cf73426b
— Reply to this email directly, view it on GitHub https://github.com/JabRef/jabref/issues/11102#issuecomment-2028290837, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOFZCCAWLV7AX4J76QFJDY23VY3AVCNFSM6AAAAABFHTJ4L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYGI4TAOBTG4 . You are receiving this because you authored the thread.Message ID: @.***>
@Siedlerchr @koppor please give feedback
We see the selection possibility of .bst files. What is missing
- Usage of .bst in the preview in the entry editor
- Mixing .bst and CSL preview styles
Regarding 2., maybe two tabs "CSL" and "BST" would make sense. When "CSL" is selected, the list as currently existing is used, when "BST" is selected, the known .bst files (as the video shows) are used. The right list is a mix of .csl and .bst
@sahilsekr42 hey, how's it going? Do you plan to put up a PR (for however-much has been done)? It'll be really helpful for other people if they want to take it from there (if you are busy). Otherwise, people will review it and help you finish it.
I will raise a pr by tomorrow for review ( sorry for the delay)
please look into #11229. Also test checks for one of the commits in one of the files is failing and i don't know why