Skip to content

Commit b4b50a2

Browse files
committed
Update to PreTeXt project source.
1 parent 5abb4af commit b4b50a2

31 files changed

+379
-0
lines changed

.devcontainer.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// <!-- Managed automatically by PreTeXt authoring tools -->
2+
// (delete the above line to manage this file manually)
3+
//////////////////////////////////////////////////////////////
4+
//
5+
// This file provides configuration options so that a PreTeXt
6+
// project can be edited and built using GitHub's Codespaces.
7+
// It is recommended to keep this in your repository even if you
8+
// do not use this feature, as it will allow other to explore
9+
// your project easily.
10+
// This file will be automatically generated by PreTeXt with the
11+
// latest updates unless you remove the first comment line above.
12+
//
13+
///////////////////////////////////////////////////////////////
14+
{
15+
"name": "PreTeXt-Codespaces",
16+
17+
// 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.
18+
"image": "oscarlevin/pretext:small",
19+
// 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.
20+
// "image": "oscarlevin/pretext:full",
21+
// If you only intend to build for web and don't have any latex-image generated assets, you can use a smaller image:
22+
// "image": "oscarlevin/pretext:lite",
23+
24+
// Add gh cli as a feature (to support codechat)
25+
"features": {
26+
"ghcr.io/devcontainers/features/github-cli:1": {}
27+
},
28+
29+
// Port forwarding
30+
// ---------------
31+
// This is needed by the CodeChat Server.
32+
"forwardPorts": [
33+
// The port used for a Thrift connection between the VSCode CodeChat
34+
// extension and the CodeChat Server.
35+
27376,
36+
// The port used for an HTTP connection from the CodeChat Client to
37+
// the CodeChat Server.
38+
27377,
39+
// The port used by a websocket connection between the CodeChat
40+
// Server and the CodeChat Client.
41+
27378
42+
],
43+
// See the [docs](https://containers.dev/implementors/json_reference/#port-attributes).
44+
"portsAttributes": {
45+
"27376": {
46+
"label": "VSCode extension <-> CodeChat Server",
47+
"requireLocalPort": true
48+
},
49+
"27377": {
50+
"label": "CodeChat Client",
51+
"requireLocalPort": true
52+
},
53+
"27378": {
54+
"label": "CodeChat Client<->Server websocket",
55+
"requireLocalPort": true
56+
// 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.
57+
}
58+
},
59+
60+
// Configure tool-specific properties.
61+
"customizations": {
62+
"codespaces": {
63+
"openFiles": ["source/main.ptx"]
64+
},
65+
"vscode": {
66+
"settings": {
67+
"editor.quickSuggestions": {
68+
"other": "off"
69+
},
70+
"editor.snippetSuggestions": "top",
71+
"xml.validation.enabled": false,
72+
"CodeChat.CodeChatServer.Command": "CodeChat_Server"
73+
},
74+
"extensions": [
75+
"ms-vscode.live-server",
76+
"oscarlevin.pretext-tools",
77+
"CodeChat.codechat"
78+
]
79+
}
80+
}
81+
82+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
83+
// "remoteUser": "root"
84+
}

codechat_config.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# <!-- Managed automatically by PreTeXt authoring tools -->
2+
# (delete the above line to manage this file manually)
3+
#
4+
#############################################################
5+
#
6+
# This file allows the use of the CodeChat previewer for PreTeXt.
7+
# Generally, there is no need to modify this file.
8+
# It will be automatically generated by PreTeXt with the latest
9+
# updates unless you remove the first comment line above.
10+
#
11+
############################################################
12+
#
13+
# .. Copyright (C) 2012-2023 Bryan A. Jones.
14+
#
15+
# This file is part of the CodeChat System.
16+
#
17+
# The CodeChat System is free software: you can redistribute it and/or
18+
# modify it under the terms of the GNU General Public License as
19+
# published by the Free Software Foundation, either version 3 of the
20+
# License, or (at your option) any later version.
21+
#
22+
# The CodeChat System is distributed in the hope that it will be
23+
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
24+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25+
# General Public License for more details.
26+
#
27+
# You should have received a copy of the GNU General Public License
28+
# along with the CodeChat System. If not, see
29+
# <http://www.gnu.org/licenses/>.
30+
#
31+
# ************************************************
32+
# |docname| - Configuration for a CodeChat project
33+
# ************************************************
34+
# This file defines the configuration for a CodeChat project. It contains a working `PreTeXt <https://pretextbook.org/>`_ configuration.
35+
#
36+
# ``source_path``: optional; defaults to ``.`` (the current directory). A path to the root of the source tree. Relative paths are rooted in the directory containing this configuration file.
37+
source_path: source
38+
39+
# ``output_path``: required. A path to the root of the HTML output produced by this renderer. Relative paths are rooted in the directory containing this configuration file.
40+
output_path: output/web
41+
42+
# ``args``: required string or sequence of strings. This provides the arguments to invoke the renderer. These strings may optionally contain the following replacement values:
43+
#
44+
# - ``{project_path}``: an absolute path to the directory containing this file.
45+
# - ``{source_path}``: the ``source_path`` above, but as an absolute path.
46+
# - ``{output_path}``: the ``output_path`` above, but as an absolute path.
47+
# - ``{sys_executable}``: the value of the running Python's `sys.executable <https://docs.python.org/3/library/sys.html#sys.executable>`_.
48+
# - ``{xml_id}``: The value of the the first ``xml:id`` attribute in the currently open file.
49+
args: "{sys_executable} -m pretext build web --xmlid {xml_id}"
50+
51+
# ``html_ext``: optional; defaults to ``.html``. The extension used by this renderer when generating HTML files.
52+
#html_ext: .html
53+
54+
# ``project_type``: optional; defaults to ``general``. Define the project type, which enables special processing based on the type. Valid values are ``general`` (no special processing), ``Doxygen``, and ``PreTeXt``.
55+
project_type: PreTeXt

generated-assets/.web_assets.pkl

640 Bytes
Binary file not shown.
6.47 KB
Loading
558 Bytes
Loading
539 Bytes
Loading
579 Bytes
Loading
565 Bytes
Loading
568 Bytes
Loading
600 Bytes
Loading

0 commit comments

Comments
 (0)