Comments (24)
@DrDrij this PR adds support for top level toctree
objects. I haven't tested on internal toctree objects yet but so far so good :-)
.
QuantEcon/sphinxcontrib-jupyter#111
I have update the index*.ipynb
files that are generated on the branch for the PR in the jupinx
extension on compare-lectures.quantecon.org
from lecture-source-py.
toc
elements within lectures need some work
from lecture-source-py.
Hmm. There isn't anything specific enough in the HTML (classes etc) to hook onto with CSS.
from lecture-source-py.
@fkazemian I have put together a PR that should fix the index issues during compilation.
QuantEcon/sphinxcontrib-jupyter#111
However it changes the internal implementation when writing lists. I am in the process of updating the lecture set on compare-lectures.quantecon.org to be from this branch of jupinx
. When I let you know on slack that the site is updated would you mind looking at some lists at random to see if they have changed?
from lecture-source-py.
-
amss2
is not fixed on compare-lectures.quantecon.org as that is a fix that happened at the rst level and I have not updated my source files in the build repository.
When you have a chance to check other lists that would be great. Thanks
from lecture-source-py.
- @fkazemian would you mind checking the index objects that have been created this afternoon and are now live on compare-lectures.quantecon.org
from lecture-source-py.
Hi @mmcky , I'm checking them ...
from lecture-source-py.
about_py
index is fine but there is a tag div here
there is no problem with aiyagari, but you don't think it should have an index? ( the live version dosen't have it as well)
also amss3 doesn't have any index:
chang_credible
Calculating set of sustainable (w,θ) pairs-$-pairs)
should be Calculating set of sustainable (w,θ) pairs
chang_ramsey
Calculating all (w,θ) pairs in CE -−pairs−in−-CE-$)
should be Calculating all (w,θ) pairs in CE
from lecture-source-py.
markov_perf doesn't have any index( in live version there is no index as well)
rob_markov_perf doesn't have any index as well:
also uncertainty_traps doesn't have any index:
from lecture-source-py.
Hi @mmcky I just finished checking all the lectures. These lecture don't have any index in both generated and live version which is not related to jupinx, but I think they should have it:
uncertainty_traps
rob_markov_perf
markov_perf
amss3
aiyagari
and we have two problem in these lectures: ( you can see their problems above)
chang_credible
chang_ramsey
and there is an additional tag before index in:
about_py
from lecture-source-py.
@DrDrij it looks like you modify the local toc
in the theme to drop Contents
and the top level, as I just build off of the toc
branch and it seems that within lectures toc
objects are fixed. If this is the case I will remove my patch from jupinx
to drop a level.
from lecture-source-py.
from lecture-source-py.
ahh - I see. https://github.com/mmcky/quantecon.build.lectures/commit/24756155a016f856031f7103dc86d4120e2bf45f#diff-c45e43ff5986a2189468b78b4c57c2c8R915. I will remove the patch I made to jupinx
this is much better
from lecture-source-py.
ok - the python index pages should now be working.
from lecture-source-py.
@fkazemian would you mind checking the python related index pages and let me know if they are ok?
from lecture-source-py.
Hi @mmcky they are now like
but we can see the problems I mentioned above.
from lecture-source-py.
@fkazemian so is the only issue now clickable titles?
from lecture-source-py.
@fkazemian can you add a PR to add a toc
to these lectures (on a lecture-by-lecture basis)
@jstac can you advise if you wish there to be no toc
elements for these lectures.
-
uncertainty_traps
-
rob_markov_perf
-
markov_perf
-
amss3
-
aiyagari
Fix markup issues in:
-
chang_credible
(math in title) -
chang_ramsey
(math in title)
these are rendering correctly to ipynb so this must be an issue with nbconvert
as the generated markdown is correct.
## Contents
- [Credible Government Policies in Chang Model](#Credible-Government-Policies-in-Chang-Model)
- [Overview](#Overview)
- [The setting](#The-setting)
- [Calculating set of sustainable $(w,\theta)$ pairs](#Calculating--set-of-sustainable-$-(w,\theta)-$-pairs)
and the html
output is
<h2 id="Contents">Contents<a class="anchor-link" href="#Contents">¶</a></h2><ul>
<li><a href="#Credible-Government-Policies-in-Chang-Model">Credible Government Policies in Chang Model</a> <ul>
<li><a href="#Overview">Overview</a> </li>
<li><a href="#The-setting">The setting</a> </li>
<li><a href="#Calculating--set-of-sustainable-$-(w,\theta">Calculating set of sustainable $ (w,\theta) $ pairs</a>-$-pairs) </li>
</ul>
</li>
</ul>
@DrDrij would you mind checking out nbconvert
on the chang_credible
lecture at the html
stage of nbconvert
?
from lecture-source-py.
- the top level index page has now been fixed. The only difference now is
Home
which is contained in the actual RST file.
from lecture-source-py.
-
uncertainty_traps
-
rob_markov_perf
-
markov_perf
-
amss3
-
aiyagari
Hi @mmcky
I've done it here Add Index pages #90 but I add review label for it.
from lecture-source-py.
@DrDrij would you mind checking out
nbconvert
on thechang_credible
lecture at thehtml
stage ofnbconvert
?
It appears what is happening is nbconvert is stumbling with the markdown in the ipynb file. You see in the below link from the TOC list there are brackets within brackets. So link value is being terminated at the first closing bracket.
" - [Calculating set of sustainable $ (w,\\theta) $ pairs](#Calculating--set-of-sustainable-$-(w,\\theta)-$-pairs) "
This results in the href anchor being cut too soon and the remaining part of the string is being appended after the </a>
as shown below.
<li><a href="#Calculating--set-of-sustainable-$-(w,\theta">Calculating set of sustainable $ (w,\theta) $ pairs</a>-$-pairs) </li>
The way to fix this in the markdown is to escape the first closing bracket with %29
. I've tested this locally and can confirm this works with nbconvert like so:
" - [Calculating set of sustainable $ (w,\\theta) $ pairs](#Calculating--set-of-sustainable-$-(w,\\theta%29-$-pairs) "
The heading in the body of the page however works fine as it doesn't have the double brackets.
"## Calculating set of sustainable $ (w,\\theta) $ pairs\n",
@mmcky Is there a tweak you could make in jupinx to escape brackets within markdown links?
from lecture-source-py.
thanks @DrDrij - love your work. If we change closing brackets with %29
should we also adjust opening brackets (%28) for consistency?
from lecture-source-py.
@DrDrij with PR QuantEcon/sphinxcontrib-jupyter#132 I have done that for all inline math that is contained in a topic when targeting html
.
from lecture-source-py.
this is fixed. thanks @DrDrij and @fkazemian for your input no this.
from lecture-source-py.
Related Issues (20)
- Replace vectorization with loops in shortest paths lecture. HOT 1
- A typo in Default Risk and Income Fluctuations HOT 6
- Update ex 1 in pandas lecture HOT 1
- Additive functionals lecture showing a RuntimeWarning HOT 1
- Colab live execution is broken -- urgent HOT 3
- NameError in python lecture notes (pdf version) HOT 1
- additive_functionals code uses deprecated numpy.asscalar method
- check and fix functions lecture
- Optimal growth lecture 1 issue HOT 3
- Broken maths in Black-Litterman lecture HOT 3
- [BUG] Fix Travis sphinx-build testing HOT 1
- Split projects! HOT 9
- Update AWS Infrastructure for Project Split HOT 2
- [contributors] update python landing page to include contributors HOT 10
- Assign lectures to new repository structure HOT 10
- Sanitize lectures of co-author / co-contributor statements HOT 11
- [python.quantecon.org] Create new landing page for Split Projects HOT 2
- Update quantecon.org for new structure HOT 2
- [Themes] Adjust to remove `undergrad` and `graduate` index support HOT 5
- [lecture-issue, low-priority] Citation Missing in Inventory Dynamics Lecture HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lecture-source-py.