Skip to content

Commit 0dff184

Browse files
authored
Merge pull request #5 from fragandi/branch-inti
Branch inti
2 parents a6cd1c2 + d7b8d2d commit 0dff184

14 files changed

Lines changed: 230 additions & 218 deletions

.devcontainer.json

Lines changed: 0 additions & 87 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// This file was automatically generated with PreTeXt 2.16.1.
2+
// If you modify this file, PreTeXt will no longer automatically update it.
3+
//
4+
//////////////////////////////////////////////////////////////
5+
//
6+
// This file provides configuration options so that a PreTeXt
7+
// project can be edited and built using GitHub's Codespaces.
8+
// It is recommended to keep this in your repository even if you
9+
// do not use this feature, as it will allow other to explore
10+
// your project easily.
11+
// This file will be automatically generated by PreTeXt with the
12+
// latest updates unless you remove the first comment line above.
13+
//
14+
///////////////////////////////////////////////////////////////
15+
{
16+
"image": "mcr.microsoft.com/devcontainers/universal:2",
17+
"features": {},
18+
19+
// Comment or uncomment lines below if you don't or do need that feature.
20+
"postCreateCommand": {
21+
"install pandoc": "bash ./.devcontainer/installPandoc.sh",
22+
"install latex": "bash ./.devcontainer/installLatex.sh",
23+
"install pretext": "bash ./.devcontainer/installPretext.sh",
24+
"install sagemath": "bash ./.devcontainer/installSage.sh"
25+
},
26+
27+
28+
// Port forwarding
29+
// ---------------
30+
// This is needed by the CodeChat Server.
31+
"forwardPorts": [
32+
// The port used for a Thrift connection between the VSCode CodeChat
33+
// extension and the CodeChat Server.
34+
27376,
35+
// The port used for an HTTP connection from the CodeChat Client to
36+
// the CodeChat Server.
37+
27377,
38+
// The port used by a websocket connection between the CodeChat
39+
// Server and the CodeChat Client.
40+
27378
41+
],
42+
// See the [docs](https://containers.dev/implementors/json_reference/#port-attributes).
43+
"portsAttributes": {
44+
"27376": {
45+
"label": "VSCode extension <-> CodeChat Server",
46+
"requireLocalPort": true
47+
},
48+
"27377": {
49+
"label": "CodeChat Client",
50+
"requireLocalPort": true
51+
},
52+
"27378": {
53+
"label": "CodeChat Client<->Server websocket",
54+
"requireLocalPort": true
55+
// 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.
56+
}
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+
"oscarlevin.pretext-tools",
76+
"CodeChat.codechat"
77+
]
78+
}
79+
}
80+
}
81+

.devcontainer/installLatex.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
# This file was automatically generated with PreTeXt 2.16.1.
4+
# If you modify this file, PreTeXt will no longer automatically update it.
5+
6+
# We use TinyTeX (https://yihui.org/tinytex/)
7+
wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh
8+
9+
tlmgr install adjustbox amscdx bold-extra braket bussproofs cancel carlisle cases chessfss circuitikz colortbl enumitem extpfeil fontawesome5 fontaxes gensymb imakeidx kastrup lambda-lists listings listingsutf8 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 tikzfill titlesec txfonts ulem upquote was xfrac xltxtra xpatch xstring
10+
11+
tlmgr path add
12+
13+
# Ensure fonts provided by TinyTeX are available, as suggested in the pretext guide
14+
fontconfig="<?xml version=\"1.0\"?>
15+
<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">
16+
<fontconfig>
17+
<dir>~/.TinyTeX/texmf-dist/fonts</dir>
18+
<dir>~/.TinyTeX/texmf-local/fonts</dir>
19+
</fontconfig>"
20+
21+
fontconfig_path="/etc/fonts/conf.d/09-texlive-fonts.conf"
22+
if [ ! -f "$fontconfig_path" ]; then
23+
echo "Creating fontconfig file at $fontconfig_path"
24+
echo "$fontconfig" | sudo tee "$fontconfig_path" > /dev/null
25+
else
26+
echo "Fontconfig file already exists at $fontconfig_path"
27+
fi
28+
# Update font cache
29+
fc-cache -f -v

.devcontainer/installPandoc.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
# This file was automatically generated with PreTeXt 2.16.1.
4+
# If you modify this file, PreTeXt will no longer automatically update it.
5+
6+
wget https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-1-amd64.deb -O pandoc.deb
7+
8+
# wait for 60 second and then double check that no other script is using apt-get:
9+
sleep 60
10+
while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do
11+
echo "Waiting for apt-get to be free..."
12+
sleep 15
13+
done
14+
# Install pandoc
15+
sudo apt-get install -y --no-install-recommends ./pandoc.deb
16+
17+
rm pandoc.deb

.devcontainer/installPretext.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
# This file was automatically generated with PreTeXt 2.16.1.
4+
# If you modify this file, PreTeXt will no longer automatically update it.
5+
6+
sudo apt-get update
7+
sudo apt-get install -y --no-install-recommends \
8+
python3-louis \
9+
libcairo2-dev \
10+
librsvg2-bin
11+
12+
pip install --upgrade pip --break-system-packages
13+
14+
pip install pretext[homepage,prefigure] --only-binary {greenlet} --break-system-packages
15+
16+
pip install codechat-server --break-system-packages
17+
18+
playwright install-deps
19+
20+
playwright install
21+
22+
# Install mermaid for diagrams
23+
npm install -g @mermaid-js/mermaid-cli
24+
25+
# echo '/usr/lib/python3/dist-packages' > /usr/local/lib/python3.8/dist-packages/louis.pth
26+
27+
prefig init

.devcontainer/installSage.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# This file was automatically generated with PreTeXt 2.16.1.
4+
# If you modify this file, PreTeXt will no longer automatically update it.
5+
6+
# Conda should already be installed in the codespace. We need to add the conda-forge channel
7+
8+
conda config --add channels conda-forge
9+
conda config --set channel_priority strict
10+
11+
# We don't want conda to open the base environment always:
12+
conda config --set auto_activate_base false
13+
14+
# Now create a conda environment for sage (called sage):
15+
conda create --yes -n sage sage python=3.12
16+
17+
conda init
18+
19+
echo 'conda activate sage' >> ~/.bashrc
20+
21+
source ~/.bashrc

.github/workflows/pretext-cli.yml

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)