diff options
author | jao <jao@oblong.net> | 2009-05-10 00:41:55 +0200 |
---|---|---|
committer | jao <jao@oblong.net> | 2009-05-10 00:41:55 +0200 |
commit | c1e2823db96c9d7ab43373fd5d7a29fd24379e1e (patch) | |
tree | baee81780eb7570440d52cf56dbb4fb8ab4816d4 | |
parent | b2dc70474333811c4754da48bc40d052f4213dd8 (diff) | |
download | nowebmk-c1e2823db96c9d7ab43373fd5d7a29fd24379e1e.tar.gz nowebmk-c1e2823db96c9d7ab43373fd5d7a29fd24379e1e.tar.bz2 |
Support for optional hyperref and hyperref options.
-rw-r--r-- | noweb.mk | 6 | ||||
-rw-r--r-- | sample/Makefile.sample | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -29,6 +29,8 @@ NW_LINEFORMAT ?= -L"\# %L \"%F\" %N" NW_MAIN ?= main NW_DOCUMENT_CLASS ?= report NW_CONTENTS ?= contents.tex +NW_HYPER ?= yes +NW_HYPER_OPTIONS ?= "colorlinks=true,linkcolor=blue" f_notangle = $(NOTANGLE) $(NW_LINEFORMAT) -R$(2) $(1) | $(CPIF) $(2); f_latex = $(1) '\scrollmode \input '"$(2)";\ @@ -62,7 +64,6 @@ code_files = $(foreach f, $(NW_FILES), $(call f_roots, $(f).nw)) code_dirs = $(sort $(filter-out ./, \ $(foreach src, $(code_files), $(dir $(src))))) - %.tex : %.nw ; $(NOWEAVE) -n -indexfrom $(main_defs) $< > $@ %.defs : %.nw ; $(NODEFS) $< > $@ @@ -78,7 +79,8 @@ $(main_tex): $(nw_contents_files) $(main_defs) $(tex_files) \ @echo "\usepackage[utf8]{inputenc}" >> $(main_tex) @for f in $(NW_PACKAGES); do echo "\usepackage{$$f}" >> $(main_tex); \ done - @echo "\usepackage{hyperref}" >> $(main_tex) + @if [ "x$(HW_HYPER)" != "xno" ]; \ + then echo "\usepackage[$(NW_HYPER_OPTIONS)]{hyperref}" >> $(main_tex); fi @echo "\begin{document}" >> $(main_tex) @for f in $(NW_PRE_TEX); do echo "\input{$$f}" >> $(main_tex); done @for f in $(nw_contents_files); do \ diff --git a/sample/Makefile.sample b/sample/Makefile.sample index a18a985..95e7719 100644 --- a/sample/Makefile.sample +++ b/sample/Makefile.sample @@ -43,6 +43,10 @@ NW_SUBDIRS = . # NW_LINEFORMAT = -L"\# %L \"%F\" %N" NW_LINEFORMAT = +# Options for the hyperref package +# HW_HYPER = yes +# NW_HYPER_OPTIONS = "colorlinks=true,linkcolor=blue" + # Location of noweb.mk NW_MAKEFILE = ../noweb.mk |