Skip to content

Seed the 37 missing lectures — full source-TOC coverage (Opus 4.8)#196

Merged
mmcky merged 1 commit into
mainfrom
seed/intermediate-batch-2
Jul 22, 2026
Merged

Seed the 37 missing lectures — full source-TOC coverage (Opus 4.8)#196
mmcky merged 1 commit into
mainfrom
seed/intermediate-batch-2

Conversation

@mmcky

@mmcky mmcky commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The complete Phase 2 gap-fill as a single PR, per Matt's call (supersedes the closed #194 — its five lectures are included here unchanged). With this merged, every lecture in the source _toc.yml has a Chinese edition: 121/121 coverage, and every file carries a heading map and .translate/state entry so sync discovery spans the whole corpus from day one.

Translation: translate init on claude-opus-4-8 (the seed-model guidance), v0.20.0+ engine with the structural parity guard. 12 lectures ran sequentially, the remaining 20 at -j 4 parallel; ~66K tokens/lecture. Machine draft pending native review, per the fr/fa precedent.

Beyond the 37 lectures, the diff contains:

  • _toc.yml — 37 entries inserted at their source-order positions (validated: parses, 120 entries + root = source structure).
  • quant-econ.bib — synced from source, plus three entries the source bib itself lacks: GilboaSchmeidler:1989, Whittle_1981, Whittle_1990 are cited by robust_permanent_income/theil_2 upstream but missing from the source bib (dangling upstream — being reported to lecture-python.myst); entries recovered verbatim from lecture-python-advanced.myst. Verified: all 144 citation keys across the 37 resolve, zero duplicate keys, and no key cited anywhere in the repo is removed.
  • Font blocks — the engine's i18n-font-config rule missed five lectures (aiyagari_egm, ifp_discrete, ifp_opi, inventory_q, morris_learn — all heavy matplotlib users); the standard CJK block was injected by hand, and all 37 use this repo's fonts/ path convention.
  • _static assets for the two Hansen-Singleton lectures (referenced by their content).

Checks run: code-cell and fence counts identical to source on all 37; heading maps present in every file; no text.usetex (zh convention); TOC parses; bib coverage complete. No environment.yml changes — the build env covers all imports (the JAX users follow the same pattern as the merged resyncs).

Known review notes: the AI review workflow has no path for seed PRs (QuantEcon/action-translation#131), so this PR's gates are the preview build plus native review. Document-local phrase consistency across 37 fresh translations is the main thing machine review can't yet check (QuantEcon/action-translation#133).

🤖 Generated with Claude Code

Completes the Phase 2 gap-fill in one pass: every lecture in the source
_toc.yml now has a Chinese edition (121/121). Translated with
claude-opus-4-8 via translate init (action-translation, parity guard on),
with heading maps and .translate/state entries so sync discovery covers
the full corpus.

Also: 37 _toc.yml entries inserted in source order; quant-econ.bib synced
from source plus three entries the source bib itself lacks
(GilboaSchmeidler:1989, Whittle_1981, Whittle_1990 — dangling upstream,
recovered from lecture-python-advanced.myst); CJK font blocks injected
into five lectures the localisation rule missed; font paths normalised
to this repo's fonts/ convention.

Part of QuantEcon/project-translation#14; supersedes the closed #194.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 7b0cd02
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a60383a017dda00083603dd
😎 Deploy Preview https://deploy-preview-196--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mmcky
mmcky marked this pull request as ready for review July 22, 2026 03:43
Copilot AI review requested due to automatic review settings July 22, 2026 03:43
@mmcky
mmcky merged commit be4a8b2 into main Jul 22, 2026
6 checks passed
@mmcky
mmcky deleted the seed/intermediate-batch-2 branch July 22, 2026 03:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 22, 2026 03:47 Inactive
mmcky added a commit that referenced this pull request Jul 24, 2026
)

* Restore the CJK font block in three lectures (#205)

These three lectures set Chinese text on their figures but never register a
CJK font, so matplotlib falls back to DejaVu Sans — which has no CJK coverage
— and every Chinese axis label, title and legend entry renders as blank boxes
("tofu"). Nothing errors and a valid PNG is written, so the build stays green
and the defect only shows up in the published output.

Affected labels include 密度 / KL散度 / JS散度 / 切尔诺夫熵 in
divergence_measures.md, 收益率 / 日期 / 时间 / 对数秩 / 对数规模 in
kesten_processes.md, and the subplot titles 价值函数 / $s$策略 / $\phi$策略
in jv.md.

Adds this edition's standard block to the first code cell that imports
matplotlib in each file, immediately after `import matplotlib.pyplot as plt`
so it runs before any figure is drawn:

    import matplotlib as mpl
    FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf"
    mpl.font_manager.fontManager.addfont(FONTPATH)
    plt.rcParams['font.family'] = ['Source Han Serif SC']

Matches the convention already used by the other 112 lectures here (see
aiyagari.md); the path resolves against lectures/, where
fonts/SourceHanSerifSC-SemiBold.otf is checked in. Same class of gap as the
five lectures fixed in #196 — nothing else in these files is touched.

See #205

* Add a DejaVu fallback to font.family, and register the font in two more lectures

Setting font.family to a single entry removes matplotlib's fallback, so any
character the CJK font lacks renders as a blank box. Source Han Serif SC follows
Adobe-GB1, which omits subscript digits (U+2080-2083), the vertical ellipsis
(U+22EE), and the lunate/symbol Greek forms (U+03F5 epsilon, U+03D5 phi) — all
of which these lectures use in figure labels.

Measured on matplotlib 3.11.1 with this repo's own font, rendering a label
containing 密钥拆分树, key₀, ⋮, ϵ and ϕ:

    font.family = ['Source Han Serif SC']                  -> 4 missing-glyph warnings
    font.family = ['Source Han Serif SC', 'DejaVu Sans']   -> 0

Two lectures already carried the block and were silently losing characters to
it: career.md sets ylabel='ϵ' (and label='ϵ'), affine_risk_prices.md builds
label=f"... (r₁ = ...)". Both are fixed by the fallback alone.

This deviates from the single-entry dialect used elsewhere in the edition. That
is deliberate: the dialect is missing a fallback, and adding one is strictly an
improvement everywhere it appears.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants