Permalink
Browse files

zh_cn zh_tw PDF support

  • Loading branch information...
1 parent b32c5ff commit 9bd7d9222606dad212a251ffd9395c0b16e7fb8d @nanjj nanjj committed Mar 28, 2011
Showing with 8 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +7 −1 Makefile
View
@@ -1,3 +1,4 @@
/book*
/conf
+/fop*
*.svn/*
View
@@ -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.