Skip to content

Commit 4ed9213

Browse files
committed
project 1
1 parent b41d3e5 commit 4ed9213

File tree

9 files changed

+2523
-0
lines changed

9 files changed

+2523
-0
lines changed

doc/Projects/2025/Project1/ipynb/Project1.ipynb

Lines changed: 1045 additions & 0 deletions
Large diffs are not rendered by default.
193 Bytes
Binary file not shown.

doc/Projects/2025/Project1/pdf/Project1.p.tex

Lines changed: 493 additions & 0 deletions
Large diffs are not rendered by default.
202 KB
Binary file not shown.

doc/Projects/2025/Project1/pdf/Project1.tex

Lines changed: 461 additions & 0 deletions
Large diffs are not rendered by default.

doc/src/Projects/2025/Project1/Project1.do.txt

Lines changed: 434 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
doconce clean
3+
rm -rf *.pdf *.tex ipynb*.tar.gz *.html ._*.html *~ reveal.js Trash README.txt
193 Bytes
Binary file not shown.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/bin/sh
2+
set -x
3+
4+
function system {
5+
"$@"
6+
if [ $? -ne 0 ]; then
7+
echo "make.sh: unsuccessful command $@"
8+
echo "abort!"
9+
exit 1
10+
fi
11+
}
12+
13+
if [ $# -eq 0 ]; then
14+
echo 'bash make.sh slides1|slides2'
15+
exit 1
16+
fi
17+
18+
name=$1
19+
rm -f *.tar.gz
20+
21+
opt="--encoding=utf-8"
22+
opt=
23+
24+
rm -f *.aux
25+
26+
27+
28+
# Plain HTML documents
29+
html=${name}
30+
system doconce format html $name --pygments_html_style=default --html_style=bloodish --html_links_in_new_window --html_output=$html $opt
31+
system doconce split_html $html.html --method=space10
32+
33+
# Bootstrap style
34+
html=${name}-bs
35+
system doconce format html $name --html_style=bootstrap --pygments_html_style=default --html_admon=bootstrap_panel --html_output=$html $opt
36+
system doconce split_html $html.html --method=split --pagination --nav_button=bottom
37+
38+
# IPython notebook
39+
system doconce format ipynb $name $opt
40+
41+
42+
# Ordinary plain LaTeX document
43+
system doconce format pdflatex $name --print_latex_style=trac --latex_admon=paragraph $opt
44+
system doconce ptex2tex $name envir=verbatim
45+
# Add special packages
46+
doconce subst "% Add user's preamble" "\g<1>\n\\usepackage{simplewick}" $name.tex
47+
doconce replace 'section{' 'section*{' $name.tex
48+
pdflatex -shell-escape $name
49+
pdflatex -shell-escape $name
50+
mv -f $name.pdf ${name}.pdf
51+
cp $name.tex ${name}.tex
52+
53+
# Publish
54+
dest=../../../../Projects/2025
55+
if [ ! -d $dest/$name ]; then
56+
mkdir $dest/$name
57+
mkdir $dest/$name/pdf
58+
mkdir $dest/$name/html
59+
mkdir $dest/$name/ipynb
60+
fi
61+
cp ${name}*.tex $dest/$name/pdf
62+
cp ${name}*.pdf $dest/$name/pdf
63+
cp -r ${name}*.html ._${name}*.html $dest/$name/html
64+
65+
# Figures: cannot just copy link, need to physically copy the files
66+
if [ -d fig-${name} ]; then
67+
if [ ! -d $dest/$name/html/fig-$name ]; then
68+
mkdir $dest/$name/html/fig-$name
69+
fi
70+
cp -r fig-${name}/* $dest/$name/html/fig-$name
71+
fi
72+
73+
cp ${name}.ipynb $dest/$name/ipynb
74+
ipynb_tarfile=ipynb-${name}-src.tar.gz
75+
if [ ! -f ${ipynb_tarfile} ]; then
76+
cat > README.txt <<EOF
77+
This IPython notebook ${name}.ipynb does not require any additional
78+
programs.
79+
EOF
80+
tar czf ${ipynb_tarfile} README.txt
81+
fi
82+
cp ${ipynb_tarfile} $dest/$name/ipynb
83+
84+
85+
86+
87+

0 commit comments

Comments
 (0)