Skip to content

Commit

Permalink
Add HTML target for the book.
Browse files Browse the repository at this point in the history
  • Loading branch information
eternaleye committed Nov 26, 2009
1 parent af0075b commit 7552628
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -18,6 +18,9 @@ release: build/book.pdf
build/mmd-table.pdf: src/mmd-table.svg
$(INKSCAPE) --export-pdf=build/mmd-table.pdf -D src/mmd-table.svg

build/book.html: $(CHAPTERS) bin/book-to-html
perl bin/book-to-html $(CHAPTERS) > build/book.html

build/book.pdf: build/book.tex build/mmd-table.pdf
cd build && pdflatex book.tex && pdflatex book.tex

Expand Down
21 changes: 21 additions & 0 deletions bin/book-to-html
@@ -0,0 +1,21 @@
#!perl -w
use strict;
use Pod::PseudoPod::HTML;

print <<'HEADER';
\documentclass[11pt,a4paper,oneside]{report}
\usepackage{graphics,graphicx}
\usepackage{colortbl}
\begin{document}
HEADER

for (@ARGV) {
my $parser = Pod::PseudoPod::HTML->new();
$parser->output_fh( *STDOUT );
$parser->parse_file( $_ );
}

print <<'FOOTER';
\end{document}
FOOTER

0 comments on commit 7552628

Please sign in to comment.