Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

zh_cn zh_tw PDF support

  • Loading branch information...
commit 9bd7d9222606dad212a251ffd9395c0b16e7fb8d 1 parent b32c5ff
@nanjj nanjj authored
Showing with 8 additions and 1 deletion.
  1. +1 −0  .gitignore
  2. +7 −1 Makefile
View
1  .gitignore
@@ -1,3 +1,4 @@
/book*
/conf
+/fop*
*.svn/*
View
8 Makefile
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.