flatten-ja.diff

Alexis Bienvenüe, 02/04/2018 08:37 pm

Download (2.7 kB)

 
b/doc/Makefile Sun Feb 04 20:36:21 2018 +0100
57 57
html/index.html: FORCE
58 58
	$(PERLPATH) ./index.pl $(DOCBOOKS:.xml=) > $@
59 59

  
60
%.ja.tex: %.ja.xml amcdocstyle.sty
61
	dblatex -P latex.encoding=utf8 -b xetex -t tex -p custom.xsl --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" $(DBLATEX_OPT) $< -o $@
62

  
60 63
%.tex: %.xml amcdocstyle.sty
61
	 case $< in \
62
	   *.ja.xml) dblatex -P latex.encoding=utf8 -b xetex -t tex -p custom.xsl --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" $(DBLATEX_OPT) $< -o $@ ;; \
63
	   *.xml) dblatex -t tex -p custom.xsl --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" $(DBLATEX_OPT) $< -o $@ ;; \
64
	 esac
64
	dblatex -t tex -p custom.xsl --texstyle=amcdocstyle --xslt-opts="--nonet" --xslt-opts="--catalogs" $(DBLATEX_OPT) $< -o $@
65 65

  
66 66
PDFLATEX=pdflatex -halt-on-error -interaction=nonstopmode
67 67
XELATEX=xelatex -halt-on-error -interaction=nonstopmode
68 68

  
69
%.ja.pdf: %.ja.tex $(BLOCK_IMAGES:.svg=.pdf)
70
	set -e ; export TEXINPUTS=./img_pdf/: ; $(XELATEX) $<; $(XELATEX) $<
71
	$(PERLPATH) ../reproducible-pdf.pl --fonts --id $@
72
	rm -f $(foreach ext,aux cb cb2 glo idx log out toc,$*.ja.$(ext))
73

  
69 74
%.pdf: %.tex $(BLOCK_IMAGES:.svg=.pdf)
70
	set -e; export TEXINPUTS=./img_pdf/: ; case $< in \
71
	  *.ja.tex) \
72
            sed -i -e '/setuplocale/a \ \
73
\\usepackage{xeCJK}\
74
\\setCJKmainfont{IPAexMincho}\
75
\\setCJKsansfont{IPAexGothic}\
76
\\setCJKmonofont{IPAexGothic}\
77
' $<; \
78
            $(XELATEX) $<; $(XELATEX) $<; $(PERLPATH) ../reproducible-pdf.pl --fonts --id $@ ;; \
79
	  *.tex) $(PDFLATEX) $<; $(PDFLATEX) $<; $(PERLPATH) ../reproducible-pdf.pl --id $@ ;; \
80
	esac
75
	set -e ; export TEXINPUTS=./img_pdf/: ; $(PDFLATEX) $<; $(PDFLATEX) $<
76
	$(PERLPATH) ../reproducible-pdf.pl --id $@
81 77
	rm -f $(foreach ext,aux cb cb2 glo idx log out toc,$*.$(ext))
82 78

  
83 79
%.x: %.ext %.man %.html ;
b/doc/amcdocstyle.sty.in Sun Feb 04 20:36:21 2018 +0100
21 21
\ProvidesPackage{amcdocstyle}
22 22
\RequirePackageWithOptions{docbook}
23 23
\RequirePackage[USenglish]{isodate}
24

  
24
\RequirePackage{ifxetex}
25 25
\AtBeginDocument{
26 26
  \ifx\pdfinfo\undefined
27 27
  \hypersetup{pdfcreationdate=D:@/PACKAGE_V_PDFDATE/@,pdfmoddate=D:@/PACKAGE_V_PDFDATE/@}
......
31 31
  \renewcommand{\DBKdate}{\printdate{@/PACKAGE_V_ISODATE/@}}
32 32
  \expandafter\def\expandafter\DBKsubtitle\expandafter{\DBKsubtitle{} \href{https://www.auto-multiple-choice.net/}{https://www.auto-multiple-choice.net/}}
33 33
}
34
\ifxetex%
35
  \RequirePackage{xeCJK}%
36
  \setCJKmainfont{IPAexMincho}%
37
  \setCJKsansfont{IPAexGothic}%
38
  \setCJKmonofont{IPAexGothic}%
39
\fi