GitXplorerGitXplorer
Q

lecture-source-py

public
192 stars
77 forks
2 issues

Commits

List of commits on branch master.
Unverified
648075ad2a337b6e5c67c1bc705627f5f995bf81

Tom's March 12 new lecture and revised toc and bib file

tthomassargent30 committed 5 years ago
Verified
bf7697532dd7663efc33dd781adb540597a5bec9

remove_names (#960)

ssayaikegawa committed 5 years ago
Verified
7dc765bd2fda14182bfe37743356cd85e2e69dd6

add comment about math and markdown issue with nbconvert (#941)

mmmcky committed 5 years ago
Verified
2923a60b4059f27b6ea3ca8af615b17e2273c6c2

tidy up hidden files (#951)

mmmcky committed 5 years ago
Verified
e3d11446780cc475ad7262f66617f5cdcb67b751

update html footer in theme (#954)

mmmcky committed 5 years ago
Verified
a1173dc3774e8bca3d403c028358eb894514d893

linear_models_figure_to_code (#915)

sshlff committed 5 years ago

README

The README file for this repository.

Lectures in Quantitative Economics: Source Files

This repository is being Archived.

The python lecture series has been moved into three different series

New repositories:

  1. Python Programming
  2. Introductory Quantitative Economics with Python
  3. Advanced Economics with Python

Python version

This repository contains

  • the rst source files for each python lecture in Quantitative Economics with Python, in directory source/rst

  • supporting Python code in source/_static/code/

  • supporting figures, PDFs and other static assets in source/_static.

Building notebooks

Jupinx should be used to build this set of lectures.

Style Guide - Writing Conventions

Mathematical Notation

Matrices always use square brackets. Use \begin{bmatrix} ... \end{bmatrix}

Sequences use curly brackets, such as \{ x_t \}_{t=0}^{\infty}

The use of align environments can be done using the \begin{algined} ... \end{aligned} as it is not a full math environment and works within the equation wrapping of sphinx.

"Independent and identically distributed" is abbreviated to "IID".

The headings should not use math-environment.

Labels must be written in all small alphabetical letters. Any special character should be avoided in labels except "dash" i.e "-"

All the cite key must use the default google scholar bibtex conventions.

Math lines contained in .. math:: directives should never start with + or - as they get interpreted as markdown. This is a temporary issue with nbconvert

Emphasis and Definitions

Use bold for definitions and italic for emphasis. For example,

  • A closed set is a set whose complement is open.
  • All consumers have identical endowments.

Titles and Headings

  • Capitalization of all words for all titles.

    Example “How it Works: Data, Variables and Names”

Adding References

Adding a Citation to a Lecture

To add a reference to the text of a QuantEcon lecture you need to use the :cite:<bibtex-label> directive.

For example

:cite:`StokeyLucas1989`, chapter 2

is rendered rendered in HTML and LaTex as:

[SLP89], chapter 2

Adding a new reference to QuantEcon

To add a new reference to the project, a bibtex entry needs to be added to lecture-source-py/source/_static/quant-econ.bib.

Sphinx and Restructured Text

Editing

The syntax of the source files is reStructuredText.

Here is a nice primer on how to write reStructuredText files.

Here is the documentation for the Jinja template syntax.

Helpful Links

Building Lectures on OS X

You will need to fetch the Liberation Mono fonts for this repository to build the LaTeX components.

brew tap homebrew/cask-fonts
brew cask install font-liberation-sans
brew cask install font-computer-modern

Converting notebooks to RST files

Sometimes it's convenient to write a lecture as a notebook and then convert to RST

This guide is provided by TJS and requires pandoc 2.6 or newer

(Use pandoc --version to test)

  1. This step is necessary only if you want to strip out dollar signs from maths

    • python latex_space_strip.py [myinputfile.ipynb] -o [myoutputfile.ipynb]
  2. To convert, use

    • pandoc [myfilenamenew.pynb] -f ipynb+tex_math_dollars -t rst -s -o [newfilename.rst]