-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
"you must select a valid style file" problem #6303
Comments
Hi, I think the jstyles are a bit outdated. I looked into it, and I think the problem is that they use Author formatters which are no longer existing: For example the BJAST.jstyle file ues |
Thank you for so quickly suggesting an explanation , @Siedlerchr I will look into it. On the same page with the "updates list" there is a link to the style repository I mentioned , and also it is linked the "Export-Filter Editor for Jabref". Apparently the generated .jstyle files are no longer compatible. :-( https://docs.jabref.org/import-export/export/customexports#creating-the-export-filter IMHO it is a serious drawback for jabref the impossibility to easily edit style files. DJuego |
@DJuego These styles have all been created by external users, we do not maintain them. And the style editor plugin is also an external tool from @simonharrer I think? |
@Siedlerchr . Very understandable. Hopefully the new version 5.0 will bring a cascade of collateral updates. :-) DJuego |
Hello, I tried to understand the pattern for "valid style file" to be raised. This is what I did find out: The following style file (created with Export Filter Editor) works: `NAME PROPERTIES CITATION LAYOUT default=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} `NAME PROPERTIES CITATION LAYOUT article=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} Could there be a problem in the test routine when a style file is checked? |
Thanks for the feedback, default is required since a while (since 5.0-beta) The dialog should ideally show the reason why the style is invalid |
@Siedlerchr your comment did help to dig a bit deeper. I think, I was able to identify the problem: The following jstyle works: `NAME PROPERTIES CITATION LAYOUT article=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} default=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} The following jstyle file does not work. The only difference type=default & type=article are changed by order: `NAME PROPERTIES CITATION LAYOUT default=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} article=\begin{author}\format[Authors(LastFirst,Fullname,sep=/,LastSep=/,EtAl= u.a.,3,3),]{\author} \end{author}\begin{year}(\year\uniq), \end{year}\begin{title}\format[RemoveLatexCommands]{\title}, \end{title}\begin{booktitle}\format[RemoveLatexCommands]{\booktitle}, \end{booktitle}\begin{institution}\format[RemoveLatexCommands]{\institution}, \end{institution}\begin{journal}\format[RemoveLatexCommands]{\journal} \end{journal}\begin{volume}(\format[RemoveLatexCommands]{\volume}).\end{volume}\begin{address} \format[RemoveLatexCommands]{\address}.\end{address} I think the best way to solve the problem is to improve the validity checker. @DJuego: Could you open your jstyle with an text editor and put your "default" definition at the last position and try if it works (of course not with outdated files like BJAST)? |
Hm, I took a quick look at the code, it should not matter where the default entry type is. |
First; I am using the "Export-Filter_Editor_Windows_V04b.exe" in Windows 10 x64 Indeed. I can confirm that with the suggested modification of @teertinker the file seems to load correctly in Jabref. I simply opened the file with the notepad and moved the default line in the LAYOUT section. However I am unable to apply the style over the references. But it probably has to do with my lack of knowledge about jabref, citations and styles. :-( F9 changes the style between the default jabref style and the IEEE style. It never changes to the Sensors style I have loaded. :-? DJuego |
The jstyle we are talking about here, are for the usage in Open/Libre Office. However, and that's a bit confusing, the layout part cansalso used for the Preview style in jabref (you can modify that in the preferences). |
@DJuego: @Siedlerchr: |
Today I did double check an example style file with a minimal setup (only title and year used). I did check for all global Properties to be included in the current documentation. The file is saved as UTF-8 on my pc. The same pattern persists: See: Working: https://pastebin.com/73kiGpk0 From my perspective this is a bug within JabRef, therefore it makes not much sense to update Export-Filter-Editor at the moment. |
@teertinker You are right, I debugged it and the problem is a boolean variable "isDefaultLayoutPresent" which gets overwritten every time a new line is read. That explains why it only works at the end. Will create a fix |
Fixes #6303 Adapted the error message to give a hint what is probably missing. I also noticed a problem in eclipse when executing the L10n test. It was missing an add-opens
Yuppie! Great to hear. |
* Fix jstyle was invalid with default section at the start Fixes #6303 Adapted the error message to give a hint what is probably missing. I also noticed a problem in eclipse when executing the L10n test. It was missing an add-opens * Add test for validity
Hi! Jabref is a very promising tool. Thank you for the developing!
My environment is Windows 10 x64.
My software is JabRef-5.0-portable_windows.zip (jabref portable version for Windows ). I've also tested the JabRef-5.1-portable_windows.zip (14-04-2020) with the same result.
When i try to load any style file i always get the message "you must select a valid style file".
I have tried the American_Mineralogist.jstyle and BJAST.jstyle files. i have downloaded this .jstyle files from https://github.com/JabRef/jstyles.jabref.org
I have test the UTF-8 encoding with notepad++
Any idea?
Thanks in advance!!
DJuego
The text was updated successfully, but these errors were encountered: