diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | src/headers/RTFHeader | 2 | ||||
-rw-r--r-- | src/templates/ASCIIMathML.hs | 2 | ||||
-rw-r--r-- | src/templates/DefaultHeaders.hs | 8 | ||||
-rw-r--r-- | src/templates/Makefile | 6 | ||||
-rw-r--r-- | src/templates/S5.hs | 14 | ||||
-rw-r--r-- | src/templates/fillTemplates.pl | 24 |
7 files changed, 30 insertions, 31 deletions
@@ -90,7 +90,6 @@ all: build-program .PHONY: templates templates: $(SRCDIR)/templates -$(SRCDIR)/templates: $(MAKE) -C $(SRCDIR)/templates define generate-shell-script @@ -120,7 +119,7 @@ $(CABAL): cabalize $(CABAL).in $(SRCDIR)/Main.hs .PHONY: configure cleanup_files+=$(BUILDDIR) $(BUILDCONF) $(BUILDVARS) -configure: $(BUILDCONF) +configure: $(BUILDCONF) templates $(BUILDCONF): $(CABAL) $(BUILDCMD) configure --prefix=$(PREFIX) # Make configuration time settings persistent (definitely a hack). @@ -128,7 +127,7 @@ $(BUILDCONF): $(CABAL) @echo "DESTDIR?=$(DESTDIR)" >>$(BUILDVARS) .PHONY: build -build: templates configure +build: configure $(BUILDCMD) build .PHONY: build-exec diff --git a/src/headers/RTFHeader b/src/headers/RTFHeader index 62923c1d6..b4368694b 100644 --- a/src/headers/RTFHeader +++ b/src/headers/RTFHeader @@ -1,4 +1,4 @@ -{\rtf1\ansi\deff0{\fonttbl{\f0 Times New Roman;}{\f1 Courier;}} +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} {\colortbl;\red255\green0\blue0;\red0\green0\blue255;} \widowctrl\hyphauto diff --git a/src/templates/ASCIIMathML.hs b/src/templates/ASCIIMathML.hs index fabc7fba2..7747a52a2 100644 --- a/src/templates/ASCIIMathML.hs +++ b/src/templates/ASCIIMathML.hs @@ -4,4 +4,4 @@ module Text.Pandoc.ASCIIMathML ( asciiMathMLScript ) where -- | String containing Pandoc.ASCIIMathML javascript. asciiMathMLScript :: String -asciiMathMLScript = "<script type=\"text/javascript\">\n<ASCIIMathML.js></script>\n" +asciiMathMLScript = "<script type=\"text/javascript\">\n@ASCIIMathML.js@</script>\n" diff --git a/src/templates/DefaultHeaders.hs b/src/templates/DefaultHeaders.hs index 22d17d6a7..4c552cea7 100644 --- a/src/templates/DefaultHeaders.hs +++ b/src/templates/DefaultHeaders.hs @@ -8,13 +8,13 @@ module Text.Pandoc.Writers.DefaultHeaders ( import Text.Pandoc.Writers.S5 defaultLaTeXHeader :: String -defaultLaTeXHeader = "<LaTeXHeader>" +defaultLaTeXHeader = "@LaTeXHeader@" defaultHtmlHeader :: String -defaultHtmlHeader = "<HtmlHeader>" +defaultHtmlHeader = "@HtmlHeader@" defaultS5Header :: String -defaultS5Header = "<S5Header>" ++ s5CSS ++ s5Javascript +defaultS5Header = "@S5Header@" ++ s5CSS ++ s5Javascript defaultRTFHeader :: String -defaultRTFHeader = "<RTFHeader>" +defaultRTFHeader = "@RTFHeader@" diff --git a/src/templates/Makefile b/src/templates/Makefile index ccd7b7076..c3256b87e 100644 --- a/src/templates/Makefile +++ b/src/templates/Makefile @@ -6,11 +6,11 @@ TARGETS := Text/Pandoc/ASCIIMathML.hs \ all: $(TARGETS) -Text/Pandoc/ASCIIMathML.hs: ASCIIMathML.hs $(PROCESSOR) $(VPATH)/ASCIIMathML.js +Text/Pandoc/ASCIIMathML.hs: ASCIIMathML.hs $(PROCESSOR) $(VPATH)/ASCIIMathML.js perl $(PROCESSOR) $@ $(VPATH) -Text/Pandoc/Writers/S5.hs: S5.hs $(PROCESSOR) $(VPATH)/headers/* +Text/Pandoc/Writers/S5.hs: S5.hs $(PROCESSOR) $(VPATH)/ui/default/* perl $(PROCESSOR) $@ $(VPATH) -Text/Pandoc/Writers/DefaultHeaders.hs: DefaultHeaders.hs $(PROCESSOR) $(VPATH)/ui/default/* +Text/Pandoc/Writers/DefaultHeaders.hs: DefaultHeaders.hs $(PROCESSOR) $(VPATH)/headers/* perl $(PROCESSOR) $@ $(VPATH) diff --git a/src/templates/S5.hs b/src/templates/S5.hs index 1417e7d7d..537286040 100644 --- a/src/templates/S5.hs +++ b/src/templates/S5.hs @@ -14,25 +14,25 @@ import Text.Pandoc.Writers.HTML ( writeHtml ) import Text.Pandoc.Definition s5Javascript :: String -s5Javascript = "<script type=\"text/javascript\">\n<slides.js></script>\n" +s5Javascript = "<script type=\"text/javascript\">\n@slides.js@</script>\n" s5CoreCSS :: String -s5CoreCSS = "<s5-core.css>" +s5CoreCSS = "@s5-core.css@" s5FramingCSS :: String -s5FramingCSS = "<framing.css>" +s5FramingCSS = "@framing.css@" s5PrettyCSS :: String -s5PrettyCSS = "<pretty.css>" +s5PrettyCSS = "@pretty.css@" s5OperaCSS :: String -s5OperaCSS = "<opera.css>" +s5OperaCSS = "@opera.css@" s5OutlineCSS :: String -s5OutlineCSS = "<outline.css>" +s5OutlineCSS = "@outline.css@" s5PrintCSS :: String -s5PrintCSS = "<print.css>" +s5PrintCSS = "@print.css@" s5CSS :: String s5CSS = "<style type=\"text/css\" media=\"projection\" id=\"slideProj\">\n" ++ s5CoreCSS ++ "\n" ++ s5FramingCSS ++ "\n" ++ s5PrettyCSS ++ "\n</style>\n<style type=\"text/css\" media=\"projection\" id=\"operaFix\">\n" ++ s5OperaCSS ++ "\n</style>\n<style type=\"text/css\" media=\"screen\" id=\"outlineStyle\">\n" ++ s5OutlineCSS ++ "\n</style>\n<style type=\"text/css\" media=\"print\" id=\"slidePrint\">\n" ++ s5PrintCSS ++ "\n</style>\n" diff --git a/src/templates/fillTemplates.pl b/src/templates/fillTemplates.pl index e85f1672a..037aea659 100644 --- a/src/templates/fillTemplates.pl +++ b/src/templates/fillTemplates.pl @@ -45,13 +45,13 @@ my %processor = ( my $outline = escape_for_haskell(slurp "ui/default/outline.css"); my $print = escape_for_haskell(slurp "ui/default/print.css"); - $template =~ s/<slides\.js>/$slides/; - $template =~ s/<s5-core\.css>/$s5core/; - $template =~ s/<framing\.css>/$framing/; - $template =~ s/<pretty\.css>/$pretty/; - $template =~ s/<opera\.css>/$opera/; - $template =~ s/<outline\.css>/$outline/; - $template =~ s/<print\.css>/$print/; + $template =~ s/\@slides\.js@/$slides/; + $template =~ s/\@s5-core\.css@/$s5core/; + $template =~ s/\@framing\.css@/$framing/; + $template =~ s/\@pretty\.css@/$pretty/; + $template =~ s/\@opera\.css@/$opera/; + $template =~ s/\@outline\.css@/$outline/; + $template =~ s/\@print\.css@/$print/; return $template; }, @@ -68,7 +68,7 @@ my %processor = ( " released under the GPL\\nSee ". "http://www1.chapman.edu/~jipsen/mathml/asciimath.html/ "; $script =~ s/\/\*.*?\*\//\/\*$acknowledgements\*\//g; # strip comments - $template =~ s/<ASCIIMathML\.js>/$script/; + $template =~ s/\@ASCIIMathML\.js@/$script/; return $template; }, @@ -84,10 +84,10 @@ my %processor = ( my $rtf = escape_for_haskell(slurp "headers/RTFHeader"); my $s5 = escape_for_haskell(slurp "headers/S5Header"); - $template =~ s/<HtmlHeader>/$html/; - $template =~ s/<LaTeXHeader>/$latex/; - $template =~ s/<RTFHeader>/$rtf/; - $template =~ s/<S5Header>/$s5/; + $template =~ s/\@HtmlHeader@/$html/; + $template =~ s/\@LaTeXHeader@/$latex/; + $template =~ s/\@RTFHeader@/$rtf/; + $template =~ s/\@S5Header@/$s5/; return $template; }, |