by ntoslinux · 4y ago · 0 comments
sudo apt update
sudo apt install texlive-latex-extra
sudo apt install dvipdf
sudo apt install ghostscript
sudo apt install texinfo
git clone https://git.savannah.gnu.org/git/c-intro-and-ref.git
cd c-intro-and-ref
make c.pdf
makeinfo --html -v c.texi -o c.html --no-split
mkdir -p out.d ; chmod 1777 out.d
docker run --rm -it -v "$(pwd)/out.d:/out.d" \
debian:latest \
sh -c "
apt update && apt install --no-install-recommends -y \
texlive-latex-extra \
texlive-base \
ghostscript \
texinfo \
git \
ca-certificates \
&& git clone --depth 1 https://git.savannah.gnu.org/git/c-intro-and-ref.git \
&& cd c-intro-and-ref \
&& make c.pdf \
&& makeinfo --html -v c.texi -o /out.d/c.html --no-split
" guix shell --pure git texinfo make nss-certs
[env] $ git clone https://git.savannah.gnu.org/git/c-intro-and-ref.git
[env] $ cd c-intro-and-ref
[env] $ make c.info
...and read it in your Info reader; I recommend Emacs (C-u h i /path/to/c RET).PDF is inferior because it doesn't have a convenient way to access the curated concept or variable index, whereas in Info you can just hit "i" and type something like "array, layout in memory" and jump straight to the relevant paragraph.
> docker run -t -i -v $HOME/docker-mounted:/tmp ubuntu /bin/bash
And copy the c.pdf from /tmp in docker to my local mac.