dwp-forge / refnotes

4 stars 6 forks source link

"Reference authors" on Bibtex not working #49

Closed eduardomozart closed 4 years ago

eduardomozart commented 4 years ago

Hey Mikola! It's me again, I opened the issue #48 in the past, do you remember? So, here we are again. First I want to thank you for fixing the last bug =)

It's a situation similar to #48.

When I create the following reference:

@Book{SambaHOWTO,
  Title                    = {The Official Samba-3 HOWTO and Reference Guide},
  Authors                  = {Jelmer R. Vernooij, John H. Terpstra, and Gerald Jerry Carter},
  Reference authors        = {Vernooij, et al.},
  Year                     = 2007,
  Pages                    = 948,
  URL                      = {http://www.inf.ufsc.br/~admrede/samba/Samba3-HOWTO.pdf}
} 

And use it on text:

RIDs iniciam em 1000 [(:harvard:SambaHOWTO>>page:233)]

I get:

RIDs iniciam em 1000 (Jelmer R. Vernooij, John H. Terpstra, and Gerald Jerry Carter, p.233) 

When it should:

RIDs iniciam em 1000 (Vernooij, et al., p.233) 

When I use the syntax from #48 it works as expected, so I believe it's a similar issue.

dwp-forge commented 4 years ago

And what made you think that it should work? BibTeX field names do not use spaces, so that's not a valid entry syntax.

The labels listed in structured note syntax are meant for note sheets and cards. I don't say that it's not possible to make them work for BibTeX as well, but I'm not sure if that's a right thing to do.

eduardomozart commented 4 years ago

Yes, I supposed it wasn't exactly a bug when I opened this issue. Maybe it's not good make it work because it could break the syntax with other similar BibTeX plugins that follow BibTeX standard. But for another side it would be great if it works because references looks better organized when using uppercase in first letter and spaces. The idea to make a SQLite database for reference plugins (there's a open suggestion for that already) would be great. I didn't get 500 references yet, but I believe that when I get I will have to write a SQLite implementation for refnotes, but I won't make it already XD Thank you!

dwp-forge commented 4 years ago

If you are talking about SQLite, I guess, you don't really care about sticking to BibTeX syntax. If so, then why not use note cards?

| Note name            | :harvard:SambaHOWTO                                           |
| Title                | The Official Samba-3 HOWTO and Reference Guide                |
| Authors              | Jelmer R. Vernooij, John H. Terpstra, and Gerald Jerry Carter |
| Reference authors    | Vernooij, et al.                                              |
| Year                 | 2007                                                          |
| Pages                | 948                                                           |
| URL                  | http://www.inf.ufsc.br/~admrede/samba/Samba3-HOWTO.pdf        |
eduardomozart commented 4 years ago

Hello Mikola! I care, because all references on my wiki uses BibTeX syntax. When I started documentating it seens more easily to start with (and, in my opinion, it is). And now that I know it's a standard, probably I can easily create a script to parse BibTeX references to another endings, like import then to another wiki system (like MediaWiki) if someday DokuWiki doesn't attend me anymore (probably I would create a plugin that creates a function if it doesn't exist instead of migrating to another wiki system). I cited SQLite because the issue #40 says that RefNotes has a limit of about 500 BibTeX, and in my lifetime I'll probably bypass it. So if this limit is imposed because the way RefNotes parses references, maybe it should be considered parsing references in a SQLite database, like the plugin that the author from issue #40 cited. I thought in maybe reading it's text files that contains references (like :refnotes namespace) and sending them to a SQLite database instead of using the cache system that RefNotes seems to use, using the old plugin that the author of issue #40 cited as a reference to get started.

dwp-forge commented 4 years ago

There is no hard limit on number of notes in database. I guess, #40 talks about potential performance issues when the database reaches that size. I doubt that it will be completely broken, though. The wiki pages are cached, so unless I screwed up somewhere the database should be loaded only when you edit/preview pages. And even then, I added database caching long time ago (see 98b3dc3), which should prevent parsing the whole database every time. You may start to partition your notes into smaller namespaces to avoid performance issues, but I guess when you reach that size you would want to somehow structure your database anyway.

But still, to be honest, I never tested that scenario and not really sure how well the performance will scale with the database growth.