dwp-forge / refnotes

4 stars 6 forks source link

page numbers support #36

Closed mlinchitstest closed 7 years ago

mlinchitstest commented 7 years ago

I think it would be very nice to have something like: sentence [citationName; p4-5] be turned into sentence[1]p4-5

That would make it much easier to work with page numbers. Currently it's pretty tedious to do page references, I feel.

dwp-forge commented 7 years ago

You can specify reference-specific pages only using structured reference syntax:

sentence [(citationName>> pages: 4-5)]

Also to make any use of it you have to switch to Harvard references:

<refnotes> reference-render: harvard </refnotes>

Or to have both references and notes rendered in a Harvard-like style you can inherit all styles from harvard namepace:

<refnotes> inherit: harvard </refnotes>

As result, instead of the usual numeric reference to the note you should get reference like this:

sentence (Author, 2016, pp. 4-5)

As for the syntax complexity, it was designed for flexibility and consistency while trying to keep it as simple as possible. After all there are just few keystrokes of difference between [citationName; p4-5] and [(citationName>> pages: 4-5)]. It's easy to come up with specific cases where the syntax could be further simplified, but when you start to consider various other scenarios supported by the plugin, you often see them break. Instead of consistent "language" you end up with a bunch of exceptions that are hard to remember and easy to get wrong.

mlinchitstest commented 7 years ago

Thanks, I think I've mastered the plugin now. I did not mean it has to be a ;. It could and should be the default >>. As far as I'm aware page numbers are an optional arg in the harvard syntax. So implementing this functionality would actually make the syntax more consistent as all styles will now render page numbers in some way. For example, wikipedia uses the {{r}} template, along with {{sfn}}. I think both are very useful styles. (Sfn separates citations from bibliography. I think separating citations from bibliography would also be a cool option. Sfn further allows you to add arbitrary comments and quotes to the citation, which is very useful. Sfn also relies on author and date, which is unnecessary). By the way, I just made a little plugin that attaches a bibtex bibliography page to every page, basically a copy of the plugin:talkpage.

dwp-forge commented 7 years ago

Actually, that one indeed sounds interesting. I don't remember ever seeing [1]:5 references on Wikipedia but it does make sense to have this option available, and it would fit into the existing syntax rather well. The {{sfn}} support would also be a viable extension for RefNotes but it looks like it would take much more effort to implement.

Unfortunately now I have no time to actively develop the plugin. But if you are willing to add these features, pull requests are welcome.

mlinchitstest commented 7 years ago

{{sfn} is probably too much work to implement. however {{r}}, which just appends a :page_number superscript to the ref seems very doable. i tried looking through the code to see if I could implement it myself, but the code base to too complex for me.