Skip to content

Commit

Permalink
[general] remark_admonition + upgrade sphinx-proof and quantecon-book…
Browse files Browse the repository at this point in the history
…-theme (#493)

* [geom_series] remark_admonition

Dear John,

This pull request is for #442.

I use the geom_series.md lecture as an example to test the current admonition style.

Best,
Longye

* TST: install main branch version of sphinx-proof

* test with new css definition

* test the new css styling for remark

* test updated quantecon-book-theme

* upgrade quantecon-book-theme==0.7.2

* update branch until released for sphinx-proof

* enable sphinx-proof==0.2.0

* update software for collab testing

* remark_money_inflation

Add remark admonition for money_inflation.md

* remark_unpleasent

Add remark admonition to unpleasent.md

* remark_money_inflation_nonlinear

Add remark admonition for money_inflation_nonlinear.md

---------

Co-authored-by: mmcky <mamckay@gmail.com>
Co-authored-by: Matt McKay <mmcky@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 1e15713 commit 905b7f9
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/collab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install Build Software
shell: bash -l {0}
run: |
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.1 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx_proof==0.1.3 sphinx_reredirects==0.1.3
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx_proof==0.2.0 sphinx_reredirects==0.1.3
# Build of HTML (Execution Testing)
- name: Build HTML
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ dependencies:
- pip:
- jupyter-book==0.15.1
- docutils==0.17.1
- quantecon-book-theme==0.7.1
- quantecon-book-theme==0.7.2
- sphinx-tojupyter==0.3.0
- sphinxext-rediraffe==0.2.7
- sphinx-exercise==0.4.1
- sphinx-proof==0.1.3
- sphinx-proof==0.2.0
- ghp-import==1.1.0
- sphinxcontrib-youtube==1.1.0
- sphinx-togglebutton==0.3.1
Expand Down
1 change: 1 addition & 0 deletions lectures/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ sphinx:
width: 80%
nb_code_prompt_show: "Show {type}"
suppress_warnings: [mystnb.unknown_mime_type, myst.domains]
proof_minimal_theme: true
# -------------
html_js_files:
- https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js
Expand Down
5 changes: 4 additions & 1 deletion lectures/geom_series.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ $$
1 + c + c^2 + c^3 + \cdots + c^T = \frac{1 - c^{T+1}}{1-c}
$$

**Remark:** The above formula works for any value of the scalar
```{prf:remark}
:label: geom_formula
The above formula works for any value of the scalar
$c$. We don't have to restrict $c$ to be in the
set $(-1,1)$.
```

We now move on to describe some famous economic applications of
geometric series.
Expand Down
16 changes: 12 additions & 4 deletions lectures/money_inflation.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,21 @@ m_t & = b_{t-1} p_t
\end{aligned}
$$ (eq:method1)
**Remark 1:** method 1 uses an indirect approach to computing an equilibrium by first computing an equilibrium $\{R_t, b_t\}_{t=0}^\infty$ sequence and then using it to back out an equilibrium $\{p_t, m_t\}_{t=0}^\infty$ sequence.
```{prf:remark}
:label: method_1
Method 1 uses an indirect approach to computing an equilibrium by first computing an equilibrium $\{R_t, b_t\}_{t=0}^\infty$ sequence and then using it to back out an equilibrium $\{p_t, m_t\}_{t=0}^\infty$ sequence.
```
**Remark 2:** notice that method 1 starts by picking an **initial condition** $R_0$ from a set $[\frac{\gamma_2}{\gamma_1}, R_u]$. Equilibrium $\{p_t, m_t\}_{t=0}^\infty$ sequences are not unique. There is actually a continuum of equilibria indexed by a choice of $R_0$ from the set $[\frac{\gamma_2}{\gamma_1}, R_u]$.
```{prf:remark}
:label: initial_condition
Notice that method 1 starts by picking an **initial condition** $R_0$ from a set $[\frac{\gamma_2}{\gamma_1}, R_u]$. Equilibrium $\{p_t, m_t\}_{t=0}^\infty$ sequences are not unique. There is actually a continuum of equilibria indexed by a choice of $R_0$ from the set $[\frac{\gamma_2}{\gamma_1}, R_u]$.
```
**Remark 3:** associated with each selection of $R_0$ there is a unique $p_0$ described by
```{prf:remark}
:label: unique_selection
Associated with each selection of $R_0$ there is a unique $p_0$ described by
equation {eq}`eq:p0fromR0`.
```
### Method 2
Expand Down
5 changes: 4 additions & 1 deletion lectures/money_inflation_nonlinear.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ $$ (eq:msupply)
where $g$ is the part of government expenditures financed by printing money.
**Remark:** Please notice that while equation {eq}`eq:mdemand` is linear in logs of the money supply and price level, equation {eq}`eq:msupply` is linear in levels. This will require adapting the equilibrium computation methods that we deployed in {doc}`money_inflation`.
```{prf:remark}
:label: linear_log
Please notice that while equation {eq}`eq:mdemand` is linear in logs of the money supply and price level, equation {eq}`eq:msupply` is linear in levels. This will require adapting the equilibrium computation methods that we deployed in {doc}`money_inflation`.
```
Expand Down
1 change: 1 addition & 0 deletions lectures/unpleasant.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ p_T = \frac{m_0}{\gamma_1 - \overline g - \gamma_2 R_u^{-1}} = \gamma_1^{-1}
$$ (eq:pTformula)
```{prf:remark}
:label: equivalence
We can verify the equivalence of the two formulas on the right sides of {eq}`eq:pTformula` by recalling that
$R_u$ is a root of the quadratic equation {eq}`eq:up_steadyquadratic` that determines steady state rates of return on currency.
```
Expand Down

1 comment on commit 905b7f9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.