demonstrate non-building with image in subdir
authordaniel watson <ozzloy@gmail.com>
Thu, 17 Dec 2015 02:14:23 +0000 (18:14 -0800)
committerdaniel watson <ozzloy@gmail.com>
Thu, 17 Dec 2015 02:14:23 +0000 (18:14 -0800)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
subdir/image.png [new file with mode: 0644]
subdir/some-section.scrbl [new file with mode: 0644]
top-level.scrbl [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..81aa94d
--- /dev/null
@@ -0,0 +1,4 @@
+/scribble-common.js
+/scribble-style.css
+/scribble.css
+/top-level.html
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..c0fbffe
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+all:test
+
+test:
+       scribble top-level.scrbl
diff --git a/subdir/image.png b/subdir/image.png
new file mode 100644 (file)
index 0000000..4f70940
Binary files /dev/null and b/subdir/image.png differ
diff --git a/subdir/some-section.scrbl b/subdir/some-section.scrbl
new file mode 100644 (file)
index 0000000..58c20f0
--- /dev/null
@@ -0,0 +1,4 @@
+#! /usr/bin/env racket
+#lang scribble/base
+
+@image{image.png}
diff --git a/top-level.scrbl b/top-level.scrbl
new file mode 100644 (file)
index 0000000..9c87458
--- /dev/null
@@ -0,0 +1,39 @@
+#! /usr/bin/env racket
+#lang scribble/base
+
+@title{top level document}
+
+@include-section{subdir/some-section.scrbl}
+
+@;{
+when i try to build this document, i get an error that image.png isn't
+found at the top level.  i would expect that scribble would look for it
+in subdir/image.png and not just image.png.  can i make scribble look
+image.png in subdir?  do i want to, or am i maybe not fully
+understanding something about scribble document building process?
+
+$ make
+scribble top-level.scrbl
+ [Output to top-level.html]
+open-input-file: cannot open input file
+  path: /home/ozzloy/scribble-multiple-dir-example/image.png
+  system error: No such file or directory; errno=2
+  context...:
+   /usr/share/racket/collects/racket/private/kw-file.rkt:102:2: call-with-input-file*61
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1213:4: render-content method in ...bble/html-render.rkt:267:2
+   /usr/share/racket/pkgs/scribble-lib/scribble/base-render.rkt:888:4: render-content method in render%
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1167:4: do-render-paragraph method in ...bble/html-render.rkt:267:2
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1154:6: loop
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1090:4: render-part-content method in ...bble/html-render.rkt:267:2
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:1090:4: render-part-content method in ...bble/html-render.rkt:267:2
+   /usr/share/racket/pkgs/scribble-lib/scribble/html-render.rkt:813:4: render-one-part method in ...bble/html-render.rkt:267:2
+   loop
+   /usr/share/racket/pkgs/scribble-lib/scribble/render.rkt:33:0: render56
+   /usr/share/racket/pkgs/scribble-lib/scribble/run.rkt: [running body]
+Makefile:4: recipe for target 'test' failed
+make: *** [test] Error 1
+$ mv subdir/image.png .
+$ make
+scribble top-level.scrbl
+ [Output to top-level.html]
+}