diff --git a/.devcontainer.json b/.devcontainer/devcontainer.json
similarity index 54%
rename from .devcontainer.json
rename to .devcontainer/devcontainer.json
index 732ab66..5d62838 100644
--- a/.devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,33 +1,29 @@
-//
-// (delete the above line to manage this file manually)
+// This file was automatically generated with PreTeXt 2.34.0.
+// If you modify this file, PreTeXt will no longer automatically update it.
+//
//////////////////////////////////////////////////////////////
//
-// This file provides configuration options so that a PreTeXt
+// This file provides configuration options so that a PreTeXt
// project can be edited and built using GitHub's Codespaces.
// It is recommended to keep this in your repository even if you
-// do not use this feature, as it will allow other to explore
-// your project easily.
-// This file will be automatically generated by PreTeXt with the
+// do not use this feature, as it will allow other to explore
+// your project easily.
+// This file will be automatically generated by PreTeXt with the
// latest updates unless you remove the first comment line above.
//
///////////////////////////////////////////////////////////////
{
- "name": "PreTeXt-Codespaces",
-
- // This Docker image includes some LaTeX support, but is still not to large. Note that if you keep your codespace running, it will use up your GitHub free storage quota. Additional options are listed below.
- "image": "oscarlevin/pretext:small",
- // If you need to generate more complicated assets (such as sageplots) or use additional fonts when building to PDF, comment out the above line and uncomment the following line.
- // "image": "oscarlevin/pretext:full",
- // If you only intend to build for web and don't have any latex-image generated assets, you can use a smaller image:
- // "image": "oscarlevin/pretext:lite",
+ // "image": "pretextbook/pretext-full:1.6", // uses latest image from https://hub.docker.com/r/PreTeXtBook/pretext-full/tags
+ // If you don't need sagemath, you can use a smaller base image. Comment out the line above and uncomment the line below to use a smaller image.
+ "image": "pretextbook/pretext:1.6",
+ "features": {"ghcr.io/devcontainers/features/github-cli": {}},
- // Add gh cli as a feature (to support codechat)
- "features": {
- "ghcr.io/devcontainers/features/github-cli:1": {}
- },
+ // The pretext-full image above includes pretext, prefigure, and enough parts of latex and sagemath for most cases. Here we install additional dependencies.
+ "postCreateCommand": {
+ "install pandoc": "bash ./.devcontainer/installPandoc.sh",
+ "mark repo as safe": "git config --global --add safe.directory $(pwd)"
+ },
- // Respect the project's designated dependencies
- "postCreateCommand": "pip install -r requirements.txt",
// Port forwarding
// ---------------
@@ -60,28 +56,31 @@
}
},
+
// Configure tool-specific properties.
"customizations": {
"codespaces": {
- "openFiles": ["source/main.ptx"]
+ "openFiles": ["README.md"]
},
"vscode": {
"settings": {
"editor.quickSuggestions": {
"other": "off"
},
- "editor.snippetSuggestions": "top",
- "xml.validation.enabled": false,
+ "editor.suggest.showProperties": false,
+ "editor.snippetSuggestions": "bottom",
+ "files.autoSave": "afterDelay",
+ "xml.validation.enabled": true,
+ "redhat.telemetry.enabled": false,
"CodeChat.CodeChatServer.Command": "CodeChat_Server"
},
"extensions": [
- "ms-vscode.live-server",
"oscarlevin.pretext-tools",
- "CodeChat.codechat"
+ "CodeChat.codechat",
+ "streetsidesoftware.code-spell-checker",
+ "alpinebuster.vscode-latex-table-editor",
+ "mathematic.vscode-pdf"
]
}
}
-
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
- // "remoteUser": "root"
}
diff --git a/.devcontainer/installPandoc.sh b/.devcontainer/installPandoc.sh
new file mode 100644
index 0000000..e328b12
--- /dev/null
+++ b/.devcontainer/installPandoc.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+# This file was automatically generated with PreTeXt 2.34.0.
+# If you modify this file, PreTeXt will no longer automatically update it.
+
+wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb -O pandoc.deb
+
+# wait for 60 second and then double check that no other script is using apt-get:
+sleep 60
+while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do
+ echo "Waiting for apt-get to be free..."
+ sleep 15
+done
+# Install pandoc
+apt-get install -y --no-install-recommends ./pandoc.deb
+
+rm pandoc.deb
diff --git a/.github/workflows/pretext-cli.yml b/.github/workflows/pretext-cli.yml
index 22b8a3c..733504d 100644
--- a/.github/workflows/pretext-cli.yml
+++ b/.github/workflows/pretext-cli.yml
@@ -1,21 +1,27 @@
-#
-# (delete the above line to manage this file manually)
-
+# This file was automatically generated with PreTeXt 2.34.0.
+# If you modify this file, PreTeXt will no longer automatically update it.
+#
+# This workflow file can be used to automatically build a project and create
+# an artifact for deployment. It can also be used to deploy the project to
+# GitHub Pages or Cloudflare Pages.
+#
+# The workflow is triggered on pull requests or can be run manually. You can uncomment
+# the `push` event to have it run on pushes to the main branch as well.
name: PreTeXt-CLI Actions
on:
# Runs on pull requests
pull_request:
branches: ["*"]
- # Runs on pushes to main
- push:
- branches: ["main"]
+ ## Runs on pushes to main
+ #push:
+ # branches: ["main"]
# Runs on demand
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
- container: oscarlevin/pretext:full
+ container: oscarlevin/pretext-full
steps:
- name: Checkout source
@@ -24,8 +30,26 @@ jobs:
- name: install deps
run: pip install -r requirements.txt
+ - name: set up node
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+
+ - name: install local ptx files
+ run: pretext --version
+
- name: build deploy targets
- run: pretext build --deploys
+ run: |
+ version="$(pretext --version)"
+ major="$(echo $version | cut -d '.' -f 1)"
+ minor="$(echo $version | cut -d '.' -f 2)"
+ if [ "$major" -ge 2 -a "$minor" -ge 5 ]; then
+ echo "PreTeXt version is 2.5 or greater; using new build command"
+ pretext build --deploys
+ else
+ echo "PreTeXt version is less than 2.5, using old build command"
+ pretext build
+ fi
- name: stage deployment
run: pretext deploy --stage-only
diff --git a/.github/workflows/pretext-deploy.yml b/.github/workflows/pretext-deploy.yml
new file mode 100644
index 0000000..085d330
--- /dev/null
+++ b/.github/workflows/pretext-deploy.yml
@@ -0,0 +1,68 @@
+# This file was automatically generated with PreTeXt 2.34.0.
+# If you modify this file, PreTeXt will no longer automatically update it.
+#
+
+name: Build and Deploy
+on:
+ # Currently, this workflow only runs when manually selected (the `workflow_dispatch` event).
+ # If you would like it to run on other events, uncomment some of the lines below.
+
+ # # Runs on pull requests
+ # pull_request:
+ # branches: ["*"]
+
+ # # Runs on pushes to main
+ # push:
+ # branches: ["main"]
+
+ # # Runs every day at 00:00 UTC
+ # schedule:
+ # - cron: '0 0 * * *'
+
+ # Runs on demand
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+ container: oscarlevin/pretext-full
+
+ steps:
+ - name: Checkout source
+ uses: actions/checkout@v4
+
+ - name: set up node
+ uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+
+ - name: add gh-cli
+ run: |
+ apt-get update
+ apt-get install gh jq -y
+
+ - name: setup git config
+ run: |
+ git config --global --add safe.directory $(pwd)
+ git config user.name "${{ github.actor }} via GitHub Actions"
+ git config user.email "${{ github.actor }}@github_actions.no_reply"
+
+ - name: install deps
+ run: pip install -r requirements.txt --break-system-packages
+
+ - name: install local ptx files
+ run: pretext --version
+
+ - name: build deploy targets
+ run: pretext build --deploys
+
+ - name: run deploy
+ run: pretext deploy --no-push
+
+ - name: push gh-pages branch
+ run: git push origin gh-pages --force
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 0096a4e..c68d800 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
-#
-# (delete the above line to manage this file manually)
-
+# This file was automatically generated with PreTeXt 2.34.0.
+# If you modify this file, PreTeXt will no longer automatically update it.
+#
# Boilerplate list of files in a PreTeXt project for git to ignore
# ensure this file is tracked
!.gitignore
@@ -11,6 +11,7 @@ published
# don't track assets generated from source
generated-assets
+.cache
# don't track the executables.ptx file
executables.ptx
@@ -90,6 +91,8 @@ bh_unicode_properties.cache
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
+# Don't track common virtual environment directories
+venv/
# Don't include Dropbox settings and caches
.dropbox
diff --git a/requirements.txt b/requirements.txt
index d53edfa..2289048 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
-#
-pretext == 2.5.2
+# This file was automatically generated with PreTeXt 2.34.0.
+pretext == 2.34.0
diff --git a/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx b/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx
index a010fad..b318210 100644
--- a/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx
+++ b/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx
@@ -1,27 +1,28 @@
-
- Now that you have found an issue to work on, you will need to collaborate with the project community to fix that issue.
- Collaboration in FOSS communities follows patterns of behavior known as Now that you have found an issue to work on, you will need to collaborate with the project
+ community to fix that issue. Collaboration in FOSS communities follows patterns of behavior
+ known as
-
- The exercises in this section will help to familiarize you with the terminology and the process of this basic FOSS workflow.
-
- GitHub uses specific terminology to refer to the copies of the repository.
- Match the GitHub terminology on the left with the repository in
- Review the diagrams of the basic FOSS workflow from the in the class materials.
- GitHub uses specific terminology to refer to the copies of the repository. Match the
+ GitHub terminology on the left with the repository in
-
+ Review the diagrams of the basic FOSS workflow from the in the class materials.
+
- Review the diagrams of the basic FOSS workflow from the in the class materials.
-
+
- Drag the steps of the basic FOSS workflow into the order that they are likely to occur when working on a project.
-
- Fork
-
+ Review the diagrams of the basic FOSS workflow from the in the class materials.
+
- Clone
-
+ Drag the steps of the basic FOSS workflow into the order that they are likely to occur
+ when working on a project.
+
+ Fork
+
- Edit
-
+ Clone
+
- Push
-
+ Edit
+
- Pull Request
-
+ Push
+
- Imagine the process you would go through when starting to work on a project, fixing a bug, and contributing your changes back to the main project.
-
+ Pull Request
+
+ Imagine the process you would go through when starting to work on a project, fixing a bug,
+ and contributing your changes back to the main project.
+
- It will take a while for this process and all of the commands to become a natural part of the way you work.
- To help speed that process, this section provides a chance to collect and review the Git commands that were used in this chapter.
+ It will take a while for this process and all of the commands to become a natural part of the
+ way you work.
+ To help speed that process, this section provides a chance to collect and review the Git
+ commands that were used in this chapter.
- Match the tasks on the right with the appropriate git command listed on the left.
-
+ Match the tasks on the right with the appropriate git command listed on the left.
+
- Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
-
+ Note that the tasks listed are in approximately the same order as they appear in the
+ sections of this chapter.
+
@@ -349,7 +347,6 @@
-
@@ -363,7 +360,20 @@
Choose the best match.
diff --git a/source/ch-merge-conflicts/sec-git-command-summary.ptx b/source/ch-merge-conflicts/sec-git-command-summary.ptx
index 347c7ba..74d7edb 100644
--- a/source/ch-merge-conflicts/sec-git-command-summary.ptx
+++ b/source/ch-merge-conflicts/sec-git-command-summary.ptx
@@ -22,7 +22,7 @@
Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
@@ -45,7 +45,7 @@
Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
diff --git a/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx b/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx
index 07b6a74..239ebb6 100644
--- a/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx
+++ b/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx
@@ -53,7 +53,18 @@
Read the introduction to this section.
diff --git a/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx b/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx
index 97c6d85..948da1f 100644
--- a/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx
+++ b/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx
@@ -68,7 +68,20 @@
Compare the terms used in the merge tool options to the information displayed in the first and last lines of the merge conflict information. diff --git a/source/ch-staying-synchronized/sec-git-command-summary.ptx b/source/ch-staying-synchronized/sec-git-command-summary.ptx index 07ddf2f..b5c0f39 100644 --- a/source/ch-staying-synchronized/sec-git-command-summary.ptx +++ b/source/ch-staying-synchronized/sec-git-command-summary.ptx @@ -23,7 +23,7 @@ Refer back to the sections in this chapter to see what each command does.
-Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. diff --git a/source/ch-staying-synchronized/sec-lets-do-it-again.ptx b/source/ch-staying-synchronized/sec-lets-do-it-again.ptx index 29cb730..3fa57aa 100644 --- a/source/ch-staying-synchronized/sec-lets-do-it-again.ptx +++ b/source/ch-staying-synchronized/sec-lets-do-it-again.ptx @@ -221,7 +221,7 @@ Match the Git commands will you use for each of the tasks indicated below.
-
The command reference that you created in
The base is where you want your changes merged into/the repository you created your fork from. @@ -129,11 +134,16 @@ Match the right hand column with either base branch or compare branch to indicate which is “pulled from” or “merged into”.
-
The base is where you want your changes merged into.
diff --git a/source/ch-upstreaming-changes/sec-git-command-summary.ptx b/source/ch-upstreaming-changes/sec-git-command-summary.ptx
index f374308..1735995 100644
--- a/source/ch-upstreaming-changes/sec-git-command-summary.ptx
+++ b/source/ch-upstreaming-changes/sec-git-command-summary.ptx
@@ -12,54 +12,104 @@
- Match the tasks on the right with the appropriate git command listed on the left.
-
- Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
-
+ Match the tasks on the right with the appropriate git command listed on the left.
+
+ Note that the tasks listed are in approximately the same order as they appear in the
+ sections of this chapter.
+
- Match the tasks on the right with the appropriate git command listed on the left.
-
- Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
-
+ Match the tasks on the right with the appropriate git command listed on the left.
+
+ Note that the tasks listed are in approximately the same order as they appear in the
+ sections of this chapter.
+