diff --git a/examples/spread generation/Makefile b/examples/spread generation/Makefile index 4d95fdd..09c60c9 100644 --- a/examples/spread generation/Makefile +++ b/examples/spread generation/Makefile @@ -15,7 +15,7 @@ MAKESPREADS := ../../scripts/make-spreads.sh -spreads.tex: spreads +spreads.tex: spreads $(wildcard spreads/*/*) $(MAKESPREADS) $< $(SPREAD) > $@ dist: diff --git a/examples/spread generation/spreads/06-maual-layout/01-img.png b/examples/spread generation/spreads/06-maual-layout/01-img.png new file mode 100644 index 0000000..f5a0e4c Binary files /dev/null and b/examples/spread generation/spreads/06-maual-layout/01-img.png differ diff --git a/examples/spread generation/spreads/06-maual-layout/layout.tex b/examples/spread generation/spreads/06-maual-layout/layout.tex new file mode 100644 index 0000000..0280fc0 --- /dev/null +++ b/examples/spread generation/spreads/06-maual-layout/layout.tex @@ -0,0 +1,6 @@ + +Manual template + +\newpage + +\ImagePage{${CAPTION}}{${IMAGE}} diff --git a/scripts/README.md b/scripts/README.md index 223578f..67ed091 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -250,6 +250,8 @@ If `layout.tex` is present it will be included as the page layout/template. Any paths in the `layout.tex` should be relative to the location the built block .tex file will be located, usually to the project root. +Template field substitution is done as for all other templates. + ### Templates diff --git a/scripts/make-spreads.sh b/scripts/make-spreads.sh index 05979ae..2ce0fd0 100644 --- a/scripts/make-spreads.sh +++ b/scripts/make-spreads.sh @@ -479,7 +479,7 @@ populateTemplate(){ i=$(( i + 1 )) val=${val//\//\\/} - text=$(echo -e "${text}" | \ + text=$(echo "${text}" | \ sed "s/\${${var}}/${val%.*}/g") done @@ -502,7 +502,7 @@ populateTemplate(){ val=$(readCaption "${val}") fi - text=$(echo -e "${text}" | \ + text=$(echo "${text}" | \ sed "s/\${${var}}/${val}/g") done @@ -523,13 +523,13 @@ populateTemplate(){ done val=${val//\//\\/} - text=$(echo -e "${text}" | \ + text=$(echo "${text}" | \ sed "s/\${${var}}/${val}/g") done # print out the filled template... echo % template: $tpl - echo -e "${text}" + echo "${text}" return 0 }