www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit d65c2a03c5c265b1a36b9fe3e93cfe11cc06f5a4
parent e1986a96cb88d308de443c04c0188feff225b032
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Sat, 22 Jul 2017 16:11:50 +0200

Conditionally enable appendices based on the presence of the /no-appendices empty file.

Diffstat:
M.gitignore | 5+++--
Mscribblings/phc-thesis.scrbl | 34+++++++++++++++++++++++++---------
2 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -6,4 +6,5 @@ compiled/ /doc/ /pdf.log /html.log -/commit.log -\ No newline at end of file +/commit.log +/no-appendices +\ No newline at end of file diff --git a/scribblings/phc-thesis.scrbl b/scribblings/phc-thesis.scrbl @@ -72,16 +72,32 @@ (add1 a))) 1)) -@;{ -@aappendix{ - @include-asection[(lib "phc-graph/scribblings/phc-graph-implementation.scrbl")] - @include-asection[(lib "phc-adt/scribblings/phc-adt-implementation.scrbl")] - @include-asection[(submod (lib "remember/remember-implementation.hl.rkt") doc)] - @include-asection[(submod (lib "multi-id/multi-id.hl.rkt") doc)] - @include-asection[ +@(require (for-syntax racket/base + mzlib/etc)) +@(define-syntax (if-appendices stx) + (syntax-case stx () + [(_ a) + (if (file-exists? (build-path (this-expression-source-directory) + 'up + "no-appendices")) + #'(displayln "Appendices turned off on this build." + (current-error-port)) + #`(begin + (displayln (format "Appendices enabled on this build." + #,(current-directory)) + (current-error-port)) + a))])) +@if-appendices[ + @aappendix{ + @include-asection[ + (lib "phc-graph/scribblings/phc-graph-implementation.scrbl")] + @include-asection[(lib "phc-adt/scribblings/phc-adt-implementation.scrbl")] + @include-asection[ + (submod (lib "remember/remember-implementation.hl.rkt") doc)] + @include-asection[(submod (lib "multi-id/multi-id.hl.rkt") doc)] + @include-asection[ (lib "type-expander/scribblings/type-expander-implementation.scrbl")] -} -} + }] @;{ Notes concerning tikz → SVG conversion: