-
-
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
Add docbook 5 support #4319
Add docbook 5 support #4319
Conversation
Renamed to docbook 5 export removed old layout files
I have seen three errors and one thing that could be better:
Furthermore, why not have docbook 4 and docbook 5 export. I really donot know how much that export function has been used. But I would like to keep the old files and rename them to docbook4 respectively and name the new ones docbook5. I have added the files which need adjustement in the attached zip. |
* upstream/master: update junit to release (#4320)
use lastName only in docbook5 use new docbook template favor composition over inheritance add docbook version enum
@bernhard-kleine I added your changes and also found that the authors formatter has an option I also modified the docbook5.mastersthesis layout to call the docbook 5 authors |
Thanks a lot: The only item which does not survive validation is the plus in the bibtexkey. But that is another issue. Therefore this is as perfect as it could be. We can finish here. The substitution of the plus from [authshort] should be done by jabref and is not an issue of docbook export. |
Glad it works now as expected. It would be nice if you could adjust the documentation of the docbook in the help file. Just click on edit this page at the bottom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we really need backward support for DocBook 4. Moreover, it would be good if you could add a test(file).
When constructing a testcase like Tobias suggested I noticed that the line This line Furthermore it would be relevant to add a line: |
The |
That looks comfortable and I will try it in the next week. However, I wonder how you named a macro which retrieves the name of the entrytype? |
|
btw my email is bernhard.kleine@gmx.net. |
So do we need to add / change the layout or is this current status sufficient? |
I did not find the time yet to look into the format for books and incollection, sorry. But it will be different from that of articles. |
Hi, I found some time to look after the issue: |
@Siedlerchr I am waiting for your response. |
I will look into that this evening. |
* upstream/master: (54 commits) Update README.md (#4419) Fix generate bibtex key overwrite warning dialog (#4418) Fix group hit counter when adding entries (#4413) Update README.md fix java.nio.file.FileSystemNotFoundException and reorganize code (#4416) fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries (#4404) Add a few journal abbreviations (#4412) Fix display of radio buttons (#4411) Update issue templates Delete ISSUE_TEMPLATE.md Update issue templates Integrate mrdlib redesign (#4361) fix "save" button in preference dialog not response (#4406) show dialog before creating entry (#4405) Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287) (#4398) Updates (#4402) Fixes for all mods exporter tests (#4396) Fix EntryType dialog not closed after generate button (#4390) Make rank image narrower (#4395) Fix showing multiple icons for one menu entry - fixes #4384 (#4392) ...
I found the problem. It seems you really have to use separate files for each entrytype, otherwise it will fill all the fields. The only thing which currently seems not to work is exporting the field The main file the "docbook.layout" is used as fallback if no matching entrytype.layout file is found. @PhdThesis{JabRef2018,
author = {{JabRef}},
title = {Jabref is awesome!},
school = {Github},
year = {2018},
type = {mathesis},
}
|
What do I have to test it? Which file to select for testing? since one can only load one file for checking. |
It should be sufficient if you put all in one folder and just select the main docbook layout file. All others should be found then |
I am just got stuck: I have entered docbook5a in the customize export in Options and now I want to export, The file dialog never opens, I tried with the snapshot from last friday and with the one where you experimentally had my first filter attemps included. I cancelled all windows on my desktop but I could not see the file dialog opening where one can choose the export filter and the place where the file is to go. Strange? |
* upstream/master: Add submodule pull to circle ci and fix theme loading css (#4443) fix groups drag and drop (#4439) Convert merge entries dialog to JavaFX (#4410) Fix ArrayIndexOutOfBoundsException on second pdf import (#4426) Fix radiobuttons in preference menu (#4409) Add citation styles as git submodule (#4431) Fix highlight color of selected text and progress bar (#4420) Fix two new issues Fix Violations of Always Use Braces (#4400) Delete PreferencesService.java.orig Add JabRef icon to installer and change watermark to JabRef (#4421) Checkstyle: force braces around code blocks
There seems to be an issue with the custom export dialog. However, this is currently rewritten in #4394 by @NorwayMaple Please remove the custom export and then use the inbuilt docbook5 exporter. I now created the following files based on your main file. |
@Siedlerchr I'm in the process of rewriting the dialog still. Can I keep going? You're not saying I should stop, are you? I might have time to work on it later today (it is 2pm here). |
Please continue, it would just be nice if you could check that the custom export works fine if you have multiple layout files and select one of them. |
@Siedlerchr : There is still an error in the layout file, respectively outside the layout. The macros CreateDocBook5Authors and CreateDocBook5Editors cannot be reached. Therefore the export file shows errors. As I had provided these files already, I wonder what happened. |
@bernhard-kleine First of all, you have to explicitly use this branch-version (based on the current master), https://builds.jabref.org/docbookfive/ because the macros for author and editors are referring to the inbuilt java classes which are only available in this branch. Second, you can try the inbuilt docbook5 exporter, I added the files as resources to the jar. As you probably already saw, it is necessary to add one file per entry type, one generic file is unfortunately not possible. You can take one of the existing as basis for other, and you only need to adjust the fields per entry-type. |
I rechecked the export and I found a couple of errors, mostly due to my notsocareful work. However, they errors I found have been changed. Two things remain which I cannot mend: the line |
* upstream/master: Change location of some fields in the entry editor (#4448) Bump applicationinsights-core from 2.2.0 to 2.2.1 (#4488) Added feature to add server timezone when connecting to shared database (#4483) Bump applicationinsights-logging-log4j2 from 2.2.0 to 2.2.1 (#4487) fix save button Update archunit from 0.9.1 -> 0.9.2 Fix move to group always moves first entry (#4457) Add eprint cleanup (#4445) respect preference state (#4468) Set auto-update checkbox enable/disable when reading preferences (#4446) Improve MathSciNet fetcher and add ISBN fetcher to entry editor toolbar (#4444) New translations JabRef_en.properties (German) (#4455) New Crowdin translations (#4454) Fix error in l10n file: Toogle -> Toggle (#4453) Remove depandabot
What do I have to write for Noinitials in the macro the formats the authors/editors? This macro does not work. |
User lower case formatter for \entrytype
@bernhard-kleine For the author question: Instead of NoInitials use FullName and for the other one ToLowerCase formatter, it was necessary to include the whole format-command in quotations.
|
Fullname does leave the firstnames, that is not intended. I want only lastnames. |
I found that "Lastname" does what I want. I am waiting for feedback from the docbook-apps mailing list, since the seriesinfo tag that is mentioned in the guide does not seem to be supported. Otherwise my testfile is properly exported. |
@Siedlerchr: As far as I am concerned, the conversion is complete. During this work I discovered several flaws in docbook 5.1 which concerns mostly the thesis entries. Obviously these type of papers has been forgotten. There is not a single mentioning in the pubwork attribute. I have brought this to the attention of the people designing docbook 5. Maybe it will be corrected in due time. Once this is done I am willing to adapt the layout files again. Thanks for the helpful cooperation |
convert tab character to spaces
Thanks for the quick feedback. I just changed the layout files according to your updates. When all looks good, I will merge this. The next time you can directly open a new PR by editing the files directly in the browser or you clone the repo and modiy them. |
@Siedlerchr: I have noticed that the begin/end constructs can not be faithfully nested. Is this intentionally or an error? Nested constructs would have be easier structurally. I solved this only partially.
results in a errorneous
This works but is IMHO not logically correct
|
I would not call it an error, but I think the problem is that the layout code generating stuff is not based on a regular grammar, but instead on String Tokenization. And it's already complicated enough For some export formats like BibtexXML or MODS format we have an xsd schema which is used to generate java classes which are then represent a hardcoded export. |
I am going to merge this now. For future updates we can create a new PR. |
* upstream/master: Add docbook 5 support (#4319) Bump java-diff-utils from 2.2.0 to 4.0 (#4507) 3189 fix group renaming (#4470) Create test (#4505) Bump archunit-junit5-engine from 0.9.2 to 0.9.3 (#4503) Bump archunit-junit5-api from 0.9.2 to 0.9.3 (#4504) Bump mockito-core from 2.23.0 to 2.23.4 (#4502) Bump guava from 27.0-jre to 27.0.1-jre (#4499) Improve page checker (#4498) Add color picker to groups dialog (#4492) Fix kbd XML closing tag
Fixes #4315
Renamed to docbook 5 export
removed old layout files , replace by the ones from @bernhard-kleine
I added a bib entry and the corresponding xml file for comparision
Please check if all is exported correctly.
I noticed there is also a masterthesis layout file. I think this needs adjustment as well, right?
singleExportDocbookEntry.zip