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
I have PreFigure running in a codespace and just wanted to outline the steps that would be necessary to add PreFigure into the PreTeXt codespace.
There are some additional packages to be installed in the docker container: python3-louis, npm, nodejs, libcairo2-dev, pkg-config, librsvg2-bin
Include pip install prefig[pycairo] in the docker container
In the postCreateCommand, include echo '/usr/lib/python3/dist-packages' > /usr/local/lib/python3.12/site-packages/louis.pth since python3-louis installs the python module louis in a location that is not in the pythonpath.
Also in the postCreateCommand, include prefig init which installs the MathJax libraries and the Braille29 font.
For reference, the prefigure-codespace repository (linked above) contains the Dockerfile used to build the container published on dockerhub and the script postCreateCommand.sh
The text was updated successfully, but these errors were encountered:
I have tried to put all this into the docker image for pretext. Is there a reason that your postCreateCommand shouldn't just be part of the docker image?
If you want to try out a new codespace in 15 minutes or so, the docker images should be updated by then.
Thanks for making this change. Everything is working well except that the Braille29 font isn't being installed. It is copied into the right place (/root/.fonts), but then fc-cache doesn't seem to install it system wide, even with the directory explicitly given and the flag "--really-force" set. If I copy the font into /usr/share/fonts and try fc-cache, then it is installed. I'm not sure why this would be different in the two codespaces.
The permissions are also different in that the pretext codespace needs sudo to copy the font into /usr/share/fonts, but my codespace doesn't.
I included some of those commands in the postCreateCommand because I wanted them to happen in the directory /workspaces/prefigure-codespace. Also, I experimented a bit to get the path to louis set up and didn't want to rebuild the container all the time. That command could certainly be moved into the container as you've done.
I have PreFigure running in a codespace and just wanted to outline the steps that would be necessary to add PreFigure into the PreTeXt codespace.
python3-louis
,npm
,nodejs
,libcairo2-dev
,pkg-config
,librsvg2-bin
pip install prefig[pycairo]
in the docker containerecho '/usr/lib/python3/dist-packages' > /usr/local/lib/python3.12/site-packages/louis.pth
since python3-louis installs the python modulelouis
in a location that is not in the pythonpath.prefig init
which installs the MathJax libraries and the Braille29 font.For reference, the prefigure-codespace repository (linked above) contains the Dockerfile used to build the container published on dockerhub and the script postCreateCommand.sh
The text was updated successfully, but these errors were encountered: