--imgsize=931,634 \
square.scad
-square.html: square.scm square.png makefile
+square1.png: square1.scad makefile
+ @openscad \
+ --render \
+ -o square1.png \
+ --camera=0.80,0.88,0.01,0,0,0,9.05 \
+ --imgsize=931,634 \
+ square1.scad
+
+square2.png: square2.scad makefile
+ @openscad \
+ --render \
+ -o square2.png \
+ --camera=0.80,0.88,0.01,0,0,0,9.05 \
+ --imgsize=931,634 \
+ square2.scad
+
+square.html: square.scm square.png square1.png square2.png makefile
@skribilo square.scm > square.html
clean:
-(document :title [square]
- (chapter :title [square()\;]
- (image :file "square.png" :height 400)))
+(use-modules (skribilo source c))
+
+(document
+ :title [square]
+ (chapter
+ :title (source :language c [square()\;])
+ (p [here's the output of ,(prog (source :language c [square()\;]))])
+ (figure
+ :legend "square();"
+ (image :file "square.png" :height 500))
+ (p [openscad draws a square for the code
+ ,(source :language c [square()\;]).])
+ (p [there are a couple other things worth noting here.
+ square is followed by an open and close parenthesis
+ ,(source :language c [()]), and then by a semicolon
+ ,(source :language c [\;])]))
+ (chapter
+ :title [square(1)\;]
+ (p [here's the output of ,(source :language c [square(1)\;])])
+ (figure
+ :legend "square(1);"
+ (image :file "square1.png" :height 500))
+ (p [note that it's identical to the
+ ,(source :language c [square()\;]) output. this is because
+ by default, openscad guesses a value of 1 whenever a value
+ is left unspecified.]))
+ (chapter
+ :title [square(2)\;]
+ (p [here's the output of ,(source :language c [square(2)\;])])
+ (figure
+ :legend "square(2);"
+ (image :file "square2.png" :height 500))))