Skip to content

Commit

Permalink
feat(sectioned-book): added new layout for books that have exercises …
Browse files Browse the repository at this point in the history
…per section, not per chapter
  • Loading branch information
chiragbharadwaj committed Jan 4, 2025
1 parent 22ed9ce commit ab1c023
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 7 deletions.
5 changes: 2 additions & 3 deletions _layouts/book.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ <h3 style="font-family: Merriweather; font-weight: 100">
</thead>
<tbody>
{% assign this_path = page.path | replace: 'index.md', 'solutions' %}
{% assign index = 1 %}
{% for solution in site.pages %}
<tr>
{% assign that_path_parts = solution.path | split: '/' %}
{% assign new_size = that_path_parts.size | minus: 1 %}
{% assign that_path = that_path_parts | slice: 0, new_size | join: '/' %}
{% if that_path == this_path %}
{% assign chapter = that_path_parts.last | remove: '.md' | split: '-' %}
<td>
{{ index }}
{{ chapter.last }}
</td>
<td>
{{ solution.chapter_name }}
Expand All @@ -41,7 +41,6 @@ <h3 style="font-family: Merriweather; font-weight: 100">
<td>
{{ solution.date | date: '%-d %b %Y' }}
</td>
{% assign index = index | plus: 1 %}
{% endif %}
</tr>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="stylesheet" href="{{site.baseurl}}/_assets/css/font-awesome.min.css">
<link rel="stylesheet" href="{{site.baseurl}}/_assets/css/styles.css">

{% if page.katex %}
{% if page.katex or layout.katex %}
<!-- Linking in KaTeX if MathJax is chosen (i.e. overriding it.) -->
<link rel="stylesheet" href="{{site.baseurl}}/_assets/css/katex.min.css">
{% endif %}
Expand Down Expand Up @@ -82,7 +82,7 @@
{% endunless %}
</div>

{% if page.katex %}
{% if page.katex or layout.katex %}
<!-- Auto-rendering KaTeX on pages with equations. -->
<script src="{{site.baseurl}}/_assets/js/katex.min.js"></script>
<script src="{{site.baseurl}}/_assets/js/auto-render.min.js"></script>
Expand Down
56 changes: 56 additions & 0 deletions _layouts/sectioned-book.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
layout: default
katex: true
---

<h1>{{ page.book_name }}</h1>
<h3 style="font-family: Merriweather; font-weight: 100">
<i>{{ page.author }}</i>
</h3>
<hr/>

{{content}}

<table>
<thead>
<tr>
<th>Chapter</th>
<th>Section</th>
<th>Chapter title</th>
<th>Section title</th>
<th>Solutions</th>
<th>Last updated</th>
</tr>
</thead>
<tbody>
{% assign this_path = page.path | replace: 'index.md', 'solutions' %}
{% for solution in site.pages %}
<tr>
{% assign that_path_parts = solution.path | split: '/' %}
{% assign new_size = that_path_parts.size | minus: 1 %}
{% assign that_path = that_path_parts | slice: 0, new_size | join: '/' %}
{% if that_path == this_path %}
{% assign pieces = that_path_parts.last | remove: '.md' | split: '-' %}
<td>
{{ pieces[-2] }}
</td>
<td>
{{ pieces.last }}
</td>
<td>
{{ solution.chapter_name }}
</td>
<td>
{{ solution.section_name }}
</td>
<td>
<a href="{{ solution.url }}">[link]</a>
</td>
<td>
{{ solution.date | date: '%-d %b %Y' }}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
9 changes: 8 additions & 1 deletion _layouts/solutions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
katex: true
---

<h1 style="margin-bottom: 0.25em">{{ page.roman }}. {{ page.chapter_name }}</h1>
{% assign title = "" %}
{% if page.section_name %}
{% assign title = page.section_name %}
{% else %}
{% assign title = page.chapter_name %}
{% endif %}

<h1 style="margin-bottom: 0.25em">{{ page.roman }}. {{ title }}</h1>
<h3 style="color: #444444">Solutions to selected exercises</h3>
<hr/>

Expand Down
10 changes: 10 additions & 0 deletions lectures/books/axler/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: sectioned-book
title: books | axler
book_name: Linear Algebra Done Right
author: Sheldon Axler
---

Axler's _Linear Algebra Done Right_ renders a slightly unothordox treatment of linear algebra; it does visit all of the traditional topics seen in a linear algebra curriculum, but reorders some of them in order to expose intuition in a logical manner. Most importantly, Axler's text relegates any discussion of determinants to the final chapter of the book. He opts to examine all theorems and results under the lens of generalized linear transformations rather than "bash-y" proofs using determinants. In turn, the text takes a more theoretical route through linear algebra, examining the linear structure of various operations rather than limiting oneself to a purely matrix-driven view, as is common in linear algebra classes within engineering curricula around the United States.

As a result, _Linear Algebra Done Right_ is probably best-suited for students who are learning linear algebra for the _second_ time. This ensures that the main computational instincts are instilled before a broader intuition can be broached. While determinants _are_ important in a study of linear algebra, Axler's ideology that they often get in the way indeed rings true. Thus, the text is less focused on computation and more focused on proofs and structure. There are very few exercises oriented around scientific applications or computationally-intensive arithmetic. For mature students looking to grok a more thorough understanding of linear algebra and its immense utility in a wide variety of fields, Axler's text accords an unparalleled foundation.
12 changes: 12 additions & 0 deletions lectures/books/axler/solutions/chapter-1-a.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: solutions
title: books | axler | ch 1a
roman: 1a
chapter_name: Vector Spaces
section_name: $R^n$ and $C^n$
date: 2025-01-03
---

![construction][]

[construction]: {{site.baseurl}}/_data/images/construction.png
2 changes: 1 addition & 1 deletion lectures/books/pugh/solutions/chapter-1.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: solutions
title: books | pugh | ch 1
roman: I
roman: 1
chapter_name: Real Numbers
date: 2024-12-26
---
Expand Down

0 comments on commit ab1c023

Please sign in to comment.