Skip to content

Commit

Permalink
zh_cn zh_tw PDF support
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjj committed Mar 28, 2011
1 parent b32c5ff commit 9bd7d92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/book*
/conf
/fop*
*.svn/*
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ $(foreach l,$(LANGS),book-$(l).html): book-%.html: book-%.xml
# Set SP_ENCODING to avoid "non SGML character" errors.
# Can also do SP_ENCODING="UTF-8".
$(foreach l,$(LANGS),book-$(l).pdf): book-%.pdf: book-%.xml
SP_ENCODING="XML" docbook2pdf book-$*.xml
if [ $* = zh_cn -o $* = zh_tw ]; then \
if ! [ -f fop-$*.xsl ]; then wget -q http://bestrecords.net/fop/fop-$*.xsl; fi; \
if ! [ -f fop-$*.xconf ]; then wget -q http://bestrecords.net/fop/fop-$*.xconf; fi; \
xmlto -m fop-$*.xsl --with-fop -p "-c `pwd`/fop-$*.xconf" pdf book-$*.xml ;\
else \
SP_ENCODING="XML" docbook2pdf book-$*.xml; \
fi

clean:
-rm -rf $(foreach l,$(LANGS),book-$(l).pdf book-$(l).xml book-$(l).html book-$(l))

0 comments on commit 9bd7d92

Please sign in to comment.