Skip to content

Standardize LaTeX math notation: replace pmatrix with bmatrix across all lecture files #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 12, 2025

This PR standardizes LaTeX math notation throughout the lecture files by replacing all instances of pmatrix with bmatrix to align with the QuantEcon style guide.

Changes Made

  • 7 lecture files updated with consistent bmatrix notation
  • 43 total replacements of \begin{pmatrix}\begin{bmatrix} and \end{pmatrix}\end{bmatrix}
  • All LaTeX syntax remains properly balanced and valid

Files Modified

  • lectures/svd_intro.md (3 instances)
  • lectures/stats_examples.md (1 instance)
  • lectures/lagrangian_lqdp.md (13 instances)
  • lectures/multi_hyper.md (3 instances)
  • lectures/opt_transport.md (7 instances)
  • lectures/newton_method.md (13 instances)
  • lectures/lake_model.md (3 instances)

Example Change

Before:

X = \begin{pmatrix}
    U_{t+1}/N_{t+1} \\
    E_{t+1}/N_{t+1}
\end{pmatrix}

After:

X = \begin{bmatrix}
    U_{t+1}/N_{t+1} \\
    E_{t+1}/N_{t+1}
\end{bmatrix}

The changes are purely stylistic and maintain all mathematical content while ensuring consistency with the established style guide. All matrix expressions now use square brackets (bmatrix) instead of parentheses (pmatrix).

Fixes #314.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Standardize on bmatrix (instead of pmatrix) for LaTeX Math in Lectures Standardize LaTeX math notation: replace pmatrix with bmatrix across all lecture files Aug 12, 2025
@Copilot Copilot AI requested a review from mmcky August 12, 2025 04:32
Copilot finished work on behalf of mmcky August 12, 2025 04:32
@mmcky
Copy link
Contributor

mmcky commented Aug 12, 2025

Here is the relevant style guide page

https://manual.quantecon.org/styleguide/math.html

Copy link

github-actions bot commented Aug 12, 2025

@github-actions github-actions bot temporarily deployed to pull request August 12, 2025 05:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 12, 2025 05:09 Inactive
@mmcky
Copy link
Contributor

mmcky commented Aug 12, 2025

This PR updates the bracket style for matrices to use square brackets.

Screenshot 2025-08-12 at 3 34 10 pm
  • this issue should be copied to other lecture repositories for the style to be unified across the lecture series.

@mmcky mmcky marked this pull request as ready for review August 12, 2025 05:35
@mmcky mmcky moved this to In Progress in Review Lectures & Modernise Code Aug 12, 2025
@mmcky mmcky added the ready label Aug 12, 2025
@jstac
Copy link
Contributor

jstac commented Aug 12, 2025

Thanks @mmcky

@mmcky
Copy link
Contributor

mmcky commented Aug 12, 2025

@bishmaybarik would you have time to look through the diff of this PR and cross-check to see if these changes are consistent and make sense in context? I have had a pretty good look myself and we can discuss when we link up on Thursday.

@mmcky mmcky requested a review from bishmaybarik August 12, 2025 05:50
@bishmaybarik
Copy link
Member

Hi @mmcky, I'd love to go through the PR and flag any points that is not consistent. I'll let you know by Thursday during our meeting.

@bishmaybarik
Copy link
Member

Hey @mmcky, I have checked the changes and the PR, and I guess this looks good!

@mmcky
Copy link
Contributor

mmcky commented Aug 14, 2025

@HumphreyYang this is good to merge.

The changes are just updating the style of matrices brackets (to use square brackets) but let me know if you think we should hold until 26th August 2025 re: @thomassargent30 teaching.

@mmcky
Copy link
Contributor

mmcky commented Aug 14, 2025

Hey @mmcky, I have checked the changes and the PR, and I guess this looks good!

Thanks @bishmaybarik for a second set of eyes. It's a big help.

@HumphreyYang
Copy link
Member

Many thanks @mmcky,

It looks great to me! It does not touch on the lectures we are working on now.

@mmcky
Copy link
Contributor

mmcky commented Aug 14, 2025

@copilot is it possible for you to open a tracking issue in https://github.com/QuantEcon/meta that suggests this style review for other lecture series.
It would be great if you could add a checklist in the markdown of all lecture repositories in the QuantEcon organisation that start with lecture- in the repository name, and link this PR to the list item for lecture-python.myst and check it off.

Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@copilot is it possible for you to open a tracking issue in https://github.com/QuantEcon/meta that suggests this style review for other lecture series.
It would be great if you could add a checklist...

I'm unable to create GitHub issues directly, but I can provide you with the tracking issue content that you can create manually in the QuantEcon/meta repository.

Based on my search of the QuantEcon organization, here are all the repositories starting with "lecture-":

Tracking Issue: Standardize LaTeX Matrix Notation Across Lecture Repositories

This tracks the progress of updating matrix notation from pmatrix to bmatrix across all QuantEcon lecture repositories to align with the style guide.

Progress Checklist:

  • lecture-python.myst (completed in PR [link to current PR])
  • lecture-source-py (archived)
  • lecture-source-jl (archived)
  • lecture-julia.notebooks
  • lecture-python-programming.notebooks
  • lecture-datascience.notebooks
  • lecture-julia.myst
  • lecture-python
  • lecture-datascience.myst
  • lecture-python-programming.myst
  • lecture-python-advanced
  • lecture-python-advanced.myst
  • lecture-python-advanced.notebooks
  • lecture-python-programming
  • lecture-python-intro
  • lecture-python-intro.notebooks
  • lecture-jax
  • lecture-econometrics-machine-learning
  • lecture-intro.zh-cn
  • lecture-python.notebooks
  • lecture-python.zh-cn
  • lecture-jax.notebooks

Reference: QuantEcon Style Guide - Math Notation

You can create this issue in the QuantEcon/meta repository and update the checklist as repositories are processed.

@Copilot Copilot AI requested a review from mmcky August 14, 2025 05:23
Copilot finished work on behalf of mmcky August 14, 2025 05:23
@mmcky mmcky merged commit f621a93 into main Aug 14, 2025
8 checks passed
@mmcky mmcky deleted the copilot/fix-314 branch August 14, 2025 05:24
@github-project-automation github-project-automation bot moved this from In Progress to Done in Review Lectures & Modernise Code Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Standardize on bmatrix (instead of pmatrix) for LaTeX Math in Lectures
5 participants