Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5443a3ebc4 | ||
|
|
96d611767e | ||
|
|
86998ca8d6 | ||
|
|
2451ec3512 | ||
|
|
15a3314f4a | ||
|
|
1988708dd8 | ||
|
|
6df226795e | ||
|
|
91d0ee444d | ||
|
|
546dd05cb5 | ||
|
|
ad825054c0 | ||
|
|
e3347701e7 | ||
|
|
dd30f07ea1 | ||
|
|
11b3e582f8 | ||
|
|
8e8179cc79 | ||
|
|
c800eaee2b | ||
|
|
f83d51a526 | ||
|
|
f03e822e02 | ||
|
|
b4b9f041ac | ||
|
|
85644a4681 | ||
|
|
2d3e7d69cc | ||
|
|
a4f71931a9 | ||
|
|
c320513339 | ||
|
|
d40b5e0022 | ||
|
|
b0908cfd98 | ||
|
|
78eb8eb2b9 | ||
|
|
3dc572bc2c | ||
|
|
2b901c90a6 | ||
|
|
7e872687ef | ||
|
|
a729dd6ce3 | ||
|
|
06e6f40e09 | ||
|
|
652dd51dab | ||
|
|
176ced7a10 | ||
|
|
3e039c853e | ||
|
|
ee9c9e7430 | ||
|
|
6fbd146772 | ||
|
|
4abdc6dda9 | ||
|
|
67faf390ff | ||
|
|
bef1761633 | ||
|
|
0e4e9cc747 | ||
|
|
2114c9c90e | ||
|
|
8cfd805aeb | ||
|
|
c7f39b7693 | ||
|
|
10f35d3eb8 | ||
|
|
82889f6a06 | ||
|
|
b9bec871e3 | ||
|
|
a22281ed62 | ||
|
|
0da85c8163 | ||
|
|
3ddb5623a0 | ||
|
|
998374af65 | ||
|
|
ac8b2f304d | ||
|
|
5602f92eb7 | ||
|
|
a6bd475da4 |
@@ -0,0 +1,86 @@
|
||||
// This file was automatically generated with PreTeXt 2.45.0.
|
||||
// If you modify this file, PreTeXt will no longer automatically update it.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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
|
||||
// latest updates unless you remove the first comment line above.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////
|
||||
{
|
||||
"image": "pretextbook/pretext-full:1.14", // 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.14",
|
||||
"features": {"ghcr.io/devcontainers/features/github-cli": {}},
|
||||
|
||||
// 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)"
|
||||
},
|
||||
|
||||
|
||||
// Port forwarding
|
||||
// ---------------
|
||||
// This is needed by the CodeChat Server.
|
||||
"forwardPorts": [
|
||||
// The port used for a Thrift connection between the VSCode CodeChat
|
||||
// extension and the CodeChat Server.
|
||||
27376,
|
||||
// The port used for an HTTP connection from the CodeChat Client to
|
||||
// the CodeChat Server.
|
||||
27377,
|
||||
// The port used by a websocket connection between the CodeChat
|
||||
// Server and the CodeChat Client.
|
||||
27378
|
||||
],
|
||||
// See the [docs](https://containers.dev/implementors/json_reference/#port-attributes).
|
||||
"portsAttributes": {
|
||||
"27376": {
|
||||
"label": "VSCode extension <-> CodeChat Server",
|
||||
"requireLocalPort": true
|
||||
},
|
||||
"27377": {
|
||||
"label": "CodeChat Client",
|
||||
"requireLocalPort": true
|
||||
},
|
||||
"27378": {
|
||||
"label": "CodeChat Client<->Server websocket",
|
||||
"requireLocalPort": true
|
||||
// This port needs to be public; however, there's no way to specify port visibility here. See `server.py` in the CodeChat Server for details.
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
"codespaces": {
|
||||
"openFiles": ["README.md"]
|
||||
},
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"editor.quickSuggestions": {
|
||||
"other": "off"
|
||||
},
|
||||
"editor.suggest.showProperties": false,
|
||||
"editor.snippetSuggestions": "bottom",
|
||||
"files.autoSave": "afterDelay",
|
||||
"xml.validation.enabled": true,
|
||||
"redhat.telemetry.enabled": false,
|
||||
"CodeChat.CodeChatServer.Command": "CodeChat_Server"
|
||||
},
|
||||
"extensions": [
|
||||
"oscarlevin.pretext-tools",
|
||||
"CodeChat.codechat",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"alpinebuster.vscode-latex-table-editor",
|
||||
"mathematic.vscode-pdf"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file was automatically generated with PreTeXt 2.19.3.
|
||||
# If you modify this file, PreTeXt will no longer automatically update it.
|
||||
|
||||
# We use TinyTeX (https://yihui.org/tinytex/)
|
||||
wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh
|
||||
|
||||
tlmgr install adjustbox amscdx bold-extra braket bussproofs cancel carlisle cases chessfss circuitikz colortbl enumitem extpfeil fontawesome5 fontaxes gensymb imakeidx jknapltx kastrup lambda-lists listings listingsutf8 makeindex marvosym mathalpha mathtools menukeys mhchem microtype musicography newpx newtx nicematrix pdfcol pdfpages pdflscape pgfplots phaistos physics polyglossia pstricks realscripts relsize siunitx skak skaknew smartdiagram snapshot stmaryrd tcolorbox tikz-cd tikzfill titlesec txfonts ulem upquote was xfrac xltxtra xpatch xstring
|
||||
|
||||
tlmgr path add
|
||||
|
||||
# Ensure fonts provided by TinyTeX are available, as suggested in the pretext guide
|
||||
fontconfig="<?xml version=\"1.0\"?>
|
||||
<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">
|
||||
<fontconfig>
|
||||
<dir>~/.TinyTeX/texmf-dist/fonts</dir>
|
||||
<dir>~/.TinyTeX/texmf-local/fonts</dir>
|
||||
</fontconfig>"
|
||||
|
||||
fontconfig_path="/etc/fonts/conf.d/09-texlive-fonts.conf"
|
||||
if [ ! -f "$fontconfig_path" ]; then
|
||||
echo "Creating fontconfig file at $fontconfig_path"
|
||||
echo "$fontconfig" | sudo tee "$fontconfig_path" > /dev/null
|
||||
else
|
||||
echo "Fontconfig file already exists at $fontconfig_path"
|
||||
fi
|
||||
# Update font cache
|
||||
fc-cache -f -v
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file was automatically generated with PreTeXt 2.32.0.
|
||||
# If you modify this file, PreTeXt will no longer automatically update it.
|
||||
|
||||
wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-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
|
||||
sudo apt-get install -y --no-install-recommends ./pandoc.deb
|
||||
|
||||
rm pandoc.deb
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file was automatically generated with PreTeXt 2.19.3.
|
||||
# If you modify this file, PreTeXt will no longer automatically update it.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
python3-louis \
|
||||
libcairo2-dev \
|
||||
librsvg2-bin
|
||||
|
||||
pip install --upgrade pip --break-system-packages
|
||||
|
||||
pip install pretext[homepage,prefigure] pycairo --only-binary {greenlet} --break-system-packages
|
||||
|
||||
pip install codechat-server --break-system-packages
|
||||
|
||||
playwright install-deps
|
||||
|
||||
playwright install
|
||||
|
||||
|
||||
# echo '/usr/lib/python3/dist-packages' > /usr/local/lib/python3.8/dist-packages/louis.pth
|
||||
prefig init
|
||||
|
||||
# Install mermaid for diagrams
|
||||
npm install -g @mermaid-js/mermaid-cli
|
||||
|
||||
echo "PreTeXt installation complete."
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This file was automatically generated with PreTeXt 2.32.0.
|
||||
# If you modify this file, PreTeXt will no longer automatically update it.
|
||||
|
||||
# Conda should already be installed in the codespace. We need to add the conda-forge channel
|
||||
|
||||
conda config --add channels conda-forge
|
||||
conda config --set channel_priority strict
|
||||
|
||||
# We don't want conda to open the base environment always:
|
||||
conda config --set auto_activate_base false
|
||||
|
||||
# Now create a conda environment for sage (called sage):
|
||||
conda create --yes -n sage sage python=3.12
|
||||
|
||||
conda init
|
||||
|
||||
echo 'conda activate sage' >> ~/.bashrc
|
||||
|
||||
source ~/.bashrc
|
||||
@@ -0,0 +1,117 @@
|
||||
# This file was automatically generated with PreTeXt 2.45.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 demand
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: oscarlevin/pretext-full
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- 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: |
|
||||
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
|
||||
|
||||
- name: Bundle output/stage as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: deploy
|
||||
path: output/stage
|
||||
|
||||
deploy-cloudflare:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: vars.CLOUDFLARE_PROJECT_NAME != ''
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deploy
|
||||
path: deploy
|
||||
- name: Create 404.html
|
||||
run: echo "404 page not found" >> deploy/404.html
|
||||
- name: Publish to Cloudflare
|
||||
uses: cloudflare/pages-action@v1
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.head_ref || github.ref_name }}
|
||||
directory: deploy
|
||||
|
||||
deploy-ghpages:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: vars.PTX_ENABLE_DEPLOY_GHPAGES == 'yes' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
concurrency:
|
||||
group: "page"
|
||||
cancel-in-progress: false
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Download website artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: deploy
|
||||
path: deploy
|
||||
- name: Setup GitHub Pages
|
||||
id: check
|
||||
uses: actions/configure-pages@v4
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: deploy
|
||||
- name: Deploy to Github Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -0,0 +1,68 @@
|
||||
# This file was automatically generated with PreTeXt 2.45.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 }}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
# This file was automatically generated with PreTeXt 2.45.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
|
||||
|
||||
# don't track unpublished builds or stage (note: Runestone uses `published`)
|
||||
output
|
||||
published
|
||||
|
||||
# don't track assets generated from source
|
||||
generated-assets
|
||||
.cache
|
||||
|
||||
# don't track the executables.ptx file
|
||||
executables.ptx
|
||||
|
||||
# don't track node packages
|
||||
node_modules
|
||||
|
||||
# don't track error logs
|
||||
.error_schema.log
|
||||
logs
|
||||
|
||||
# don't track OS related files (windows/macos/linux)
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Icon
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
*.stackdump
|
||||
*.lnk
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
[Dd]esktop.ini
|
||||
.directory
|
||||
.fuse_hidden*
|
||||
.Trash-*
|
||||
.nfs*
|
||||
|
||||
# Don't include VSCode generated files
|
||||
.vscode
|
||||
*.code-workspace
|
||||
|
||||
# Don't inlucde SublimeText files
|
||||
# Cache files for Sublime Text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# Workspace files are user-specific
|
||||
*.sublime-workspace
|
||||
|
||||
# Project files should be checked into the repository, unless a significant
|
||||
# proportion of contributors will probably not be using Sublime Text
|
||||
*.sublime-project
|
||||
|
||||
# SFTP configuration file
|
||||
sftp-config.json
|
||||
sftp-config-alt*.json
|
||||
|
||||
# Package control specific files
|
||||
Package Control.last-run
|
||||
Package Control.ca-list
|
||||
Package Control.ca-bundle
|
||||
Package Control.system-ca-bundle
|
||||
Package Control.cache/
|
||||
Package Control.ca-certs/
|
||||
Package Control.merged-ca-bundle
|
||||
Package Control.user-ca-bundle
|
||||
oscrypto-ca-bundle.crt
|
||||
bh_unicode_properties.cache
|
||||
|
||||
# Sublime-github package stores a github token in this file
|
||||
# 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
|
||||
.dropbox.attr
|
||||
.dropbox.cache
|
||||
|
||||
# Don't track codechat config (will be generated automatically)
|
||||
codechat_config.yaml
|
||||
|
||||
# Don't track deprecated workflows
|
||||
.github/workflows/deploy.yml
|
||||
.github/workflows/test-build.yml
|
||||
@@ -1 +0,0 @@
|
||||
{"source/main.ptx": ["my-great-book"], "source/frontmatter.ptx": ["frontmatter", "front-colophon"], "source/ch-Introduction.ptx": ["ch-Introduction", "sec-Introduction"], "source/ch-Probability.ptx": ["ch-Probability"], "source/sec-Set-Theory.ptx": ["sec-Set-Theory"], "source/sec-Probability.ptx": ["sec-Probability"], "source/sec-Conditional-Probability.ptx": ["sec-Conditional-Probability"], "source/sec-Independent-Events.ptx": ["sec-Independent-Events"], "source/ch-Random-Variables.ptx": ["ch-Random-Variables"], "source/sec-Discrete-RVs.ptx": ["sec-Discrete-RVs"], "source/sec-Continuous-RVs.ptx": ["sec-Continuous-RVs"], "source/sec-Joint-Distributions.ptx": ["sec-Joint-Distributions"], "source/ch-Expected-Value.ptx": ["ch-Expected-Value"], "source/sec-Expected-Value.ptx": ["sec-Expected-Value"], "source/sec-Variance.ptx": ["sec-Variance"], "source/sec-Covariance.ptx": ["sec-Covariance"], "source/ch-Confidence-Intervals.ptx": ["ch-Confidence-Intervals"], "source/sec-Likelihood.ptx": ["sec-Likelihood"], "source/sec-CLT.ptx": ["sec-CLT"], "source/sec-Confidence-Intervals.ptx": ["sec-Confidence-Intervals"], "source/ch-Hypothesis-Testing.ptx": ["ch-Hypothesis-Testing"], "source/sec-One-Sample-Tests.ptx": ["sec-One-Sample-Tests"], "source/sec-Two-Sample-Tests.ptx": ["sec-Two-Sample-Tests"], "source/sec-Power.ptx": ["sec-Power"], "source/sec-Chi-Squared.ptx": ["sec-Chi-Squared"], "source/ch-Linear-Regression.ptx": ["ch-Linear-Regression", "sec-Correlation", "sec-Linear-Regression"], "source/backmatter.ptx": ["backmatter"], "source/app-Phi-table.ptx": ["app-Phi-table"], "source/app-Chi-squared-table.ptx": ["app-Chi-squared-table"]}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Oscar Levin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,60 @@
|
||||
# My PreTeXt Book
|
||||
|
||||
This README was generated by running `pretext new book`. You should feel free to edit this to describe your project.
|
||||
|
||||
|
||||
The main source file is `source/main.ptx`. This includes the other chapters of the book.
|
||||
|
||||
To compile the book as an accessible website, run `pretext build web` in a terminal from any directory of this project.
|
||||
|
||||
To preview your output, run `pretext view web`.
|
||||
|
||||
To deploy your output to GitHub pages, run `pretext deploy`.
|
||||
|
||||
To compile a pdf, run `pretext build print`.
|
||||
|
||||
---
|
||||
|
||||
Below you will find some advice for working with PreTeXt, including help with using the [PreTeXt Codespace](https://github.com/PreTeXtBook/pretext-codespace) online editor through GitHub if you don't want to install the required software on your own computer.
|
||||
|
||||
|
||||
## Learning PreTeXt
|
||||
|
||||
See the [PreTeXt documentation](https://pretextbook.org/documentation.html) for links to a variety of resources.
|
||||
|
||||
We also recommend browsing through the [annotated sample article](https://pretextbook.org/examples/sample-article/annotated) and [annotated sample book](https://pretextbook.org/examples/sample-book/annotated/) if you want to find examples and see the PreTeXt source for those examples quickly.
|
||||
|
||||
## Using GitHub Codespaces
|
||||
|
||||
GitHub Codespaces are a way to set up your whole authoring system entirely in your browser. In case you are not already reading this inside a codespace, you can create one specifically designed for authoring in PreTeXt by using [this template](https://github.com/PreTeXtBook/pretext-codespace).
|
||||
|
||||
### Important: how to save your files
|
||||
|
||||
The most important thing to remember when authoring in a codespace is that you are making all your edits on a *virtual machine* off in some remote server farm. This means there is an extra step to save your files. You can save files in the editor (in your browser), but this just saves them to that virtual machine. To make sure you can access these files, even if the virtual machine goes away, you need to sync them to github.com. This is done by *committing* your changes and then *pushing* those commits (or "syncing" them). You might see a warning when you restart your codespace that you have "uncommitted changes" -- make sure you commit them when you are done working.
|
||||
|
||||
### Troubleshooting: Latex-images and pdfs
|
||||
|
||||
We have tried to keep the codespace small (so it starts up quickly and doesn't eat through your monthly storage allotment), so we do not include a full TeXLive distribution. We have tried to include most packages and fonts you are likely to need to generate images using `<latex-image>` elements, and to generate PDF print output. However, if you run into a situation where the LaTeX gives errors about packages missing (like it cannot find a `mypackage.sty` file), here is what you should do.
|
||||
|
||||
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
|
||||
a. If you know that the package is called `mypackage` then enter the following two lines:
|
||||
|
||||
```bash
|
||||
tlmgr install mypackage
|
||||
tlmgr path add
|
||||
```
|
||||
b. If you don't know the name of the package, but know it should contain `mypackage.sty`, then you can search using
|
||||
|
||||
```bash
|
||||
tlmgr search --global --all "mypackage.sty"
|
||||
```
|
||||
|
||||
2. To ensure that you don't have to repeat this step every time you recreate the codespace, add the package name to the list of installs inside the file `.devcontainer/installLatex.sh` which gets run every time a codespace is created.
|
||||
|
||||
3. Better yet, post the name of the missing package to this [GitHub issue](https://github.com/PreTeXtBook/pretext-codespace/issues/21) and we will add it to the devcontainer. This has the advantage that you will still get updates that other authors submit (if you edit the `installLatex.sh` file, then it won't be updated when you run `pretext update`).
|
||||
|
||||
### Troubleshooting: sageplot images
|
||||
|
||||
By far the largest space-hog in a PreTeXt authoring environment is SageMath, which is only required if you generate images using sageplots. By default, SageMath is not installed in a PreTeXt codespace, but it should be easy to install if you need it.
|
||||
|
||||
Just open the command palette (`Ctrl+Shift+P` of `F1`) and search for "PreTeXt: Install SageMath". This will also update the `.devcontainer/devcontainer.json` file so that the next time you create a codespace for this project, it should install automatically.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user