retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.2k stars 284 forks source link

JSTOR eprint data export depends on whether jstor link starts with https vs http #1543

Closed rpguiteras closed 4 years ago

rpguiteras commented 4 years ago

Using Better BibLaTex with JSTOR items, I notice that if the url stored in Zotero begins with http, then the exported .bib file will convert this to eprint data and drop the url, which I assume is the desired behavior.

However, if the url begins with https, then no eprint data are generated and the url is retained.

Report ID: 4RNZQPVX-euc

Exporter used: Better BibLaTeX

Expected behavior:

JSTOR data exported as eprint, e.g.,

  eprint = {2938351},
  eprinttype = {jstor}

and URL is dropped, which is what occurs when the JSTOR url starts with http rather than https. For example (when Zotero url is http://www.jstor.org/stable/2938351):

@article{newey_efficient_1990,
  title = {Efficient {{Instrumental Variables Estimation}} of {{Nonlinear Models}}},
  author = {Newey, Whitney K.},
  date = {1990},
  journaltitle = {Econometrica},
  volume = {58},
  pages = {809--837},
  publisher = {{[Wiley, Econometric Society]}},
  issn = {0012-9682},
  doi = {10.2307/2938351},
  abstract = {This paper considers asymptotically efficient instrumental variables estimation of nonlinear models in an i.i.d. environment. The class of models includes nonlinear simultaneous equations models and other models of interest. A problem in constructing efficient instrumental variables estimators for such models is that the optimal instruments involve a conditional expectation, calculation of which can require functional form assumptions for the conditional distribution of endogenous variables, as well as integration. Nonparametric methods provide a way of avoiding this difficulty. Here it is shown that nonparametric estimates of the optimal instruments can give asymptotically efficient instrumental variables estimators. Also, ways of choosing the nonparametric estimate in applications are discussed. Two types of nonparametric estimates of the optimal instruments are considered. Each involves nonparametric regression, one by nearest neighbor and the other by series approximation. The finite sample properties of the estimators are considered in a small sampling experiment involving an endogenous dummy variable model.},
  eprint = {2938351},
  eprinttype = {jstor},
  number = {4}
}

Actual behavior:

Does not export an eprint. Exports a URL, for example (when Zotero URL is https://www.jstor.org/stable/2938351):

@article{newey_efficient_1990,
  title = {Efficient {{Instrumental Variables Estimation}} of {{Nonlinear Models}}},
  author = {Newey, Whitney K.},
  date = {1990},
  journaltitle = {Econometrica},
  volume = {58},
  pages = {809--837},
  publisher = {{[Wiley, Econometric Society]}},
  issn = {0012-9682},
  doi = {10.2307/2938351},
  url = {https://www.jstor.org/stable/2938351},
  urldate = {2020-04-30},
  abstract = {This paper considers asymptotically efficient instrumental variables estimation of nonlinear models in an i.i.d. environment. The class of models includes nonlinear simultaneous equations models and other models of interest. A problem in constructing efficient instrumental variables estimators for such models is that the optimal instruments involve a conditional expectation, calculation of which can require functional form assumptions for the conditional distribution of endogenous variables, as well as integration. Nonparametric methods provide a way of avoiding this difficulty. Here it is shown that nonparametric estimates of the optimal instruments can give asymptotically efficient instrumental variables estimators. Also, ways of choosing the nonparametric estimate in applications are discussed. Two types of nonparametric estimates of the optimal instruments are considered. Each involves nonparametric regression, one by nearest neighbor and the other by series approximation. The finite sample properties of the estimators are considered in a small sampling experiment involving an endogenous dummy variable model.},
  number = {4}
}
blip-bloop commented 4 years ago

:robot: this is your friendly neighborhood build bot announcing test build 5.2.29.6666 ("fixes #1543")

Install in Zotero by downloading test build 5.2.29.6666, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 4 years ago

Can you try 6666?

rpguiteras commented 4 years ago

This seems to be working great:

Zotero URL field https://www.jstor.org/stable/2938351

gives

BibLaTeX export eprint = {2938351}, eprinttype = {jstor},

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.