org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
571 stars 47 forks source link

(feat) different list styles for Scrapper #145

Closed myshevchuk closed 3 years ago

myshevchuk commented 3 years ago

According to #141

myshevchuk commented 3 years ago

After some experimenting, I found that mixed and mixed-raw styles make little sense, so they won't make it into master. The citation-number-raw was renamed to citation-number-alnum. With this style both numerical and alphabetical characters will be extracted from citation-number field. Non alpha-numerical characters will be removed.

myshevchuk commented 3 years ago

This branch has been merged into develop.

myshevchuk commented 3 years ago

@j-steinbach, you can check a working prototype of list numbering here.

j-steinbach commented 3 years ago

It appears to work.

I tested it with ordered-point and unordered-hyphen.

I also tested it with "- [%s]", which is the given example string. Here it turns it into - [1]citation. and not - [1] citation. as I would expect from the variable description.

Lastly, I tested it with "[%s] Hälgòlß ". This also works.

myshevchuk commented 3 years ago

Thank you! I will have to add these options to the README, and will also check the docstrings for consistency. I first considered to automatically add a padding space as per the docstring but then decided to leave this decision to the user. So do you think the padding space should be added automatically, or be a user-controlled part of orb-pdf-scrapper-list-style? I mean simply "- [%s] " will do the job.

j-steinbach commented 3 years ago

When I was using it, I expected it to automatically have the padding there, as there was no mention of anything like a %key parameter.

I actually don't know which makes more sense. I think that if the example in the docs is updated, then it makes sense to use "- [%s] ", as it provides more control.

myshevchuk commented 3 years ago

@j-steinbach I think this is ready for merging now. If you find any bugs with citation numbering, please tag me here or open a new bug report.

In the latest commit several user options were renamed, please adjust your configuration, which will be broken after upgrade:

orb-pdf-scrapper-list-numbers => orb-pdf-scrapper-reference-numbers orb-pdf-scrapper-sort-references => orb-pdf-scrapper-group-references

The following options have been marked as deprecated. Your config will not be broken immediately, but it is advisable to use the new names, because the old names will be removed eventually:

orb-pdf-scrapper-refsection-headings => orb-pdf-scrapper-grouped-export orb-pdf-scrapper-export-fields => orb-pdf-scrapper-table-export-fields

There is also a new option orb-pdf-scrapper-ungrouped-export which allows for choosing between list and table-style export of ungrouped references.

j-steinbach commented 3 years ago

Thanks for the heads-up! Not going to change my running system then for the time being. Otherwise I will never finish my work! :)