QuantEcon / lecture-python

Source files for https://python.quantecon.org
BSD 3-Clause "New" or "Revised" License
61 stars 21 forks source link

[cake_eating_problem] duplicate labels and citation issue #71

Open mmcky opened 4 years ago

mmcky commented 4 years ago
lecture-python-intro/source/rst/cake_eating_problem.rst:190: WARNING: duplicate label of equation bellman, other instance in cake_eating_numerical
lecture-python-intro/source/rst/cake_eating_problem.rst:353: WARNING: duplicate label of equation euler, other instance in cake_eating_numerical
lecture-python-intro/source/rst/cake_eating_problem.rst:393: WARNING: citation not found: ma2020income
najuzilu commented 4 years ago

I can't find ma2020income in the previous version of the qe bib file. Also, is it possible to display an equation through referencing? I can't seem to find it in the documentation.

mmcky commented 4 years ago

hey @najuzilu hmm -- do you know which paper that tag might be referring to?

Also not sure what you mean by "possible to display an equation through referencing"?

najuzilu commented 4 years ago

Hm no idea. I tried to do a simple search but got nowhere.

The bellman equation is labeled in two different files; in cake_eating_problem.rst:

.. math::
    :label: bellman

    v(x) = \max_{0\leq c \leq x} \{u(c) + \beta v(x-c)\}
    \quad \text{for any given } x \geq 0.

Also in cake_eating_numerical.rst:

.. math::
    :label: bellman

    v(x) = \max_{0\leq c \leq x} \{u(c) + \beta v(x-c)\}
    \quad \text{for all } x \geq 0.

What's the optimal way to do show this eq without copy-pasting it in the second file?

mmcky commented 4 years ago

@jstac do you know what paper citation label ma2020income refers to?

@najuzilu there is no simple way other than to include in a separate file in source/_static but that isn't advised for equations. The labels should be made unique by adding:

bellman-cep for cake_eating_problem and bellman-cen for cake_eating_numerical

along with updated references to the label in the text respectively.

jstac commented 4 years ago

Thanks guys. The ref is

@article{ma2020income,
  title={The income fluctuation problem and the evolution of wealth},
  author={Ma, Qingyin and Stachurski, John and Toda, Alexis Akira},
  journal={Journal of Economic Theory},
  volume={187},
  pages={105003},
  year={2020},
  publisher={Elsevier}
}
mmcky commented 4 years ago

@najuzilu I will setup a PR to add this to the bib file. I need it merged to see if pdf build is fixed.