You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/article/README.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The most important thing to remember when authoring in a codespace is that you a
35
35
36
36
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.
37
37
38
-
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
38
+
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
39
39
a. If you know that the package is called `mypackage` then enter the following two lines:
40
40
41
41
```bash
@@ -48,12 +48,21 @@ We have tried to keep the codespace small (so it starts up quickly and doesn't e
48
48
tlmgr search --global --all "mypackage.sty"
49
49
```
50
50
51
-
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.
52
-
53
-
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`).
51
+
2. Then please 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. The next time you update PreTeXt, you should get the better version of the devcontainer and everyone else will benefit as well.
54
52
55
53
### Troubleshooting: sageplot images
56
54
57
-
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.
55
+
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.
56
+
57
+
Open the file `.devcontainer/devcontainer.json` and edit the line that contains
58
+
59
+
```
60
+
"image": "pretextbook/pretext:latest",
61
+
```
62
+
(or perhaps instead of `latest`, you have a version number). Change this to
63
+
64
+
```
65
+
"image": "pretextbook/pretext-full:latest",
66
+
```
58
67
59
-
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.
68
+
VS Code should prompt you to rebuild your codespace, which you should do (you do not need to do a "full rebuild" though). This docker image contains sagemath and you should be able to add sageplots and generate them successfully now.
Copy file name to clipboardExpand all lines: templates/book/README.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ The most important thing to remember when authoring in a codespace is that you a
36
36
37
37
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.
38
38
39
-
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
39
+
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
40
40
a. If you know that the package is called `mypackage` then enter the following two lines:
41
41
42
42
```bash
@@ -49,12 +49,21 @@ We have tried to keep the codespace small (so it starts up quickly and doesn't e
49
49
tlmgr search --global --all "mypackage.sty"
50
50
```
51
51
52
-
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.
53
-
54
-
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`).
52
+
2. Then please 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. The next time you update PreTeXt, you should get the better version of the devcontainer and everyone else will benefit as well.
55
53
56
54
### Troubleshooting: sageplot images
57
55
58
-
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.
56
+
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.
57
+
58
+
Open the file `.devcontainer/devcontainer.json` and edit the line that contains
59
+
60
+
```
61
+
"image": "pretextbook/pretext:latest",
62
+
```
63
+
(or perhaps instead of `latest`, you have a version number). Change this to
64
+
65
+
```
66
+
"image": "pretextbook/pretext-full:latest",
67
+
```
59
68
60
-
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.
69
+
VS Code should prompt you to rebuild your codespace, which you should do (you do not need to do a "full rebuild" though). This docker image contains sagemath and you should be able to add sageplots and generate them successfully now.
Copy file name to clipboardExpand all lines: templates/course/README.md
+42-20Lines changed: 42 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,56 @@
1
1
# My PreTeXt Course
2
2
3
-
This README was generated by running `pretext new course`. You should feel free to edit this to describe your project. Thanks to Mitch Keller for his contributions to this template.
3
+
This README was generated by running `pretext new course`. You should feel free to edit this to describe your project.
4
4
5
5
## Instructions
6
6
7
-
Build the entire course with:
7
+
The course template includes a single PreTeXt "book" that contains (as chapters) different course documents you might want to share with students. What is included is determined by the `main.ptx` file in the `source` folder. The starts of files for a syllabus, weekly notes, activities (worksheets), handouts, and homework are also included.
8
+
9
+
You can build the course using
8
10
9
11
```bash
10
-
pretext build --deploys
12
+
pretext build course
11
13
```
12
14
13
-
and then view it with
15
+
and view it with
14
16
15
17
```bash
16
-
pretext deploy --stage-only
17
-
pretext view -d
18
+
pretext view course
18
19
```
19
20
20
-
If you want to build just a single activity, say the "Magic Beans" activity, run:
21
+
Also included is the start of a slide deck. This is a single file in the `source/slides` folder. You could use this for all the slides in a course (as a single slideshow), or create separate slideshows. In that case, you might want to build those separate ones with something like,
21
22
22
23
```bash
23
-
pretext build pdf -i ./source/activities/magic-beans.ptx
This will build both the course "book" and the slide deck. You can create a landing page with links to each of these automatically with the command,
34
36
35
-
### How this is done
37
+
```bash
38
+
pretext deploy --stage-only
39
+
```
36
40
37
-
Look at the source files, in particular `source/acitivies.ptx`and `source/activities/magic-beans.ptx` to see how the activities are included in the main document and can also build on their own.
41
+
and then view the results with,
38
42
39
-
The use of `xpointer="/1/1/1"` is a little mysterious; we could have also used `xpoint="Activity-magic-beans"` to refer to the activity by its `xml:id`, although this would require us changing that for each included activity.
43
+
```bash
44
+
pretext view -d
45
+
```
40
46
47
+
If you then run
48
+
49
+
```bash
50
+
pretext deploy
51
+
```
52
+
53
+
everything will be pushed to github pages.
41
54
42
55
---
43
56
@@ -61,7 +74,7 @@ The most important thing to remember when authoring in a codespace is that you a
61
74
62
75
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.
63
76
64
-
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
77
+
1. To quickly resolve the issue yourself, open a terminal (``Ctrl+Shift+` ``) and use the TeXLive Package Manager to install the missing package.
65
78
a. If you know that the package is called `mypackage` then enter the following two lines:
66
79
67
80
```bash
@@ -74,12 +87,21 @@ We have tried to keep the codespace small (so it starts up quickly and doesn't e
74
87
tlmgr search --global --all "mypackage.sty"
75
88
```
76
89
77
-
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.
78
-
79
-
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`).
90
+
2. Then please 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. The next time you update PreTeXt, you should get the better version of the devcontainer and everyone else will benefit as well.
80
91
81
92
### Troubleshooting: sageplot images
82
93
83
-
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.
94
+
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.
95
+
96
+
Open the file `.devcontainer/devcontainer.json` and edit the line that contains
97
+
98
+
```
99
+
"image": "pretextbook/pretext:latest",
100
+
```
101
+
(or perhaps instead of `latest`, you have a version number). Change this to
102
+
103
+
```
104
+
"image": "pretextbook/pretext-full:latest",
105
+
```
84
106
85
-
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.
107
+
VS Code should prompt you to rebuild your codespace, which you should do (you do not need to do a "full rebuild" though). This docker image contains sagemath and you should be able to add sageplots and generate them successfully now.
Copy file name to clipboardExpand all lines: templates/course/project.ptx
+23-23Lines changed: 23 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,32 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- This file, the project manifest, provides the overall configuration for your PreTeXt project. To edit the content of your document, open `source/main.ptx`. See https://pretextbook.org/doc/guide/html/processing-CLI.html#cli-project-manifest. -->
<!-- The following targets are used to create stand-alone documents, which could be additional slide decks, pdfs, or SCORM archives. Run with `pretext build slides -i source/slides/[filename.ptx]`, for example. -->
0 commit comments